mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 10:08:46 +02:00
Assistant: suppress repeated render-tool calls
After the client returns a render tool's result, the model sometimes re-issues the identical call with a fresh id on the follow-up run, painting a second copy of the spending-summary card (observed live on MAF 1.10 / CK 1.62). DeduplicateToolCallMiddleware now tracks which render tools already ran in the current user turn and drops repeats — their streamed TOOL_CALL_* events and their entries in the run's MESSAGES_SNAPSHOT. The system prompt also tells the model the card is already displayed once its "ok" result is present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,9 @@ Generative UI — render tools:
|
||||
nothing. The rendered card IS the complete response. Any text you write in
|
||||
the same message as a render call will appear as a duplicate below the
|
||||
card, which is wrong.
|
||||
- When a render_spending_summary tool result ("ok") is already present for
|
||||
the current question, the card is already on screen. Do NOT call the tool
|
||||
again and do NOT add text — end your response with no further output.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user