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

Method destroy

src/agent/ToolComponent.ts:71–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 }
70
71 public async destroy(): Promise<void> {
72 if (!this.isInitialized) {
73 return;
74 }
75
76 try {
77 this.log('销毁工具组件...');
78
79 if (this.toolManager) {
80 this.toolManager.removeAllListeners();
81 }
82
83 this.eventEmitter.removeAllListeners();
84 this.isInitialized = false;
85 this.log('工具组件已销毁');
86 } catch (error) {
87 this.error('工具组件销毁失败', error);
88 throw error;
89 }
90 }
91
92 /**
93 * 获取工具管理器

Callers

nothing calls this directly

Calls 2

logMethod · 0.95
errorMethod · 0.95

Tested by

no test coverage detected