* 获取所有会话列表
()
| 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 | * 获取会话摘要信息 |
no test coverage detected