mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
fix(showcase/aimock/d6): strip toolName gate + dead turnIndex:0 content fallbacks in 7 catchall fixtures
ag2/claude-sdk-typescript/google-adk/langgraph-fastapi/langgraph-typescript/mastra/ms-agent-dotnet: AAPL is turn-1 so turnIndex:0 fallback unreachable; toolName gate fails on wildcard-renderer integrations that don't register get_stock_price. Aligned to LGP-gold pattern (userMessage+context discriminator, no toolName, no turnIndex:0 fallback). Preserved legitimate multi-pill matchers (SF/flights/d20/chain) on the 4 multi-pill integrations. (cherry picked from commit c10821b5d904b31bee2ab2a39db3b1565aecba26)
This commit is contained in:
@@ -6,21 +6,20 @@
|
||||
},
|
||||
"fixtures": [
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo follow-up. After get_weather tool result returns, emit narrated content. MUST come before the tool-emitting fixture so iteration 2 hits this branch.",
|
||||
"_comment": "tool-rendering-custom-catchall — weather in Tokyo follow-up. After get_weather tool result returns, emit narrated content. MUST come before the tool-emitting fixture so iteration 2 hits this branch.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolCallId": "call_d6_cc_weather_001",
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
"content": "Tokyo is 22\u00b0C and partly cloudy \u2014 rendered through the custom wildcard catchall."
|
||||
"content": "Tokyo is 22°C and partly cloudy — rendered through the custom wildcard catchall."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"_comment": "tool-rendering-custom-catchall — weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
@@ -34,32 +33,20 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"_comment": "tool-rendering-custom-catchall — AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolCallId": "call_d6_cc_stock_001",
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% \u2014 rendered through the custom wildcard catchall."
|
||||
"content": "AAPL is trading at $338.37, down 2.96% — rendered through the custom wildcard catchall."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"_comment": "tool-rendering-custom-catchall — AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
@@ -71,17 +58,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "ag2"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall pill 1: weather in Tokyo \u2014 first leg: emit get_weather tool call. The custom catchall renderer fires for this tool since no per-tool renderer is registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "claude-sdk-typescript"
|
||||
},
|
||||
"response": {
|
||||
@@ -65,7 +64,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall pill 2: AAPL stock price \u2014 first leg: emit get_stock_price tool call.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "claude-sdk-typescript"
|
||||
},
|
||||
"response": {
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "google-adk"
|
||||
},
|
||||
"response": {
|
||||
@@ -34,17 +33,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "google-adk"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
@@ -60,7 +48,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "google-adk"
|
||||
},
|
||||
"response": {
|
||||
@@ -73,17 +60,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "google-adk"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "Chain tools \u2014 follow-up after all 3 tools ran. Anchored on whichever of the 3 chain toolCallIds appears last in the request (LangGraph's ToolNode preserves tool_calls order). MUST come before the toolCalls-emitting fixture below so iteration 2 of the chain-tools loop hits this branch instead of re-emitting.",
|
||||
"match": {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "langgraph-fastapi"
|
||||
},
|
||||
"response": {
|
||||
@@ -33,17 +32,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "langgraph-fastapi"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
@@ -59,7 +47,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "langgraph-fastapi"
|
||||
},
|
||||
"response": {
|
||||
@@ -72,17 +59,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "langgraph-fastapi"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "custom-catchall \u2014 Weather in SF pill. get_weather tool call. Same tools as tool-rendering but the frontend registers a single branded wildcard renderer via useDefaultRenderTool.",
|
||||
"match": {
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "langgraph-typescript"
|
||||
},
|
||||
"response": {
|
||||
@@ -35,17 +34,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "langgraph-typescript"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
@@ -61,7 +49,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "langgraph-typescript"
|
||||
},
|
||||
"response": {
|
||||
@@ -74,17 +61,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "langgraph-typescript"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "Chain tools \u2014 follow-up content after all 3 tool results return (gated on whichever chained id arrives last).",
|
||||
"match": {
|
||||
|
||||
@@ -7,21 +7,20 @@
|
||||
},
|
||||
"fixtures": [
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo follow-up. After get_weather tool result returns, emit narrated content. MUST come before the tool-emitting fixture so iteration 2 hits this branch.",
|
||||
"_comment": "tool-rendering-custom-catchall — weather in Tokyo follow-up. After get_weather tool result returns, emit narrated content. MUST come before the tool-emitting fixture so iteration 2 hits this branch.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolCallId": "call_d6_cc_weather_001",
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
"content": "Tokyo is 22\u00b0C and partly cloudy \u2014 rendered through the custom wildcard catchall."
|
||||
"content": "Tokyo is 22°C and partly cloudy — rendered through the custom wildcard catchall."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"_comment": "tool-rendering-custom-catchall — weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
@@ -35,32 +34,20 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"_comment": "tool-rendering-custom-catchall — AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolCallId": "call_d6_cc_stock_001",
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% \u2014 rendered through the custom wildcard catchall."
|
||||
"content": "AAPL is trading at $338.37, down 2.96% — rendered through the custom wildcard catchall."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"_comment": "tool-rendering-custom-catchall — AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
@@ -72,17 +59,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "mastra"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo (first turn). Emits get_weather tool call. The custom wildcard renderer fires for this tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_weather'].",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"toolName": "get_weather",
|
||||
"context": "ms-agent-dotnet"
|
||||
},
|
||||
"response": {
|
||||
@@ -34,17 +33,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 weather in Tokyo fallback when no get_weather tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Forecast Tokyo through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "ms-agent-dotnet"
|
||||
},
|
||||
"response": {
|
||||
"content": "The weather in Tokyo is currently 22\u00b0C with partly cloudy skies."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price follow-up. After get_stock_price tool result returns. MUST come before the tool-emitting fixture.",
|
||||
"match": {
|
||||
@@ -60,7 +48,6 @@
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL stock price (second turn). Emits get_stock_price tool call. The custom wildcard renderer fires for this DIFFERENT tool and renders [data-testid='custom-wildcard-card'][data-tool-name='get_stock_price']. The cross-tool assertion verifies both tool names rendered through the same testid.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"toolName": "get_stock_price",
|
||||
"context": "ms-agent-dotnet"
|
||||
},
|
||||
"response": {
|
||||
@@ -73,17 +60,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "tool-rendering-custom-catchall \u2014 AAPL fallback when no get_stock_price tool registered.",
|
||||
"match": {
|
||||
"userMessage": "Quote AAPL through the wildcard renderer",
|
||||
"turnIndex": 0,
|
||||
"context": "ms-agent-dotnet"
|
||||
},
|
||||
"response": {
|
||||
"content": "AAPL is trading at $338.37, down 2.96% on the day."
|
||||
}
|
||||
},
|
||||
{
|
||||
"_comment": "Chain tools \u2014 follow-up after all 3 tools ran. Anchored on whichever of the 3 chain toolCallIds appears last in the request (LangGraph's ToolNode preserves tool_calls order). MUST come before the toolCalls-emitting fixture below so iteration 2 of the chain-tools loop hits this branch instead of re-emitting.",
|
||||
"match": {
|
||||
|
||||
Reference in New Issue
Block a user