MCPcopy
hub / github.com/lobehub/lobehub / confirm

Function confirm

apps/cli/src/utils/format.ts:486–494  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

484}
485
486export function confirm(message: string): Promise<boolean> {
487 const rl = createInterface({ input: process.stdin, output: process.stderr });
488 return new Promise((resolve) => {
489 rl.question(`${message} (y/N) `, (answer: string) => {
490 rl.close();
491 resolve(answer.toLowerCase() === 'y');
492 });
493 });
494}

Callers 15

registerAllowlistCommandFunction · 0.90
registerBotCommandFunction · 0.90
registerTopicCommandFunction · 0.90
registerVerifyCommandFunction · 0.90
registerPluginCommandFunction · 0.90
registerProviderCommandFunction · 0.90
registerKbCommandFunction · 0.90
registerFileCommandFunction · 0.90
registerDocCommandFunction · 0.90

Calls 2

resolveFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected