4ai
4ai is a simple tool to allow easy formatted copying of code for giving context to chat-based LLMs.
Features
- Copy code content for individual or multiple Python or TypeScript/JavaScript files by selecting them and right clicking
- Copied files are placed into a code comment with the path (markdown formatting)
- Optional local import resolving to retrieve relevant code from imports
Extension Settings
This extension contributes the following settings:
4ai.resolveImports: Resolve and include local imports when copying.
4ai.importDepth: How many levels deep to resolve transitive imports.
4ai.maxOutputTokens: Maximum estimated tokens before truncation.
4ai.tokenWarningThreshold: Show a warning when estimated tokens exceed this.
4ai.chunkSizeTokens: Target chunk size in tokens for chunked copy mode.
4ai.copyMode: Default copy mode.
Known Issues
None yet
| |