MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / setEnabled

Method setEnabled

packages/agent-core/src/plugin/manager.ts:142–150  ·  view source on GitHub ↗
(id: string, enabled: boolean)

Source from the content-addressed store, hash-verified

140 }
141
142 async setEnabled(id: string, enabled: boolean): Promise<void> {
143 const key = normalizePluginId(id);
144 const current = this.records.get(key);
145 if (current === undefined) throw new Error(`Plugin "${id}" is not installed`);
146 if (current.enabled === enabled) return;
147 const now = new Date().toISOString();
148 this.records.set(key, { ...current, enabled, updatedAt: now });
149 await this.persist();
150 }
151
152 async setMcpServerEnabled(id: string, server: string, enabled: boolean): Promise<void> {
153 const key = normalizePluginId(id);

Callers 2

manager.test.tsFile · 0.80
setPluginEnabledMethod · 0.80

Calls 4

persistMethod · 0.95
normalizePluginIdFunction · 0.90
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected