MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / confirmDeleteSession

Function confirmDeleteSession

src/components/sidebar/SessionList.tsx:61–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 };
60
61 const confirmDeleteSession = async () => {
62 if (!deleteTarget) return;
63 const sessionId = deleteTarget;
64 setDeleteTarget(null);
65
66 const wasActive = activeSessionId === sessionId;
67 removeSession(sessionId);
68 if (wasActive) {
69 useChatStore.getState().setMessages([]);
70 useAgentStore.getState().setAgentRuns([]);
71 }
72
73 try {
74 await invoke('delete_session', { id: sessionId });
75 } catch (error) {
76 console.error('Failed to persist session deletion:', error);
77 }
78 };
79
80 if (projects.length === 0) {
81 return (

Callers 1

SessionListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected