MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / listSessions

Function listSessions

scripts/tmux/tmux-viewer/session-loader.ts:25–38  ·  view source on GitHub ↗
(projectRoot: string)

Source from the content-addressed store, hash-verified

23 * Find available sessions in the debug directory
24 */
25export async function listSessions(projectRoot: string): Promise<string[]> {
26 const sessionsDir = path.join(projectRoot, DEFAULT_SESSION_DIR)
27
28 try {
29 const entries = await fs.readdir(sessionsDir, { withFileTypes: true })
30 return entries
31 .filter((entry) => entry.isDirectory())
32 .map((entry) => entry.name)
33 .sort()
34 .reverse() // Most recent first (timestamp-based names)
35 } catch {
36 return []
37 }
38}
39
40/**
41 * Load session info from session-info.yaml

Callers 2

mainFunction · 0.90
runViewerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected