Using the Action Palette
The Action Palette is a single menu for starting chats, switching between them and running prompts from your prompt library. To open it:
:CodeCompanionActionsOpened from a chat buffer, it lists that chat's keymaps and slash commands instead.
Actions
The palette starts with these actions:
| Action | Description |
|---|---|
Chat | Open a new chat buffer |
Open chats ... | Move to any open chat buffer |
Saved sessions ... | Restore a chat saved to disk |
Chat with rules ... | Open a chat buffer with a rule group loaded |
To hide them, set display.action_palette.opts.show_preset_actions = false.
Built-in Prompts
Below the actions are the prompts that ship with CodeCompanion:
| Prompt | Alias | Description |
|---|---|---|
Commit message | commit | Generate a commit message |
Explain code | explain | Explain how code in a buffer works |
Explain LSP diagnostics | lsp | Explain the LSP diagnostics for the selected code |
Fix code | fix | Fix the selected code |
Help with CodeCompanion | help | Answer a question from CodeCompanion's documentation |
Inline prompt | Prompt the LLM from inside a Neovim buffer | |
Unit tests | tests | Generate unit tests for the selected code |
Code workflow | Run the built-in workflow |
Prompts with an alias can also be run from the command line:
:CodeCompanion /explainTo hide the built-in prompts, set display.action_palette.opts.show_preset_prompts = false.
Refreshing
The palette caches its items. After editing your prompt library, reload them with:
:CodeCompanionActions Refresh