A Visual Studio Code extension that generates copy-ready context from multiple files in your workspace for use with Large Language Models (LLMs) such as ChatGPT, Claude, and Gemini. Instead of manually copying and pasting the contents of file after file every time you want to send them to one of these LLM tools, this extension gathers all the files you select and turns them into a single, well-structured context block that you can paste in one go.
Features
Workspace file tree with checkboxes: Browse your current workspace in a dedicated view with a hierarchical tree of folders and files, each with a checkbox.
Folder-level selection: Checking a folder will check (or uncheck) all files and subfolders under it, making it easy to include whole directories at once.
Markdown-style context generation: For every selected file, the extension generates a block like:
File: relative/path/to/file.ext
Followed by the full file contents wrapped in triple backticks.
Dedicated "Generated Context" view: The generated text is shown in a separate webview tab called Generated Context with a read-only text area.
One-click copy: A Copy to Clipboard button copies the entire generated context so you can paste it directly into your LLM prompt.
Clear selection command: Quickly uncheck everything in the tree with a single command.
Requirements
Visual Studio Code: version 1.106.1 or higher (as defined in engines.vscode).
No additional runtime dependencies are required.
Installation
Open the Extensions view in VS Code (Ctrl+Shift+X / Cmd+Shift+X).
Search for "Context Generator for LLM".
Click Install.
Reload VS Code if prompted.
Usage
1. Open a workspace
Open a folder or workspace in VS Code that contains the files you want to send as context to an LLM.
2. Open the Context Generator view
In the Activity Bar, find the view container titled Context Generator for LLM.
Open it to show the llm-file-selector tree view.
3. Select files and folders
Use the checkboxes to select the files you want to include.
You can also check a folder to select (or unselect) all files and subfolders inside it.
Only real files are included in the generated context; folders themselves are used only for grouping and selection.
4. Generate context
You can generate context in either of the following ways:
Click the Generate Context button in the title bar of the llm-file-selector view.
Or run the Generate Context command from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and choose "Generate Context".
When executed, the extension:
Collects all checked items that are files.
Reads their contents from disk.
Builds a single text document with each file represented as:
File: path/from/workspace/root.ext
// file contents here
Opens a Generated Context webview tab showing the final result.
If no files are selected, a warning message is shown instead.
5. Copy the generated text
In the Generated Context tab, click the Copy to Clipboard button.
Paste the copied text into your LLM chat or prompt.
Configuration
This extension currently does not contribute any user settings.
There are no configuration options yet.