From d792a89c8c174272b653b62e01158389942677e4 Mon Sep 17 00:00:00 2001 From: Dudu-0223 Date: Mon, 17 Aug 2026 15:57:35 +0800 Subject: [PATCH] test web search title fallback --- packages/web/tool-web/tests/tool-web.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/tool-web/tests/tool-web.spec.ts b/packages/web/tool-web/tests/tool-web.spec.ts index 3b502b4ec9..1c2eea0e21 100644 --- a/packages/web/tool-web/tests/tool-web.spec.ts +++ b/packages/web/tool-web/tests/tool-web.spec.ts @@ -111,6 +111,10 @@ describe('search formatting', () => { it('presents a multi-query search call with a joined title', () => { expect(presentSearchCall({ queries: ['one', 'two'] })).toEqual({ card: 'generic', title: 'one, two', kind: 'search', rawInput: 'one, two' }) }) + + it('presents malformed search arguments with an empty title', () => { + expect(presentSearchCall({})).toEqual({ card: 'generic', title: '', kind: 'search', rawInput: '' }) + }) }) /** Build a completed non-error tool result with the given meta and text content. */