ClipPrompt is a Visual Studio Code extension that allows users to quickly add code selections to a prompt string and copy the content of that string to the clipboard.
For generating effective prompts, it's crucial to supply relevant context.
In large projects, it's not ideal to include the entire repository as context, as this can lead to token wastage and reaching API limits. Instead, the context should be as concise and focused as possible.
ClipPrompt enables you to assemble snippets, automatically appending the full file path for each copied snippet, to create a more compact context.
This approach enhances the quality of your prompts and helps you conserve valuable tokens in the process!
Clipprompt adds two commands to the right-click context menu in the editor:
- Add Selection to Prompt (Default Keybinding:
Ctrl+Shift+A
on Windows/Linux,Cmd+Shift+A
on macOS): Adds the selected text to the prompt string. - Copy & Clear the Prompt (Default Keybinding:
Ctrl+Shift+C
on Windows/Linux,Cmd+Shift+C
on macOS): Copies the content of the prompt string to the clipboard and clears the prompt string.
These commands also have default keybindings, which you can customize in your Keyboard Shortcuts settings (File > Preferences > Keyboard Shortcuts
or Ctrl+K Ctrl+S
).
Tip: The prompt string is not persisted across sessions or extension reloads. It is stored in memory and will be lost when the extension is deactivated or reloaded.
There are no special requirements or dependencies for Clipprompt. Just install the extension and start using it.
There are no known issues at the moment. If you encounter any problems, please open an issue on the GitHub repository.
Initial release of Clipprompt.
Added default keybindings for commands, which users can customize.
Enjoy!