Skip to content

FEATURE: allow option out of context tips #1173

@SamSaffron

Description

@SamSaffron

Currently after the system message we inject the "context tip"

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions