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:
@@ -129,8 +129,8 @@ func buildUserHistoryMessage(m *types.Message) chat.Message {
|
||||
}
|
||||
// Only append fallbacks when RenderedContent is absent — when present, it
|
||||
// already carries the augmented version persisted by the original turn.
|
||||
// Agent-mode turns currently do not persist RenderedContent, so attachments
|
||||
// and image captions would otherwise be invisible to subsequent rounds.
|
||||
// Agent-mode turns do not persist RenderedContent (scope envelopes are
|
||||
// injected only for the current LLM call, not replayed from history).
|
||||
if m.RenderedContent == "" {
|
||||
if captions := extractImageCaptionsFromMessage(m.Images); captions != "" {
|
||||
content += "\n\n[用户上传图片内容]\n" + captions
|
||||
|
||||
Reference in New Issue
Block a user