-
-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
Currently after the system message we inject the "context tip"
CopilotChat.nvim/lua/CopilotChat/client.lua
Lines 208 to 239 in 5df0b66
if contexts and not vim.tbl_isempty(contexts) then | |
local help_text = [[When you need additional context, request it using this format: | |
> #<command>:`<input>` | |
Examples: | |
> #file:`path/to/file.js` (loads specific file) | |
> #buffers:`visible` (loads all visible buffers) | |
> #git:`staged` (loads git staged changes) | |
> #system:`uname -a` (loads system information) | |
Guidelines: | |
- Always request context when needed rather than guessing about files or code | |
- Use the > format on a new line when requesting context | |
- Output context commands directly - never ask if the user wants to provide information | |
- Assume the user will provide requested context in their next response | |
Available context providers and their usage:]] | |
local context_names = vim.tbl_keys(contexts) | |
table.sort(context_names) | |
for _, name in ipairs(context_names) do | |
local description = contexts[name] | |
description = description:gsub('\n', '\n ') | |
help_text = help_text .. '\n\n - #' .. name .. ': ' .. description | |
end | |
if system_prompt ~= '' then | |
system_prompt = system_prompt .. '\n\n' | |
end | |
system_prompt = system_prompt .. help_text | |
end |
I would like to disable the tip on my system cause it just leads the LLMs to often hallucinate needing more context and gets into very annoying loops especially when it has the current git diff in the context.
Any objection to a PR that makes context tip optional?
Metadata
Metadata
Assignees
Labels
No labels