Skip to content

Using the Action Palette ​

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:

:CodeCompanionActions

Opened from a chat buffer, it lists that chat's keymaps and slash commands instead.

Actions ​

The palette starts with these actions:

ActionDescription
ChatOpen 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:

PromptAliasDescription
Commit messagecommitGenerate a commit message
Explain codeexplainExplain how code in a buffer works
Explain LSP diagnosticslspExplain the LSP diagnostics for the selected code
Fix codefixFix the selected code
Help with CodeCompanionhelpAnswer a question from CodeCompanion's documentation
Inline promptPrompt the LLM from inside a Neovim buffer
Unit teststestsGenerate unit tests for the selected code
Code workflowRun the built-in workflow

Prompts with an alias can also be run from the command line:

:CodeCompanion /explain

To 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

Released under the Apache-2.0 License.