feat: deleting from sidebar will now ask whether to remove all data as well

This commit is contained in:
simosmik
2026-04-16 09:05:56 +00:00
parent 289520814c
commit e9c7a5041c
11 changed files with 135 additions and 112 deletions

View File

@@ -89,10 +89,15 @@ export const api = {
authenticatedFetch(`/api/gemini/sessions/${sessionId}`, {
method: 'DELETE',
}),
deleteProject: (projectName, force = false) =>
authenticatedFetch(`/api/projects/${projectName}${force ? '?force=true' : ''}`, {
deleteProject: (projectName, force = false, deleteData = false) => {
const params = new URLSearchParams();
if (force) params.set('force', 'true');
if (deleteData) params.set('deleteData', 'true');
const qs = params.toString();
return authenticatedFetch(`/api/projects/${projectName}${qs ? `?${qs}` : ''}`, {
method: 'DELETE',
}),
});
},
searchConversationsUrl: (query, limit = 50) => {
const token = localStorage.getItem('auth-token');
const params = new URLSearchParams({ q: query, limit: String(limit) });