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

Method cleanup

src/context/ContextManager.ts:374–385  ·  view source on GitHub ↗

* 清理资源

()

Source from the content-addressed store, hash-verified

372 * 清理资源
373 */
374 async cleanup(): Promise<void> {
375 if (this.currentSessionId) {
376 await this.saveCurrentSession();
377 }
378
379 this.memory.clear();
380 this.cache.clear();
381 await this.persistent.cleanupOldSessions();
382
383 this.currentSessionId = null;
384 console.log('上下文管理器资源清理完成');
385 }
386
387 // 私有方法
388

Callers 2

exampleFunction · 0.45
destroyMethod · 0.45

Calls 4

saveCurrentSessionMethod · 0.95
cleanupOldSessionsMethod · 0.80
clearMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected