Files
copilotkit__copilotkit/showcase/harness/fixtures/d5/shared-state.json
Jordan Ritter 8d0bc3cd93 fix(showcase): migrate D5 fixtures from turnIndex to hasToolResult
hasToolResult checks whether tool-role messages exist in the request,
correctly disambiguating multi-turn fixtures regardless of the backend
AG-UI implementation's re-invocation behavior.
2026-04-29 19:40:10 -07:00

38 lines
1.1 KiB
JSON

{
"_comment": "D5 multi-turn fixture for /demos/shared-state-read-write. Uses hasToolResult matching: aimock checks for role:tool messages in the request to disambiguate multi-turn fixtures sharing the same userMessage. The 'favorite color' fixture has a unique userMessage and needs no hasToolResult. Fixtures ordered by hasToolResult false→true for readability.",
"fixtures": [
{
"match": {
"userMessage": "remember that my favorite color is blue",
"hasToolResult": false
},
"response": {
"toolCalls": [
{
"id": "call_d5_set_notes_001",
"name": "set_notes",
"arguments": "{\"notes\":[\"Favorite color: blue\"]}"
}
]
}
},
{
"match": {
"userMessage": "remember that my favorite color is blue",
"hasToolResult": true
},
"response": {
"content": "Got it — I have noted that your favorite color is blue."
}
},
{
"match": {
"userMessage": "favorite color"
},
"response": {
"content": "Your favorite color is blue — I noted it earlier."
}
}
]
}