(harness: KimiHarness, startupInput: KimiTUIStartupInput)
| 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 |
nothing calls this directly
no test coverage detected