复制用户选中文本的行列位置信息,供 AI 使用

Developer cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
.vscode cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
src cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
.vscodeignore cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
CHANGELOG.md cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
README.md cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
esbuild.js cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
eslint.config.mjs cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
package.json cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás
tsconfig.json cd3d968674 chore: initialize VS Code extension project scaffold 1 mês atrás

README.md

Copy AI Context

A VS Code extension to copy code context formatted for AI assistants (ChatGPT, Claude, etc.).

Features

  • Copy Selection (Ctrl+Alt+C / Cmd+Alt+C) — Copy selected code with file path and line numbers
  • Copy Active File (Ctrl+Alt+F / Cmd+Alt+F) — Copy the entire active file
  • Copy Workspace Files — Pick files from the workspace to copy as context

Usage

Select code in the editor, then:

  • Right-click and choose Copy AI Context: Selection
  • Use the keyboard shortcut Ctrl+Alt+C (Windows/Linux) or Cmd+Alt+C (macOS)
  • Open the Command Palette (Ctrl+Shift+P) and search for Copy AI Context

Output format:

--- path/to/file.ts:10-25 ---

ts // your code here

Requirements

  • VS Code 1.85+

Development

npm install
npm run build

Press F5 in VS Code to launch a development extension host.