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

Method runMigrationScreen

apps/kimi-code/src/tui/kimi-tui.ts:2611–2638  ·  view source on GitHub ↗
(plan: MigrationPlan)

Source from the content-addressed store, hash-verified

2609 }
2610
2611 private async runMigrationScreen(plan: MigrationPlan): Promise<MigrationScreenResult> {
2612 const result = await new Promise<MigrationScreenResult>((resolve) => {
2613 const screen = new MigrationScreenComponent({
2614 plan,
2615 sourceHome: plan.sourceHome,
2616 targetHome: this.harness.homeDir,
2617 skipDecisionStep: this.migrateOnly,
2618 requestRender: () => {
2619 this.state.ui.requestRender();
2620 },
2621 onComplete: (r) => {
2622 resolve(r);
2623 },
2624 });
2625 this.mountEditorReplacement(screen);
2626 });
2627 this.restoreEditor();
2628 if (result.decision === 'never') {
2629 // Persist the skip marker `detectPendingMigration` checks, so "Never ask
2630 // again" actually stops the prompt from reappearing every launch.
2631 try {
2632 writeFileSync(join(this.harness.homeDir, '.skip-migration-from-kimi-cli'), '', 'utf-8');
2633 } catch {
2634 // Non-blocking: a failed marker write must never crash startup.
2635 }
2636 }
2637 return result;
2638 }
2639
2640 showHelpPanel(): void {
2641 this.state.activeDialog = 'help';

Callers 1

startMethod · 0.95

Calls 4

restoreEditorMethod · 0.95
requestRenderMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected