Implementing app search feature (#1302)
This PR implements app search feature and addresses the issue #1182. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a fast app search with a command-style dialog so users can find apps by name or chat content and jump to them quickly. Implements the search experience requested in #1182. - New Features - Search dialog (Ctrl+K or “Search Apps” button) with result snippets from matching chat titles/messages. - Searches across app names, chat titles, and message content; case-insensitive; supports partial matches; empty query lists all apps. - Selecting a result navigates to the app and closes the dialog. - New IPC endpoint search-app with Zod-validated results, debounced React Query hook, and preload allowlist update. - Added E2E tests for dialog open/close, shortcuts, matching behavior, empty state, and navigation. <!-- End of auto-generated description by cubic. -->
This commit is contained in:
committed by
GitHub
parent
2edd122d9b
commit
a547aa3ac1
@@ -44,6 +44,20 @@ export type ChatSearchResult = z.infer<typeof ChatSearchResultSchema>;
|
||||
|
||||
export const ChatSearchResultsSchema = z.array(ChatSearchResultSchema);
|
||||
|
||||
// Zod schema for app search result objects returned by the search-app IPC
|
||||
export const AppSearchResultSchema = z.object({
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
createdAt: z.date(),
|
||||
matchedChatTitle: z.string().nullable(),
|
||||
matchedChatMessage: z.string().nullable(),
|
||||
});
|
||||
|
||||
// Type derived from AppSearchResultSchema
|
||||
export type AppSearchResult = z.infer<typeof AppSearchResultSchema>;
|
||||
|
||||
export const AppSearchResultsSchema = z.array(AppSearchResultSchema);
|
||||
|
||||
const providers = [
|
||||
"openai",
|
||||
"anthropic",
|
||||
|
||||
Reference in New Issue
Block a user