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

Method constructor

apps/kimi-code/src/tui/kimi-tui.ts:315–363  ·  view source on GitHub ↗
(harness: KimiHarness, startupInput: KimiTUIStartupInput)

Source from the content-addressed store, hash-verified

313 }
314
315 constructor(harness: KimiHarness, startupInput: KimiTUIStartupInput) {
316 this.harness = harness;
317 const tuiOptions: KimiTUIOptions = {
318 initialAppState: createInitialAppState(startupInput),
319 startup: {
320 sessionFlag: startupInput.cliOptions.session,
321 continueLast: startupInput.cliOptions.continue,
322 yolo: startupInput.cliOptions.yolo,
323 auto: startupInput.cliOptions.auto,
324 plan: startupInput.cliOptions.plan,
325 model: startupInput.cliOptions.model,
326 startupNotice: startupInput.startupNotice,
327 },
328 };
329 this.options = tuiOptions;
330 this.migrationPlan = startupInput.migrationPlan ?? null;
331 this.migrateOnly = startupInput.migrateOnly ?? false;
332 this.startupNotice = startupInput.startupNotice;
333 this.state = createTUIState(tuiOptions);
334 this.uninstallRainbowDance = installRainbowDance(() => {
335 this.state.ui.requestRender();
336 });
337
338 this.reverseRpcDisposers.push(
339 ...registerReverseRPCHandlers(this.approvalController, this.questionController, {
340 showApprovalPanel: (payload) => {
341 this.showApprovalPanel(payload);
342 },
343 hideApprovalPanel: () => {
344 this.hideApprovalPanel();
345 },
346 showQuestionDialog: (payload) => {
347 this.showQuestionDialog(payload);
348 },
349 hideQuestionDialog: () => {
350 this.hideQuestionDialog();
351 },
352 }),
353 );
354 this.streamingUI = new StreamingUIController(this);
355 this.authFlow = new AuthFlowController(this);
356 this.btwPanelController = new BtwPanelController(this);
357 this.sessionEventHandler = new SessionEventHandler(this);
358 this.sessionReplay = new SessionReplayRenderer(this);
359 this.tasksBrowserController = new TasksBrowserController(this);
360 this.editorKeyboard = new EditorKeyboardController(this, this.imageStore);
361 this.editorKeyboard.install();
362 this.buildLayout();
363 }
364
365 // =========================================================================
366 // Autocomplete & Skill Commands

Callers

nothing calls this directly

Calls 12

showApprovalPanelMethod · 0.95
hideApprovalPanelMethod · 0.95
showQuestionDialogMethod · 0.95
hideQuestionDialogMethod · 0.95
buildLayoutMethod · 0.95
createTUIStateFunction · 0.90
installRainbowDanceFunction · 0.90
createInitialAppStateFunction · 0.85
requestRenderMethod · 0.65
installMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected