MCPcopy Create free account
hub / github.com/GCWing/BitFun / enableExtension

Method enableExtension

src/web-ui/src/app/services/AppManager.ts:220–238  ·  view source on GitHub ↗
(extensionId: string)

Source from the content-addressed store, hash-verified

218
219 // Extension management
220 async enableExtension(extensionId: string): Promise<void> {
221 const extensionIndex = this.state.extensions.findIndex(e => e.id === extensionId);
222 if (extensionIndex === -1) {
223 throw new Error(`Extension not found: ${extensionId}`);
224 }
225
226 const updatedExtensions = [...this.state.extensions];
227 updatedExtensions[extensionIndex] = {
228 ...updatedExtensions[extensionIndex],
229 isEnabled: true
230 };
231
232 this.updateState({ extensions: updatedExtensions });
233
234 this.emitEvent({
235 type: 'extension:enabled',
236 payload: updatedExtensions[extensionIndex]
237 });
238 }
239
240 async disableExtension(extensionId: string): Promise<void> {
241 const extensionIndex = this.state.extensions.findIndex(e => e.id === extensionId);

Callers

nothing calls this directly

Calls 2

updateStateMethod · 0.95
emitEventMethod · 0.95

Tested by

no test coverage detected