MCPcopy Create free account
hub / github.com/echoVic/blade-code / listSessions

Method listSessions

src/context/storage/PersistentStore.ts:101–112  ·  view source on GitHub ↗

* 获取所有会话列表

()

Source from the content-addressed store, hash-verified

99 * 获取所有会话列表
100 */
101 async listSessions(): Promise<string[]> {
102 try {
103 const sessionsDir = path.join(this.storagePath, 'sessions');
104 const files = await fs.readdir(sessionsDir);
105 return files
106 .filter(file => file.endsWith('.json'))
107 .map(file => file.replace('.json', ''))
108 .sort();
109 } catch (error) {
110 return [];
111 }
112 }
113
114 /**
115 * 获取会话摘要信息

Callers 3

cleanupOldSessionsMethod · 0.95
getStorageStatsMethod · 0.95
searchSessionsMethod · 0.80

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected