feat: add bulk delete for session manager (#1693)

* feat: add bulk delete for session manager

* fix: address batch delete review issues

* fix: keep session list in sync after batch delete
This commit is contained in:
Alexlangl
2026-03-30 22:15:57 +08:00
committed by GitHub
parent 4f7ea76347
commit 8e2ffbc845
11 changed files with 960 additions and 218 deletions
+23
View File
@@ -129,6 +129,29 @@ export const handlers = [
return success(deleteSession(providerId, sessionId, sourcePath));
}),
http.post(`${TAURI_ENDPOINT}/delete_sessions`, async ({ request }) => {
const { items = [] } = await withJson<{
items?: {
providerId: string;
sessionId: string;
sourcePath: string;
}[];
}>(request);
return success(
items.map((item) => ({
providerId: item.providerId,
sessionId: item.sessionId,
sourcePath: item.sourcePath,
success: deleteSession(
item.providerId,
item.sessionId,
item.sourcePath,
),
})),
);
}),
// MCP APIs
http.post(`${TAURI_ENDPOINT}/get_mcp_config`, async ({ request }) => {
const { app } = await withJson<{ app: AppId }>(request);