Code navigation

When you ask a question about code, for example where a name is defined or where it is used, DataMind Oda can answer it from the code itself instead of matching text: it puts the question to the language server that handles that kind of file. This page covers the four questions Oda can ask, what the answers look like in the chat, and the limits that apply. For searching files by name and text, see Finding files and text.

The four questions

Oda asks one of four kinds of question, each about one spot in one file:

The names in brackets are the ones the step shows in its title. All four questions only read: they answer, and they cannot change code.

How Oda asks the question

Oda picks the kind that fits your question and asks at a spot it chooses:

What the answer looks like

Limits

When a code question fails

Questions, answered

What kinds of code questions can Oda answer?

Four: where a name is defined, where a name is used, what implements it, and what sits at a spot. All four only read: they answer, and they cannot change code.

Does a list of uses include where the name is defined?

Yes. A search for uses always includes the declaration, so the place the name is written down is among the answers.

How do I read the line and character numbers in a result?

Both count from 1: the first line of the file is line 1, and the first character of a line is character 1. A place is shown as its file with those two numbers, in the form path:line:character; they are the same numbers Oda asked the question with.

Why did a code question return no results?

Two possibilities. The spot may not sit on a name, and a position right beside a name can also find nothing; that is not an error. Or the step may fail saying code navigation is unavailable for the file, which means no server covers that kind of file (Language servers).

What does No hover information. mean?

The server has nothing to show at that spot. Not every spot carries a description, and an empty answer is not an error.

What does the … more locations omitted line mean?

The list held more than 100 places, so the shown text stops there and the line gives how many were left out. The complete set stays in the step's recorded result.

What happens when a code answer is very long?

The shown text is cut at 16,000 characters and a notice says what was cut and the limit. The step's recorded result is not affected by that cut.

Is there a time limit on a code question?

Yes: 60 seconds for the whole question, including any wait for the server. If it runs out, the step fails and you can ask again. The limit is fixed and cannot be changed from a chat.

Can Oda change code with code navigation?

No. Code navigation is read-only: it does not rename, reformat, check for errors or list symbols, and nothing is changed by a code question.

Does code navigation work in a chat without a folder?

No. It needs the chat's folder, both to read the file from and to give the server a working folder. Pick a folder for the chat first (Workspaces, files and permissions).

Why do the words LSP and findReferences appear in my chat?

They come from the step's title: LSP findReferences a.ts:3:7 names the kind of question and the spot it was asked at (the file with its line and character). You do not need these words yourself; ask in your own words.