refactor: move search to module

This commit is contained in:
Haileyesus
2026-04-27 21:39:48 +03:00
parent 9a8fb116ef
commit 50ee3c7548
6 changed files with 1017 additions and 778 deletions

View File

@@ -40,7 +40,7 @@ type ConversationSession = {
};
type ConversationProjectResult = {
// Emitted by server/projects.js#searchConversations so the sidebar can map a
// Emitted by the provider search service so the sidebar can map a
// match back to the Project in its current state by projectId.
projectId: string | null;
projectName: string;

View File

@@ -100,7 +100,7 @@ export const api = {
const token = localStorage.getItem('auth-token');
const params = new URLSearchParams({ q: query, limit: String(limit) });
if (token) params.set('token', token);
return `/api/search/conversations?${params.toString()}`;
return `/api/providers/search/sessions?${params.toString()}`;
},
createProject: (projectData) =>
authenticatedFetch('/api/projects/create-project', {