Files
copilotkit__copilotkit/showcase/harness/fixtures/d5/gen-ui-headless-complete.json
Alem Tuzlak 54715c8e7d chore(showcase/aimock): align headless-complete Highlight and AAPL fixture matchers with pill prompts
Two pill mismatches were silently routing the headless-complete Stock and
Highlight pills to the showcase-assistant catch-all in feature-parity.json:

- The Stock fixture matched 'AAPL trading' but the SuggestionBar pill
  configured by use-headless-suggestions.ts sends 'What's the price of
  AAPL right now?' — substring 'AAPL trading' is not in that prompt.
- The Highlight fixture matched 'Highlight \'meeting at 3pm\'' but neither
  the empty-state pill ('Highlight: ship the demo on Friday') nor the
  SuggestionBar pill ('Highlight this note for me: ...ship the demo on
  Friday...') contains that substring.

Switch both matchers to short distinctive substrings ('AAPL' and
'ship the demo on Friday') that appear verbatim in BOTH the empty-state
and SuggestionBar prompts. The tool-rendering AAPL fixture (matcher
'What\'s the current price of AAPL?') stays at higher priority via
array order — first-match-wins keeps it pinned to the tool-rendering
pill, so substring 'AAPL' here only catches headless-complete pills.
Update narration response text to reference the correct highlighted
phrase.
2026-05-07 21:03:00 +02:00

60 lines
3.0 KiB
JSON

{
"_comment": "D5 fixture for /demos/headless-complete. Five chips: weather (already covered by feature-parity weather fixture), AAPL stock (new — get_stock_price tool), highlight note (new — frontend useComponent), Excalidraw (text fallback so probe stays deterministic without depending on the MCP server), and largest continent (already covered by feature-parity continent fixture). Two-leg fixtures pin BOTH userMessage AND toolCallId on the narration leg, with the more-specific narration fixture placed BEFORE the bare userMessage toolCall fixture in this array. Reason: aimock matches in array order with first-match-wins, and its toolCallId match looks at the LAST tool message in the request — across multi-turn probes that 'last tool' can be a stale id from a previous turn. Pinning narration fixtures with userMessage too prevents one turn's narration from firing for another turn's prompt. Matchers use short distinctive substrings ('AAPL', 'ship the demo on Friday') so they fire for BOTH the empty-state pills (e.g. 'What's AAPL trading at?', 'Highlight: ship the demo on Friday') AND the SuggestionBar pills configured by use-headless-suggestions.ts (e.g. 'What's the price of AAPL right now?', 'Highlight this note for me: ...ship the demo on Friday...'). The tool-rendering AAPL fixture in d5-all.json (matcher 'What\\'s the current price of AAPL?') is more specific and stays at higher priority via array order; substring 'AAPL' here only catches headless-complete pills.",
"fixtures": [
{
"match": {
"userMessage": "AAPL",
"toolCallId": "call_d5_get_stock_price_001"
},
"response": {
"content": "AAPL is trading at $189.42, up 1.27% on the day. The card above shows the live ticker and the percentage change."
}
},
{
"match": {
"userMessage": "AAPL"
},
"response": {
"toolCalls": [
{
"id": "call_d5_get_stock_price_001",
"name": "get_stock_price",
"arguments": "{\"ticker\":\"AAPL\"}"
}
]
}
},
{
"match": {
"userMessage": "ship the demo on Friday",
"toolCallId": "call_d5_highlight_note_001"
},
"response": {
"content": "Highlighted 'ship the demo on Friday' in yellow above. Let me know if you want a different color or a longer note."
}
},
{
"match": {
"userMessage": "ship the demo on Friday"
},
"response": {
"toolCalls": [
{
"id": "call_d5_highlight_note_001",
"name": "highlight_note",
"arguments": "{\"text\":\"ship the demo on Friday\",\"color\":\"yellow\"}"
}
]
}
},
{
"match": {
"userMessage": "Use Excalidraw to sketch"
},
"response": {
"content": "Sketched a simple system diagram for you above — three boxes (frontend, runtime, agent) connected by arrows showing the request flow. Ask if you'd like a different shape or more detail."
}
}
]
}