From 60a3cbeb8ee4c11c0352507f7851f60d814f790f Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Thu, 30 Jul 2026 21:26:37 +0800 Subject: [PATCH] fix(client-connection): drop content copy from fixture web views after base merge The base (feat/web-presenter) removed the content field from WebSearchResultView/WebFetchResultView: the web card carries no content copy and a capability-less UI falls back to the raw tool/result content (web-result-card note). The fixture still constructed both web result views with a content field, failing the e2e build with TS2353. Drop the content spread and the stale Omit key; the fixture already emits the same text as the tool/result content the fallback path renders. --- .../client/connection/src/client/fixture.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/client/connection/src/client/fixture.ts b/packages/client/connection/src/client/fixture.ts index cc8332d081..587f873b74 100644 --- a/packages/client/connection/src/client/fixture.ts +++ b/packages/client/connection/src/client/fixture.ts @@ -143,9 +143,9 @@ const TERMINAL_EXIT_STATUS: Record, 'card' | 'kind' | 'content'> = { +const WEB_SEARCH_RESULT: Omit, 'card' | 'kind'> = { answer: 'DeepSeek Harness is a plugin-based agent harness on vendored Cordis where **every capability is a plugin**.', sources: [ { @@ -168,7 +168,7 @@ const WEB_SEARCH_RESULT: Omit, 'card' | 'kind' | 'content'> = { +const WEB_FETCH_RESULT: Omit, 'card' | 'kind'> = { url: 'https://www.deepseek.com/blog/harness-architecture', statusCode: 200, truncated: false, @@ -402,14 +402,15 @@ function presentResult(name: string, argsRaw: string, resultText: string): ToolR const call = presentCall(name, argsRaw) if (call === undefined) return undefined // The web tools keep a generic pending card, so their result card is chosen - // by tool name rather than by the pending card tag: the structured `web` - // card the frontend consumes, with the model-facing text kept as the - // capability-less fallback content. + // by tool name rather than by the pending card tag: the structured `web` card + // the frontend consumes. The view carries no `content` copy (per the contract + // and the web-result-card note); a capability-less UI falls back to the raw + // `tool/result` content, which this fixture emits from `resultText`. if (name === 'web_search') { - return { card: 'web', kind: 'search', ...WEB_SEARCH_RESULT, content: text(resultText) } + return { card: 'web', kind: 'search', ...WEB_SEARCH_RESULT } } if (name === 'web_fetch') { - return { card: 'web', kind: 'fetch', ...WEB_FETCH_RESULT, content: text(resultText) } + return { card: 'web', kind: 'fetch', ...WEB_FETCH_RESULT } } switch (call.card) { case 'terminal':