( host: SlashCommandHost, selection: PluginMcpSelection, )
| 415 | } |
| 416 | |
| 417 | async function handlePluginMcpSelection( |
| 418 | host: SlashCommandHost, |
| 419 | selection: PluginMcpSelection, |
| 420 | ): Promise<void> { |
| 421 | switch (selection.kind) { |
| 422 | case 'toggle': |
| 423 | await host.requireSession().setPluginMcpServerEnabled( |
| 424 | selection.pluginId, |
| 425 | selection.server, |
| 426 | selection.enabled, |
| 427 | ); |
| 428 | await showPluginMcpPicker(host, selection.pluginId, { |
| 429 | selectedServer: selection.server, |
| 430 | serverHint: { |
| 431 | server: selection.server, |
| 432 | text: pluginInlineChangeHint(), |
| 433 | }, |
| 434 | }); |
| 435 | return; |
| 436 | case 'back': |
| 437 | await showPluginsPicker(host, { selectedId: selection.pluginId }); |
| 438 | return; |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | async function removePlugin(host: SlashCommandHost, id: string): Promise<void> { |
| 443 | await host.requireSession().removePlugin(id); |
no test coverage detected