fix(agent): harden @mention scope and simplify must_use hints

Tighten per-turn @MCP/@Skill/@tag handling after review: enforce agent
MCP/Skill whitelist, ignore mentions when selection mode is none, tag-scope
grep_chunks, and simplified English must_use lines without tool dumps.
Skip persisting scope envelopes to history rendered_content.
This commit is contained in:
wizardchen
2026-06-29 16:54:08 +08:00
committed by lyingbug
parent 049f85139d
commit b86efe3f92
14 changed files with 442 additions and 104 deletions
+2 -1
View File
@@ -32,10 +32,11 @@ func (e *AgentEngine) streamFinalAnswerToEventBus(
// Build messages with all context
systemPrompt := e.buildSystemPrompt(ctx)
userTurn := e.RenderUserTurnContent(sessionID, query)
messages := []chat.Message{
{Role: "system", Content: systemPrompt},
{Role: "user", Content: query},
{Role: "user", Content: userTurn},
}
// Add all tool call results as context