Working in VS Code, you can bring what you are looking at into a message: the file open in the editor, the lines you select, and files you drag in. This page covers how that context appears in the message box and what Oda receives. The panel itself is on The Oda extension for VS Code; for everything else a chat can do, see Chat with Oda.
Send the lines you have selected in the editor to the chat with Add Selection to Chat, and a terminal command's output with Add Terminal Output to Chat. The commands, and the messages they can show, are on Extension commands and keybindings.
What you send lands in the message box:
The message box carries a chip for the editor context that will ride with your message: the file open in VS Code, or your selection.
DataMind Oda sends {label} with your message. Click to leave it out.; while it is off, it reads {label} is not sent with your message. Click to send it. The {label} is the chip's own label, such as a. ts:2-3.A selection you send, or a file you drag in, becomes a reference chip: it shows the file, and its lines when it points at a range of lines, for example a.. In the message itself, the reference reaches Oda as a mention:
@src/ a. ts (lines 10-20) for a range of lines, @src/ a. ts (line 7) for a single line, and @"a b. ts" for a path with spaces.@src/ a. ts (lines 2-3).It is the editor context chip: it shows the file open in VS Code, or your selection, and that context rides with your message. Click the chip to leave it out, and click it again to send it. The chip hides while VS Code shows no file.
The editor context is turned off, so it does not ride with your message. Click the chip to send it again; the crossed-out label and the slashed eye icon clear.
The lines you selected, up to about 20,000 characters. From a longer selection, only about the first 20,000 characters are sent, and the rest is left out.
In the message box, at the caret you left, as one insert: one undo removes it whole, your other chips stay, and it lands once, in the chat it was sent to.
The file's path could not be written as a mention, so the path itself was inserted as plain text. A selection from an unsaved file is inserted as a code block, because there is no saved file for a chip to point at. Mention files, folders and chats covers mentions.
@src/ a. ts (lines 10-20) mean?It is how a reference reaches Oda in your message: the file and the range of lines it points at. A single line is written @src/, and a path with spaces is quoted, as in @"a b..
A file inside the chat's folder is written relative to that folder, with forward slashes, and letter case is ignored on Windows. A file outside the folder keeps its full path.
It opens the file at its line in VS Code.
Yes. Drag files from VS Code's Explorer, or drag an editor tab, onto the message box: they are added as file chips, and the same file is not added twice.
In the message box, at the caret you left, like a selection. The picker that sends terminal output, and what it keeps, are on Extension commands and keybindings.
It can. A copied selection from a VS Code editor pastes as a file chip with the file and its lines, or as its text. A copy made with no selection, or with several cursors, pastes as ordinary text.