()
| 442 | } |
| 443 | |
| 444 | private async saveCurrentSession(): Promise<void> { |
| 445 | if (!this.currentSessionId) return; |
| 446 | |
| 447 | const contextData = this.memory.getContext(); |
| 448 | if (contextData) { |
| 449 | await this.persistent.saveContext(this.currentSessionId, contextData); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | private saveCurrentSessionAsync(): void { |
| 454 | // 异步保存,不阻塞主流程 |
no test coverage detected