Skip to content

Working with Files and Context

Dline can read and search your workspace on its own, but pointing it at the relevant files and information usually gets accurate results faster.

Type @ in the input box to open a menu with URL, Problems, Terminal (VS Code), Git, Folder, and File.

Typing @ in the input box opens the context menu; the arrow keys move the highlight to entries such as Problems and Terminal, and Esc closes the menuTyping @ in the input box opens the context menu; the arrow keys move the highlight to entries such as Problems and Terminal, and Esc closes the menu

SyntaxWhat is added
@/path/to/fileThe file’s content (relative to the workspace root). Only that file is included, not files it imports; very large files may be truncated
@/path/to/folder/A one-level listing of the folder plus the content of the readable files it directly contains; subfolders are listed by name but not read recursively
@problemsError and warning diagnostics in the workspace
@terminalOutput of the active terminal (VS Code)
@git-changesUncommitted changes: git status and git diff HEAD. Shown as Working changes in the menu
@<commit-hash>A 7–40 character hexadecimal commit hash; adds the commit’s metadata, stats, and diff
@https://…Fetches the page and converts it to Markdown; a failed fetch is reported as an error

Click the + button in the input area to pick files or images:

  • Images: PNG, JPG/JPEG, WebP. Images can be picked only when the current model supports image input.
  • Files: XML, JSON, TXT, LOG, MD, DOCX, IPYNB, PDF, XLSX, CSV.

Limits:

  • at most 20 images and files per message;
  • non-image files larger than 20 MB picked through the selector are skipped;
  • pasted or dropped images wider or taller than 7500 pixels are rejected.

You can also paste images straight into the input box.

  • From the VS Code Explorer: files and folders become @/file or @/folder/ mentions. Paths outside the workspace are rejected.
  • From your operating system’s file manager: only PNG, JPEG, and WebP images are accepted, as image attachments; other file types are not supported.

With code selected in the editor, the context menu shows Add to Dline, which puts the selected code, a file mention, and any diagnostics in that range into the chat. Pressing Cmd+' (macOS) or Ctrl+' (Windows/Linux) with a selection does the same.

In the editor’s code-action menu (the lightbulb or Quick Fix), Dline offers:

ActionWhen it appearsEffect
Add to DlineAlwaysPuts the code, a file mention, and diagnostics into the chat
Explain with DlineAlwaysStarts a task that explains the selected code
Improve with DlineAlwaysStarts a task that improves the selected code
Fix with DlineWhen diagnostics exist at that locationAsks Dline to fix the reported problems

Select text in a terminal, right-click, and choose Add to Dline. The selected output is placed in the input box as a code block. Only your selection is copied, not the whole terminal output; use @terminal when you want the active terminal’s output.

In the Source Control view’s title bar, click Generate Commit Message with Dline. Dline writes a commit message from your changes and fills in the commit input box. It prefers staged changes; with nothing staged, it uses all changes relative to HEAD. While it is generating, click Generate Commit Message with Dline - Stop to cancel.