mirror of
https://github.com/coder/coder.git
synced 2026-11-02 13:33:30 +08:00
29 lines
1.5 KiB
Go
29 lines
1.5 KiB
Go
package chatadvisor
|
|
|
|
const (
|
|
// AdvisorSystemPrompt steers the nested advisor model to help the parent
|
|
// agent rather than speaking directly to the end user.
|
|
AdvisorSystemPrompt = `You are an internal advisor for another AI coding agent.
|
|
You are advising the parent agent, not the end user.
|
|
Give concise strategic guidance that helps the parent decide what to do next.
|
|
Focus on planning ambiguity, architecture tradeoffs, debugging strategy,
|
|
and risk reduction.
|
|
Do not address the user directly.
|
|
Do not suggest using tools yourself because this nested run has no tools.
|
|
Respond with practical guidance only.`
|
|
|
|
// ParentGuidanceBlock is a reusable prompt block for teaching parent agents
|
|
// when to invoke the built-in advisor tool.
|
|
ParentGuidanceBlock = `<advisor-guidance>
|
|
Use the built-in advisor tool when you need strategic guidance on planning
|
|
ambiguity, architectural tradeoffs, debugging strategy, or repeated failures.
|
|
The advisor sees recent conversation context, runs as a single-step nested model
|
|
call with no tools, and returns concise guidance for the parent agent rather
|
|
than the end user. Provide a brief question, no more than 2000 runes. Summarize
|
|
context instead of pasting long logs or transcripts.
|
|
</advisor-guidance>`
|
|
// LimitReachedAdvice is returned when the per-run advisor budget is
|
|
// exhausted, telling the parent agent to stop calling the advisor.
|
|
LimitReachedAdvice = "The advisor budget for this turn is exhausted. Do not call the advisor again this turn; proceed with your own judgment."
|
|
)
|