CopilotC-Nvim / CopilotC-Nvim/CopilotChat.nvim

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

Open
#1,482 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Lua
Stars
3.7k
Forks
171
Avg merge
16h 26m
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation of open(config) and compare how it handles system_prompt with ask("my prompt", config), using the reproducible examples in this issue. Done means passing system_prompt through open(config) produces the requested custom instructions, as shown by the pirate prompt example.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.