fix: add card_id to google_search and web_search_deep ui.push for precise matching
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 40s

Each search result card now carries a unique card_id containing the tool call id
(e.g. google-search-<tc.id>), enabling the ToolCallStatus exact-match logic to
correctly bind cards to their originating tool call without index-based offset errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-13 00:26:49 +08:00
co-authored by Claude Sonnet 4.6
parent 869d3d54f9
commit 2830024cb9
@@ -59,6 +59,7 @@ export async function toolExecutorNode(
switch (name) {
case "google_search": {
const parsed = googleSearchSchema.parse(args);
const googleCardId = `google-search-${tc.id}`;
let results: Array<{ title: string; url: string; snippet: string }>;
let knowledgeGraph: { title: string; description: string } | undefined;
let fallbackUsed = false;
@@ -103,6 +104,7 @@ export async function toolExecutorNode(
{
name: "search-result",
props: {
card_id: googleCardId,
query: parsed.query,
total: results.length,
results,
@@ -139,6 +141,7 @@ export async function toolExecutorNode(
case "web_search_deep": {
const parsed = webSearchDeepSchema.parse(args);
const deepCardId = `web-search-deep-${tc.id}`;
let enriched: Array<{ title: string; url: string; snippet: string }>;
let fallbackUsed = false;
let readerAllFailed = false;
@@ -202,6 +205,7 @@ export async function toolExecutorNode(
{
name: "search-result",
props: {
card_id: deepCardId,
query: parsed.query,
total: enriched.length,
results: enriched,