MCPcopy Index your code
hub / github.com/continuedev/continue / clearSession

Function clearSession

extensions/cli/src/session.ts:363–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

361 * Clear the current session
362 */
363export function clearSession(): void {
364 try {
365 const manager = SessionManager.getInstance();
366 if (manager.hasSession()) {
367 const sessionFilePath = path.join(
368 getSessionDir(),
369 `${manager.getSessionId()}.json`,
370 );
371 if (fs.existsSync(sessionFilePath)) {
372 fs.unlinkSync(sessionFilePath);
373 }
374 manager.clear();
375 }
376 } catch (error) {
377 logger.error("Error clearing session:", error);
378 }
379}
380
381/**
382 * Check if a session exists for the current terminal

Callers 1

session.test.tsFile · 0.85

Calls 6

getSessionDirFunction · 0.85
hasSessionMethod · 0.80
errorMethod · 0.80
getInstanceMethod · 0.45
getSessionIdMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected