Copy Source Reference for AgentCopy a source file reference and an optional Markdown snippet from VS Code or Cursor. Paste the result into a coding agent to point it to the code you want to discuss.
The two path commands are also available in the Command Palette under Copy Source Reference for Agent. The status bar briefly shows the copied reference or the reason the copy failed. Output
Line numbers start at 1. A selection ending at the start of the next line leaves that line out of the range. With multiple cursors, the extension uses the primary selection. Relative paths follow VS Code's workspace convention, including the folder name in a multi-root workspace. For files outside the workspace, use Copy Absolute Path. Windows paths use backslashes, for example The Markdown shortcut replaces the clipboard contents with the same reference followed by the exact selected text in a language-tagged code block. With no selection, the snippet contains the current line. Editing the file, moving the selection, or switching editors ends the follow-up window.
Settings
The Marketplace build of v0.1.5 uses the Build and installUse Node.js 22 or later for packaging.
In either editor, run Extensions: Install from VSIX... and select PublishUpload the same VSIX to Visual Studio Marketplace and Open VSX. Cursor discovers Open VSX extensions through its extension marketplace. Use a publisher ID that you control on both registries and set |