style(client): align prefill test-double members
This commit is contained in:
1 parent
9969555d22
commit
72523e20fb
5 files changed
+23
-9
No files matched your search
@@ -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: () => {},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<ReturnType<typeof bench>>) {
|
||||
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(),
|
||||
|
||||
@@ -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: () => {},
|
||||
|
||||
@@ -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<Recording['start']>(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<SpeechReadiness>({ 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,
|
||||
|
||||
Reference in new issue
Block a user