(extensionId: string)
| 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); |
nothing calls this directly
no test coverage detected