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

Function hasSession

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

Source from the content-addressed store, hash-verified

382 * Check if a session exists for the current terminal
383 */
384export function hasSession(): boolean {
385 const manager = SessionManager.getInstance();
386 if (!manager.hasSession()) {
387 return false;
388 }
389 const sessionFilePath = path.join(
390 getSessionDir(),
391 `${manager.getSessionId()}.json`,
392 );
393 return fs.existsSync(sessionFilePath);
394}
395
396/**
397 * Get metadata from a session file with first user message preview

Callers 1

session.test.tsFile · 0.85

Calls 4

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

Tested by

no test coverage detected