Files
copilotkit--copilotkit/showcase/aimock/d6/strands/tool-rendering-default-catchall.json
2026-07-13 12:58:18 +08:00

39 lines
1.8 KiB
JSON

{
"_meta": {
"description": "D6 fixtures for strands / tool-rendering-default-catchall",
"sourceFile": "d5-tool-rendering-default-catchall.ts",
"created": "2026-05-22",
"updated": "2026-06-15",
"note": "Reordered toolCallId-keyed narration BEFORE the tool-emit fixture (first-match-wins) and dropped hasToolResult:false on the tool-emit fixture for consistency with the canonical pattern. Single-prompt demo so hasToolResult:false would still work in isolation, but the canonical shape is more robust to thread-state changes."
},
"fixtures": [
{
"_comment": "tool-rendering-default-catchall — 'forecast for Tokyo' 1st leg: emit get_weather. sequenceIndex:0 gates it to the first match — with stopStreamingAfterResult removed the agent takes a 2nd turn, and Strands' UUID tool ids defeat the old toolCallId follow-up; sequenceIndex is id-invariant so the bare narration below catches the 2nd leg. The built-in default catchall renderer fires for unhandled tools ([data-testid='copilot-tool-render'][data-tool-name='get_weather']).",
"match": {
"userMessage": "forecast for Tokyo",
"sequenceIndex": 0,
"context": "strands"
},
"response": {
"toolCalls": [
{
"id": "call_d6_default_catchall_weather_001",
"name": "get_weather",
"arguments": "{\"location\":\"Tokyo\"}"
}
]
}
},
{
"_comment": "tool-rendering-default-catchall — 'forecast for Tokyo' 2nd leg: narration after get_weather (sequenceIndex:0 exhausted).",
"match": {
"userMessage": "forecast for Tokyo",
"context": "strands"
},
"response": {
"content": "Tokyo is 22°C and partly cloudy with light easterly winds."
}
}
]
}