From 72523e20fb8a343e7f58f36192bb00a6e2018d02 Mon Sep 17 00:00:00 2001 From: liukx0205 Date: Thu, 29 Oct 2026 23:42:45 +0800 Subject: [PATCH] style(client): align prefill test-double members --- .../ui-chat/tests/chat-view.client.spec.tsx | 3 ++- .../tests/conversation-ui.client.spec.tsx | 3 ++- .../ui-trajectory/tests/views.client.spec.tsx | 6 ++++-- .../tests/workflow-run.client.spec.tsx | 3 ++- .../tests/voice-input.client.spec.tsx | 17 +++++++++++++---- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/packages/client/ui-chat/tests/chat-view.client.spec.tsx b/packages/client/ui-chat/tests/chat-view.client.spec.tsx index 505d7c17eb..aa46d1d1d3 100644 --- a/packages/client/ui-chat/tests/chat-view.client.spec.tsx +++ b/packages/client/ui-chat/tests/chat-view.client.spec.tsx @@ -497,7 +497,8 @@ function makeHarness( insertQuote: () => false, captureInsertion: () => ({ start: 0, end: 0, draftRev: 0 }), insertText: () => false, - setDraft: () => {}, prefill: () => false, + setDraft: () => {}, + prefill: () => false, persistDraft: () => {}, addAttachments: () => true, removeAttachment: () => {}, diff --git a/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx b/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx index e4599000eb..b241fa8514 100644 --- a/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx +++ b/packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx @@ -104,7 +104,8 @@ function props( insertQuote: () => false, captureInsertion: unused, insertText: unused, - setDraft: unused, prefill: unused, + setDraft: unused, + prefill: unused, persistDraft: unused, addAttachments: unused, removeAttachment: unused, diff --git a/packages/client/ui-trajectory/tests/views.client.spec.tsx b/packages/client/ui-trajectory/tests/views.client.spec.tsx index 56bd6d34c7..40343ea5d3 100644 --- a/packages/client/ui-trajectory/tests/views.client.spec.tsx +++ b/packages/client/ui-trajectory/tests/views.client.spec.tsx @@ -218,7 +218,8 @@ function standaloneProps( insertQuote: () => false, captureInsertion: () => ({ start: 0, end: 0, draftRev: 0 }), insertText: () => false, - setDraft: () => {}, prefill: () => false, + setDraft: () => {}, + prefill: () => false, persistDraft: () => {}, addAttachments: () => false, removeAttachment: () => {}, @@ -355,7 +356,8 @@ function mount(fixture: Awaited>) { insertQuote: () => false, captureInsertion: () => ({ start: 0, end: 0, draftRev: 0 }), insertText: () => false, - setDraft: vi.fn(), prefill: vi.fn(() => false), + setDraft: vi.fn(), + prefill: vi.fn(() => false), persistDraft: vi.fn(), addAttachments: vi.fn(() => false), removeAttachment: vi.fn(), diff --git a/packages/client/ui-workflow-run/tests/workflow-run.client.spec.tsx b/packages/client/ui-workflow-run/tests/workflow-run.client.spec.tsx index 47032911fa..9e7de91d5f 100644 --- a/packages/client/ui-workflow-run/tests/workflow-run.client.spec.tsx +++ b/packages/client/ui-workflow-run/tests/workflow-run.client.spec.tsx @@ -353,7 +353,8 @@ function panelProps(data: WorkflowRunChatData, sessions = listState(), openSessi insertQuote: () => false, captureInsertion: () => ({ start: 0, end: 0, draftRev: 0 }), insertText: () => false, - setDraft: () => {}, prefill: () => false, + setDraft: () => {}, + prefill: () => false, persistDraft: () => {}, addAttachments: () => false, removeAttachment: () => {}, diff --git a/packages/experimental/client-ui-voice-input/tests/voice-input.client.spec.tsx b/packages/experimental/client-ui-voice-input/tests/voice-input.client.spec.tsx index 8a8bc5597c..36e767c8ec 100644 --- a/packages/experimental/client-ui-voice-input/tests/voice-input.client.spec.tsx +++ b/packages/experimental/client-ui-voice-input/tests/voice-input.client.spec.tsx @@ -21,10 +21,19 @@ const transcript: Transcript = { text: '检查 TypeScript 类型', audioSeconds: function fixture(recording?: Recording, navigable = true) { const capture = Object.assign(new Recording(() => {}), { start: vi.fn(async () => {}), stop: vi.fn(async () => new Uint8Array(48)), amplitude: () => 0, dispose: vi.fn(async () => {}) }) - const inputActions = { notify: vi.fn(), insertQuote: () => false, - captureInsertion: vi.fn(() => ({ start: 3, end: 3, draftRev: 1 })), insertText: vi.fn(() => true), - setDraft: vi.fn(), prefill: vi.fn(() => false), persistDraft: vi.fn(), addAttachments: vi.fn(() => true), removeAttachment: vi.fn(), - pruneAttachments: vi.fn(), submit: vi.fn() } + const inputActions = { + notify: vi.fn(), + insertQuote: () => false, + captureInsertion: vi.fn(() => ({ start: 3, end: 3, draftRev: 1 })), + insertText: vi.fn(() => true), + setDraft: vi.fn(), + prefill: vi.fn(() => false), + persistDraft: vi.fn(), + addAttachments: vi.fn(() => true), + removeAttachment: vi.fn(), + pruneAttachments: vi.fn(), + submit: vi.fn(), + } const readiness = createSnapshotStore({ connected: true, error: null, catalog: { providers: [{ id, name: 'SenseVoiceSmall', location: 'host-local', languages: ['auto', 'zh', 'en', 'ja'], preparation: { phase: 'ready' } }], selection: { providerId: id, language: 'auto' }, maxAudioBytes: 100, maxDurationSeconds: 120,