Chatbot to Agent (VS Code Extension)
A small VS Code extension that let you use your chatbot like a coding agent. It helps you prepare a single, ready-to-paste context file
for your LLM chatbot. You type your question, attach the relevant files, and the
extension produces a filled context.md containing:
- Task / Question — what you typed.
- Codebase Tree — an auto-generated tree of your workspace (ignoring
node_modules, .git, anything in .gitignore, etc.).
- Relevant File Contents — the full contents of the files you attached, each in a fenced code block.
Why?
Coding agents have become a de facto standard for software development, but they are not accessible to everyone for different reasons such as:
- High cost for entry level and independent developers
- Some companies restrict access to LLM APIs for security reasons while providing access to a local chatbot
Install
Option A — Package & install a .vsix (recommended)
Requires Node.js.
# from inside the chatbot-to-agent/ folder
npx @vscode/vsce package
# -> produces chatbot-to-agent-0.2.0.vsix
code --install-extension chatbot-to-agent-0.2.0.vsix
Or in VS Code: Extensions view → "..." menu → Install from VSIX… and pick the file.
If vsce shows warnings about the placeholder repository field, you can ignore them
or edit package.json.
Option B — Run from source (development)
- Open the
chatbot-to-agent/ folder in VS Code.
- Press F5 to launch an Extension Development Host window with the extension loaded.
Usage
- Open the Command Palette (
Ctrl/Cmd+Shift+P) and run "Chatbot to Agent: Open Builder".
- Type your Task / Question.
- Attach files using any of these:
- Add files… button (multi-select picker of workspace files), or
- Add open editors button, or
- Right-click files in the Explorer → "Chatbot to Agent: Add File to Builder".
- (Optional) Toggle Include codebase tree and add any paths/patterns to Exclude from tree.
- (Optional) Pick an Output mode.
- Click Generate.
- Paste/attach the generated markdown into your LLM chat.
Excluding files from the tree
The generated tree omits, in addition to the configured ignore names:
- Everything matched by the workspace-root
.gitignore (when chatbotToAgent.useGitignore is enabled).
- Anything you type in the Exclude from tree field. This accepts comma-separated
entries using
.gitignore-style glob semantics, for example:
*.wav — files with that extension anywhere in the tree
**/*.png — same idea, explicit recursive form
src/generated — a specific folder path
dist/, *.map — multiple entries
Output modes
| Mode |
Behavior |
| Open in new tab |
Opens the filled template in a new untitled Markdown editor. |
| Copy to clipboard |
Copies the filled template to your clipboard. |
| Save as context.md |
Writes context.md to the workspace root and opens it. |
Settings
| Setting |
Default |
Description |
chatbotToAgent.ignore |
node_modules, .git, dist, build, out, .next, .vscode, __pycache__, .venv, venv, *.log, *.lock |
Names / *.ext patterns excluded from the tree and file picker. |
chatbotToAgent.useGitignore |
true |
Also exclude files/folders matched by the workspace .gitignore from the generated tree. |
chatbotToAgent.maxTreeDepth |
8 |
Maximum directory depth in the generated tree. |
chatbotToAgent.maxFileSizeKB |
200 |
Files larger than this are listed but their contents are skipped. |
Notes
- The generated file uses dynamic code-fence lengths, so files that themselves contain
triple backticks won't break the Markdown.
.gitignore support reads the workspace-root .gitignore and supports common glob
rules (*, **, ?, leading / anchoring, trailing / dir-only, and ! negation).
Nested per-directory .gitignore files are not parsed.
- This extension is published under the
MohsenGoodarzi publisher id (set in package.json).
| |