From 059cac2848cfa564f9657e09045ee75ebee9d6f8 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 20 Nov 2026 16:20:00 +0100 Subject: [PATCH] ui: search message content and Discover models from the search dialog (#32670) * ui: search message content and Discover models from the search dialog The search dialog matched chat titles only. It now also scans what was said in each chat (content, reasoning, tool calls and results, attachment names and text), newest chat first, stopping at the first match per chat and after 20 chats, and shows a snippet around the match. Ids, timestamps and base64 payloads are not searched. With Discover on, it also lists matching catalog models and, once typing settles, Hugging Face repos; picking one opens Discover on that repo. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep the search dialog one width whatever it lists The shared dialog sizes itself to its content from md up, so the search was narrow while empty and widened as results came in. It now takes the full max-w-2xl there, less a margin on narrower windows. Assisted-by: Claude (Opus 5.5 Medium) --- .../app/dialogs/DialogSearch.svelte | 267 ++++++++++++++++-- .../conversation-search.constants.ts | 28 ++ ui/apps/chat/src/lib/constants/index.ts | 1 + .../services/conversation-search.service.ts | 70 +++++ ui/apps/chat/src/lib/services/index.ts | 4 + .../stores/models-discover/index.svelte.ts | 47 +-- .../chat/src/lib/utils/conversation-search.ts | 116 ++++++++ ...conversation-search.service.svelte.test.ts | 92 ++++++ .../tests/unit/conversation-search.test.ts | 91 ++++++ 9 files changed, 667 insertions(+), 49 deletions(-) create mode 100644 ui/apps/chat/src/lib/constants/conversation-search.constants.ts create mode 100644 ui/apps/chat/src/lib/services/conversation-search.service.ts create mode 100644 ui/apps/chat/src/lib/utils/conversation-search.ts create mode 100644 ui/apps/chat/tests/client/conversation-search.service.svelte.test.ts create mode 100644 ui/apps/chat/tests/unit/conversation-search.test.ts diff --git a/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte b/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte index 077a6583e..9a241af28 100644 --- a/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte +++ b/ui/apps/chat/src/lib/components/app/dialogs/DialogSearch.svelte @@ -1,8 +1,23 @@