MCPcopy
hub / github.com/AutoMaker-Org/automaker / handleArchiveSession

Function handleArchiveSession

apps/ui/src/components/session-manager.tsx:245–266  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

243
244 // Archive session
245 const handleArchiveSession = async (sessionId: string) => {
246 const api = getElectronAPI();
247 if (!api?.sessions) {
248 logger.error('[SessionManager] Sessions API not available');
249 return;
250 }
251
252 try {
253 const result = await api.sessions.archive(sessionId);
254 if (result.success) {
255 // If the archived session was currently selected, deselect it
256 if (currentSessionId === sessionId) {
257 onSelectSession(null);
258 }
259 await invalidateSessions();
260 } else {
261 logger.error('[SessionManager] Archive failed:', result.error);
262 }
263 } catch (error) {
264 logger.error('[SessionManager] Archive error:', error);
265 }
266 };
267
268 // Unarchive session
269 const handleUnarchiveSession = async (sessionId: string) => {

Callers 1

SessionManagerFunction · 0.70

Calls 1

getElectronAPIFunction · 0.90

Tested by

no test coverage detected