fix(tui): honor file reference boundaries

This commit is contained in:
Yichen Jiang
2026-07-23 19:21:02 +08:00
parent c37892f753
commit 01dcc7920c
4 changed files with 60 additions and 13 deletions

View File

@@ -2485,7 +2485,7 @@ export function createTuiChat(
// Tool visibility can change dynamically or by agent scope. Empty
// sections are omitted by renderPrompt, so guidance never names a tool
// that this agent cannot call.
text: () => agent.ctx.tools.get('read') === undefined ? '' : FILE_REFERENCE_PROMPT,
text: () => agent.ctx.tools.get('read', agent) === undefined ? '' : FILE_REFERENCE_PROMPT,
})
})