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

Function confirmRemovePlugin

apps/kimi-code/src/tui/commands/plugins.ts:253–273  ·  view source on GitHub ↗
(host: SlashCommandHost, id: string)

Source from the content-addressed store, hash-verified

251}
252
253async function confirmRemovePlugin(host: SlashCommandHost, id: string): Promise<boolean> {
254 let displayName = id;
255 try {
256 displayName = (await host.requireSession().getPluginInfo(id)).displayName;
257 } catch {
258 // Keep the confirmation available even when plugin details cannot be loaded.
259 }
260
261 return new Promise((resolveConfirmed) => {
262 host.mountEditorReplacement(
263 new PluginRemoveConfirmComponent({
264 id,
265 displayName,
266 onDone: (result: PluginRemoveConfirmResult) => {
267 host.restoreEditor();
268 resolveConfirmed(result.kind === 'confirm');
269 },
270 }),
271 );
272 });
273}
274
275async function confirmInstallTrust(
276 host: SlashCommandHost,

Callers 2

handlePluginsCommandFunction · 0.85

Calls 4

requireSessionMethod · 0.65
restoreEditorMethod · 0.65
getPluginInfoMethod · 0.45

Tested by

no test coverage detected