@kolisachint/hoocode-agent 0.5.21 → 0.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import { createCompactionSummaryMessage } from "@kolisachint/hoocode-agent-core"
10
10
  import { Box, CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TUI, } from "@kolisachint/hoocode-tui";
11
11
  import { spawnSync } from "child_process";
12
12
  import { APP_NAME, APP_TITLE, VERSION } from "../../config.js";
13
+ import { setTerminalOwnedByTui } from "../../core/agent-log.js";
13
14
  import { loadAgentRegistry } from "../../core/agent-registry.js";
14
15
  import { parseSkillBlock } from "../../core/agent-session.js";
15
16
  import { sumAssistantUsage } from "../../core/agent-session-stats.js";
@@ -712,6 +713,10 @@ export class InteractiveMode {
712
713
  this.setupEditorSubmitHandler();
713
714
  // Start the UI before initializing extensions so session_start handlers can use interactive dialogs
714
715
  this.ui.start();
716
+ // From here the TUI owns the terminal, so the agent's operational log lines
717
+ // (dispatch, warm fallback, lifeguard) must stop writing to it — a write the
718
+ // renderer did not make desyncs its cursor bookkeeping and duplicates rows.
719
+ setTerminalOwnedByTui(true);
715
720
  this.isInitialized = true;
716
721
  // Initialize extensions first so resources are shown before messages
717
722
  await this.rebindCurrentSession();
@@ -3254,6 +3259,8 @@ export class InteractiveMode {
3254
3259
  }
3255
3260
  if (this.isInitialized) {
3256
3261
  this.ui.stop();
3262
+ // The terminal is ours again: later log lines can print normally.
3263
+ setTerminalOwnedByTui(false);
3257
3264
  this.isInitialized = false;
3258
3265
  }
3259
3266
  }