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

Function confirmInstallTrust

apps/kimi-code/src/tui/commands/plugins.ts:275–294  ·  view source on GitHub ↗
(
  host: SlashCommandHost,
  label: string,
  official: boolean,
)

Source from the content-addressed store, hash-verified

273}
274
275async function confirmInstallTrust(
276 host: SlashCommandHost,
277 label: string,
278 official: boolean,
279): Promise<boolean> {
280 // Kimi-built official plugins are trusted implicitly; anything else requires
281 // the user to explicitly opt in via the trust prompt.
282 if (official) return true;
283 return new Promise((resolveConfirmed) => {
284 host.mountEditorReplacement(
285 new PluginInstallTrustConfirmComponent({
286 label,
287 onDone: (result: PluginInstallTrustConfirmResult) => {
288 host.restoreEditor();
289 resolveConfirmed(result.kind === 'confirm');
290 },
291 }),
292 );
293 });
294}
295
296async function installFromPanel(
297 host: SlashCommandHost,

Callers 2

handlePluginsCommandFunction · 0.85
installFromPanelFunction · 0.85

Calls 2

restoreEditorMethod · 0.65

Tested by

no test coverage detected