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

Function finish

apps/kimi-code/src/cli/run-prompt.ts:441–451  ·  view source on GitHub ↗
(error?: Error)

Source from the content-addressed store, hash-verified

439
440 return new Promise<void>((resolve, reject) => {
441 const finish = (error?: Error): void => {
442 if (settled) return;
443 settled = true;
444 unsubscribe?.();
445 outputWriter.finish();
446 if (error !== undefined) {
447 reject(error);
448 return;
449 }
450 resolve();
451 };
452
453 unsubscribe = session.onEvent((event) => {
454 if (event.type === 'error') {

Callers 1

runPromptTurnFunction · 0.70

Calls 3

rejectFunction · 0.85
finishMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected