File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ Below are all available configuration options with their default values:
439439
440440 -- Shared config starts here (can be passed to functions at runtime and configured via setup function)
441441
442- system_prompt = prompts . COPILOT_INSTRUCTIONS . system_prompt , -- System prompt to use (can be specified manually in prompt via /).
442+ system_prompt = ' COPILOT_INSTRUCTIONS' , -- System prompt to use (can be specified manually in prompt via /).
443443
444444 model = ' gpt-4o' , -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
445445 agent = ' copilot' , -- Default agent to use, see ':CopilotChatAgents' for available agents (can be specified manually in prompt via @).
Original file line number Diff line number Diff line change 1- local prompts = require (' CopilotChat.config.prompts' )
21local select = require (' CopilotChat.select' )
32
43--- @class CopilotChat.config.window
@@ -56,7 +55,7 @@ return {
5655
5756 -- Shared config starts here (can be passed to functions at runtime and configured via setup function)
5857
59- system_prompt = prompts . COPILOT_INSTRUCTIONS . system_prompt , -- System prompt to use (can be specified manually in prompt via /).
58+ system_prompt = ' COPILOT_INSTRUCTIONS' , -- System prompt to use (can be specified manually in prompt via /).
6059
6160 model = ' gpt-4o' , -- Default model to use, see ':CopilotChatModels' for available models (can be specified manually in prompt via $).
6261 agent = ' none' , -- Default agent to use, see ':CopilotChatAgents' for available agents (can be specified manually in prompt via @).
@@ -122,7 +121,7 @@ return {
122121 contexts = require (' CopilotChat.config.contexts' ),
123122
124123 -- default prompts
125- prompts = prompts ,
124+ prompts = require ( ' CopilotChat.config. prompts' ) ,
126125
127126 -- default mappings
128127 mappings = require (' CopilotChat.config.mappings' ),
Original file line number Diff line number Diff line change @@ -320,7 +320,12 @@ function M.resolve_prompt(prompt, config)
320320 return inner_config , inner_prompt
321321 end
322322
323- return resolve (config or M .config , prompt or ' ' )
323+ config = vim .tbl_deep_extend (' force' , M .config , config or {})
324+ config , prompt = resolve (config , prompt or ' ' )
325+ if prompts_to_use [config .system_prompt ] then
326+ config .system_prompt = prompts_to_use [config .system_prompt ].system_prompt
327+ end
328+ return config , prompt
324329end
325330
326331--- Resolve the context embeddings from the prompt.
You can’t perform that action at this time.
0 commit comments