Replies: 3 comments 2 replies
-
Why don't you just create a custom prompt in the prompt-library and use that? Or am I missing something? |
Beta Was this translation helpful? Give feedback.
-
Ah - OK, I didn't realize that the prompt library had an There's one thing that I don't think prompt-library approach covers, which is switching between different adapters. From what I can tell, switching adapters will clobber an initial system prompt: , whereas if the system prompt is set at the adapter level then you can switch back and forth between initial system prompts in mid-conversation by switching adapters.Maybe |
Beta Was this translation helpful? Give feedback.
-
You can use different adapters for each prompt you create. Then create a cmd abbreviation or keymap to launch them. That's what I currently do. It's better because it separates concerns and you can even compare the responses of different adapters by switching chat windows. For example, I always have Gemini and Copilot-Claude Chat windows on the ready. And I switch between them at will to compare and contrast responses. The only caveat you need to know is that closing a chat window destroys it forever, while hiding it keeps it running in the background. So map those actions wisely. |
Beta Was this translation helpful? Give feedback.
-
If you use Neovim for everything, it's easy to imagine using CodeCompanion for tasks other than coding—for example proofreading emails, brainstorming in note-taking contexts, revising GitHub issues for clarity, etc.
What I've found myself doing is overriding the system prompt like so:
And including special-purpose adapters like so:
This is a bit awkward because I need to duplicate the default CodeCompanion prompt as a local variable
main_system_prompt
in my config, in order to fall back on a generic coding prompt.I wonder if it might help to either:
Fall back on the default CodeCompanion prompt if the
system_prompt
callback returnsnil
, ORExpose the ordinary CodeCompanion prompt somehow in the plugin, so users can fall back on it manually within their
system_prompt
callback, ORChange the default behavior to check if the adapter has a
system_prompt
field and use that if it's available.These changes are, I think, independent of one another, so you could implement any subset of them. However, if both 2 and 3 are implemented, you'd need to decide what happens if the adapter has a
system_prompt
field AND there's asystem_prompt
function in place. I think it would make sense to have the adapter'ssystem_prompt
preempt the function.Beta Was this translation helpful? Give feedback.
All reactions