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

Function handlePluginMcpSelection

apps/kimi-code/src/tui/commands/plugins.ts:417–440  ·  view source on GitHub ↗
(
  host: SlashCommandHost,
  selection: PluginMcpSelection,
)

Source from the content-addressed store, hash-verified

415}
416
417async 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
442async function removePlugin(host: SlashCommandHost, id: string): Promise<void> {
443 await host.requireSession().removePlugin(id);

Callers 1

showPluginMcpPickerFunction · 0.85

Calls 5

showPluginMcpPickerFunction · 0.85
pluginInlineChangeHintFunction · 0.85
showPluginsPickerFunction · 0.85
requireSessionMethod · 0.65

Tested by

no test coverage detected