CopilotChat.nvim icon indicating copy to clipboard operation
CopilotChat.nvim copied to clipboard

custom system_prompt is not set correctly when passing it in open(config)

Open Senth opened this issue 1 month ago • 1 comments

I've been trying to get a custom system_prompt to be set when calling the open(config) command. It seems like it should work since I have gotten it to work when calling ask("my prompt", config)

Reproducible Example

require("CopilotChat").open({
	system_prompt = "You are a pirate. Speak in pirate slang.",
})
Image

Example where it works with ask(...)

require("CopilotChat").ask(
	"Do you have any custom instructions?",
	{ system_prompt = "You are a pirate. Speak in pirate slang." }
)
Image

Senth avatar Nov 04 '25 15:11 Senth

You can pass prompt reference to .system_prompt and it might work and store it as sticky, otherwise chat do not stores any state (and it doesnt do that for .ask either so that will work only for 1 question).

deathbeam avatar Nov 07 '25 18:11 deathbeam