omnius 1.0.684 → 1.0.686

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.
package/dist/index.js CHANGED
@@ -102981,8 +102981,8 @@ var init_safe_python = __esm({
102981
102981
  if (!math.unsupported) {
102982
102982
  return { success: false, output: "", error: `math error: ${math.error}`, durationMs: dur() };
102983
102983
  }
102984
- const disabled = process.env["OMNIUS_DISABLE_SANDBOXED_PYTHON"] === "1";
102985
- if (!this.allowSandboxed || disabled) {
102984
+ const disabled2 = process.env["OMNIUS_DISABLE_SANDBOXED_PYTHON"] === "1";
102985
+ if (!this.allowSandboxed || disabled2) {
102986
102986
  return {
102987
102987
  success: false,
102988
102988
  output: "",
@@ -697287,7 +697287,7 @@ import {
697287
697287
  import { fileURLToPath as fileURLToPath24 } from "node:url";
697288
697288
  import { join as join143 } from "node:path";
697289
697289
  function startIdleMemoryMaintenance(options2) {
697290
- const disabled = process.env["OMNIUS_DISABLE_IDLE_MEMORY_MAINTENANCE"] === "1";
697290
+ const disabled2 = process.env["OMNIUS_DISABLE_IDLE_MEMORY_MAINTENANCE"] === "1";
697291
697291
  let lastActivity = Date.now();
697292
697292
  let worker2 = null;
697293
697293
  let cancelledRunId = null;
@@ -697355,7 +697355,7 @@ function startIdleMemoryMaintenance(options2) {
697355
697355
  }
697356
697356
  };
697357
697357
  const maybeStart = () => {
697358
- if (disabled || worker2) return;
697358
+ if (disabled2 || worker2) return;
697359
697359
  if (options2.isBusy()) {
697360
697360
  lastActivity = Date.now();
697361
697361
  stopWorker();
@@ -697374,7 +697374,7 @@ function startIdleMemoryMaintenance(options2) {
697374
697374
  if (options2.isBusy()) stopWorker();
697375
697375
  },
697376
697376
  triggerAfterTask() {
697377
- if (disabled) return;
697377
+ if (disabled2) return;
697378
697378
  markDirty(options2.repoRoot);
697379
697379
  lastActivity = Date.now();
697380
697380
  },
@@ -700101,8 +700101,8 @@ function defaultConsensusModel(primaryModel) {
700101
700101
  return "base";
700102
700102
  }
700103
700103
  function resolveAsrConsensusModel(primaryModel) {
700104
- const disabled = String(process.env["OMNIUS_ASR_DISABLE_CONSENSUS"] ?? "").trim().toLowerCase();
700105
- if (disabled === "1" || disabled === "true" || disabled === "yes" || disabled === "on") {
700104
+ const disabled2 = String(process.env["OMNIUS_ASR_DISABLE_CONSENSUS"] ?? "").trim().toLowerCase();
700105
+ if (disabled2 === "1" || disabled2 === "true" || disabled2 === "yes" || disabled2 === "on") {
700106
700106
  return "off";
700107
700107
  }
700108
700108
  const consensusEnv = String(
@@ -710771,6 +710771,12 @@ var init_command_registry = __esm({
710771
710771
  ["/endpoint <url> --auth <t>", "Set endpoint with Bearer auth"],
710772
710772
  ["/config", "Show current configuration"],
710773
710773
  ["/color", "Show or configure terminal colors/theme"],
710774
+ ["/color status", "Show TUI chrome effect settings"],
710775
+ ["/color frill on|off|toggle|status", "Control ornamental TUI button ends"],
710776
+ [
710777
+ "/color flow on|off|toggle|status",
710778
+ "Control animated and gradient-flowing box borders"
710779
+ ],
710774
710780
  ["/theme", "Alias for /color"],
710775
710781
  ["/setup", "Run the initial setup wizard again"],
710776
710782
  ["/wizard", "Alias for /setup"],
@@ -714213,6 +714219,78 @@ var init_terminal_links = __esm({
714213
714219
  }
714214
714220
  });
714215
714221
 
714222
+ // packages/cli/src/tui/terminal-capabilities.ts
714223
+ function enabled2(value2) {
714224
+ return /^(?:1|true|yes|on)$/i.test(value2?.trim() ?? "");
714225
+ }
714226
+ function disabled(value2) {
714227
+ return /^(?:0|false|no|off)$/i.test(value2?.trim() ?? "");
714228
+ }
714229
+ function isLimitedTerminal(env2) {
714230
+ const term = (env2["TERM"] ?? "").trim().toLowerCase();
714231
+ return /^(?:dumb|linux|cons25|vt100|ansi|unknown)$/.test(term);
714232
+ }
714233
+ function profileEffect(env2) {
714234
+ const profile = (env2["OMNIUS_TUI_PROFILE"] ?? "").trim().toLowerCase();
714235
+ if (profile === "full") return true;
714236
+ if (profile === "compatible" || profile === "static") return false;
714237
+ return void 0;
714238
+ }
714239
+ function environmentEffect(value2) {
714240
+ if (enabled2(value2)) return true;
714241
+ if (disabled(value2)) return false;
714242
+ return void 0;
714243
+ }
714244
+ function getTuiChromeEffects() {
714245
+ return { ..._effects };
714246
+ }
714247
+ function setTuiChromeEffects(patch) {
714248
+ if (typeof patch.buttonFrill === "boolean") {
714249
+ _effects.buttonFrill = patch.buttonFrill;
714250
+ }
714251
+ if (typeof patch.boxColorFlow === "boolean") {
714252
+ _effects.boxColorFlow = patch.boxColorFlow;
714253
+ }
714254
+ return getTuiChromeEffects();
714255
+ }
714256
+ function resolvedEffect(kind, options2) {
714257
+ if (typeof options2[kind] === "boolean") return options2[kind];
714258
+ const env2 = options2.env ?? process.env;
714259
+ const specific = environmentEffect(
714260
+ env2[kind === "buttonFrill" ? "OMNIUS_TUI_BUTTON_FRILL" : "OMNIUS_TUI_BOX_COLOR_FLOW"]
714261
+ );
714262
+ if (specific !== void 0) return specific;
714263
+ if (kind === "boxColorFlow") {
714264
+ if (enabled2(env2["OMNIUS_TUI_STATIC_CHROME"])) return false;
714265
+ if (enabled2(env2["OMNIUS_TUI_ANIMATED_CHROME"])) return true;
714266
+ }
714267
+ return profileEffect(env2) ?? _effects[kind];
714268
+ }
714269
+ function prefersStaticTuiChrome(options2 = {}) {
714270
+ const env2 = options2.env ?? process.env;
714271
+ if (!resolvedEffect("boxColorFlow", options2)) return true;
714272
+ if (isLimitedTerminal(env2)) return true;
714273
+ return false;
714274
+ }
714275
+ function supportsOrnamentalTuiButtonEdges(options2 = {}) {
714276
+ const env2 = options2.env ?? process.env;
714277
+ if (!resolvedEffect("buttonFrill", options2) || isLimitedTerminal(env2)) {
714278
+ return false;
714279
+ }
714280
+ const locale = (env2["LC_ALL"] || env2["LC_CTYPE"] || env2["LANG"] || "").trim();
714281
+ if (locale && !/utf-?8/i.test(locale)) return false;
714282
+ return true;
714283
+ }
714284
+ var _effects;
714285
+ var init_terminal_capabilities = __esm({
714286
+ "packages/cli/src/tui/terminal-capabilities.ts"() {
714287
+ _effects = {
714288
+ buttonFrill: false,
714289
+ boxColorFlow: false
714290
+ };
714291
+ }
714292
+ });
714293
+
714216
714294
  // packages/cli/src/tui/render.ts
714217
714295
  function stdoutIsTTY() {
714218
714296
  return process.stdout.isTTY ?? false;
@@ -714462,7 +714540,9 @@ function xterm256ToRgb(idx) {
714462
714540
  }
714463
714541
  function toolGradSeq(colorCode, frac) {
714464
714542
  if (!_colorsEnabled || !stdoutIsTTY()) return "";
714465
- if (!truecolorOk()) return toolColorSeq(colorCode);
714543
+ if (!truecolorOk() || prefersStaticTuiChrome()) {
714544
+ return toolColorSeq(colorCode);
714545
+ }
714466
714546
  const [r2, g, b] = xterm256ToRgb(colorCode);
714467
714547
  const f2 = Math.max(0, Math.min(1, frac));
714468
714548
  const scale = 0.78 + 0.36 * f2;
@@ -714471,7 +714551,7 @@ function toolGradSeq(colorCode, frac) {
714471
714551
  }
714472
714552
  function paintToolBorder(glyphs, startCol, totalWidth, colorCode) {
714473
714553
  if (glyphs.length === 0) return "";
714474
- if (!_colorsEnabled || !stdoutIsTTY() || !truecolorOk()) {
714554
+ if (!_colorsEnabled || !stdoutIsTTY() || !truecolorOk() || prefersStaticTuiChrome()) {
714475
714555
  return `${toolColorSeq(colorCode)}${glyphs}`;
714476
714556
  }
714477
714557
  const SEG = 6;
@@ -716027,6 +716107,7 @@ var init_render = __esm({
716027
716107
  init_tool_collapse_store();
716028
716108
  init_internal_output();
716029
716109
  init_terminal_links();
716110
+ init_terminal_capabilities();
716030
716111
  c3 = {
716031
716112
  bold: (t2) => ansi2("1", t2),
716032
716113
  dim: (t2) => stdoutIsTTY() ? `${dimFg()}${t2}\x1B[0m` : t2,
@@ -724847,42 +724928,6 @@ var init_dist9 = __esm({
724847
724928
  }
724848
724929
  });
724849
724930
 
724850
- // packages/cli/src/tui/terminal-capabilities.ts
724851
- function enabled2(value2) {
724852
- return /^(?:1|true|yes|on)$/i.test(value2?.trim() ?? "");
724853
- }
724854
- function isLimitedTerminal(env2) {
724855
- const term = (env2["TERM"] ?? "").trim().toLowerCase();
724856
- return /^(?:dumb|linux|cons25|vt100|ansi|unknown)$/.test(term);
724857
- }
724858
- function requestsCompatibleChrome(env2) {
724859
- const profile = (env2["OMNIUS_TUI_PROFILE"] ?? "").trim().toLowerCase();
724860
- const client = (env2["OMNIUS_TUI_CLIENT_PLATFORM"] ?? "").trim().toLowerCase();
724861
- return profile === "compatible" || profile === "static" || enabled2(env2["OMNIUS_TUI_STATIC_CHROME"]) || client === "darwin" || client === "macos" || client === "win32" || client === "windows";
724862
- }
724863
- function prefersStaticTuiChrome(options2 = {}) {
724864
- const platform13 = options2.platform ?? process.platform;
724865
- const env2 = options2.env ?? process.env;
724866
- if (platform13 === "darwin" || platform13 === "win32") return true;
724867
- if (requestsCompatibleChrome(env2)) return true;
724868
- if (enabled2(env2["OMNIUS_TUI_ANIMATED_CHROME"])) return false;
724869
- if (isLimitedTerminal(env2)) return true;
724870
- return false;
724871
- }
724872
- function supportsOrnamentalTuiButtonEdges(options2 = {}) {
724873
- const platform13 = options2.platform ?? process.platform;
724874
- const env2 = options2.env ?? process.env;
724875
- if (platform13 === "darwin" || platform13 === "win32") return false;
724876
- if (requestsCompatibleChrome(env2) || isLimitedTerminal(env2)) return false;
724877
- const locale = (env2["LC_ALL"] || env2["LC_CTYPE"] || env2["LANG"] || "").trim();
724878
- if (locale && !/utf-?8/i.test(locale)) return false;
724879
- return true;
724880
- }
724881
- var init_terminal_capabilities = __esm({
724882
- "packages/cli/src/tui/terminal-capabilities.ts"() {
724883
- }
724884
- });
724885
-
724886
724931
  // packages/cli/src/tui/stageIndicator.ts
724887
724932
  function stageForToolName(toolName) {
724888
724933
  const name10 = String(toolName ?? "").trim().toLowerCase();
@@ -727984,6 +728029,135 @@ var init_overlay_lock = __esm({
727984
728029
  }
727985
728030
  });
727986
728031
 
728032
+ // packages/cli/src/tui/terminal-cells.ts
728033
+ function escapeEnd(value2, start2) {
728034
+ if (value2[start2] !== "\x1B") return start2 + 1;
728035
+ const kind = value2[start2 + 1];
728036
+ if (kind === "[") {
728037
+ for (let i2 = start2 + 2; i2 < value2.length; i2++) {
728038
+ const code8 = value2.charCodeAt(i2);
728039
+ if (code8 >= 64 && code8 <= 126) return i2 + 1;
728040
+ }
728041
+ return value2.length;
728042
+ }
728043
+ if (kind === "]") {
728044
+ for (let i2 = start2 + 2; i2 < value2.length; i2++) {
728045
+ if (value2[i2] === "\x07") return i2 + 1;
728046
+ if (value2[i2] === "\x1B" && value2[i2 + 1] === "\\") return i2 + 2;
728047
+ }
728048
+ return value2.length;
728049
+ }
728050
+ if (kind === "P" || kind === "X" || kind === "^" || kind === "_") {
728051
+ for (let i2 = start2 + 2; i2 < value2.length; i2++) {
728052
+ if (value2[i2] === "\x1B" && value2[i2 + 1] === "\\") return i2 + 2;
728053
+ }
728054
+ return value2.length;
728055
+ }
728056
+ return Math.min(value2.length, start2 + 2);
728057
+ }
728058
+ function stripTerminalSequences(value2) {
728059
+ let out = "";
728060
+ for (let i2 = 0; i2 < value2.length; ) {
728061
+ if (value2[i2] === "\x1B") {
728062
+ i2 = escapeEnd(value2, i2);
728063
+ continue;
728064
+ }
728065
+ const code8 = value2.charCodeAt(i2);
728066
+ if (code8 >= 0 && code8 < 32 || code8 === 127) {
728067
+ i2++;
728068
+ continue;
728069
+ }
728070
+ const cp2 = value2.codePointAt(i2);
728071
+ out += String.fromCodePoint(cp2);
728072
+ i2 += cp2 > 65535 ? 2 : 1;
728073
+ }
728074
+ return out;
728075
+ }
728076
+ function normalizeTerminalLine(value2) {
728077
+ return value2.replace(/\r\n|\r|\n/g, " ").replace(/\t/g, " ");
728078
+ }
728079
+ function isWideCodePoint(cp2) {
728080
+ return cp2 >= 4352 && cp2 <= 4447 || cp2 === 9001 || cp2 === 9002 || cp2 >= 11904 && cp2 <= 12350 || cp2 >= 12352 && cp2 <= 42191 || cp2 >= 44032 && cp2 <= 55203 || cp2 >= 63744 && cp2 <= 64255 || cp2 >= 65040 && cp2 <= 65049 || cp2 >= 65072 && cp2 <= 65135 || cp2 >= 65280 && cp2 <= 65376 || cp2 >= 65504 && cp2 <= 65510 || cp2 >= 110592 && cp2 <= 111359 || cp2 >= 131072 && cp2 <= 262141;
728081
+ }
728082
+ function graphemeCellWidth(value2) {
728083
+ if (!value2 || zeroWidthGrapheme.test(value2)) return 0;
728084
+ const cp2 = value2.codePointAt(0);
728085
+ if (cp2 < 32 || cp2 >= 127 && cp2 < 160) return 0;
728086
+ if (emojiPresentation.test(value2) || value2.includes("️") || value2.includes("‍") && extendedPictographic.test(value2) || cp2 >= 127462 && cp2 <= 127487) {
728087
+ return 2;
728088
+ }
728089
+ return isWideCodePoint(cp2) ? 2 : 1;
728090
+ }
728091
+ function plainGraphemes(value2) {
728092
+ return Array.from(
728093
+ graphemes.segment(stripTerminalSequences(value2)),
728094
+ (part) => part.segment
728095
+ );
728096
+ }
728097
+ function terminalCellWidth(value2) {
728098
+ let width = 0;
728099
+ for (const grapheme of plainGraphemes(normalizeTerminalLine(value2))) {
728100
+ width += graphemeCellWidth(grapheme);
728101
+ }
728102
+ return width;
728103
+ }
728104
+ function terminalContentSpan(value2) {
728105
+ const parts = plainGraphemes(normalizeTerminalLine(value2));
728106
+ let col = 1;
728107
+ let start2 = null;
728108
+ let end = null;
728109
+ for (const part of parts) {
728110
+ const width = graphemeCellWidth(part);
728111
+ const occupied = !/^\s+$/u.test(part) && width > 0;
728112
+ if (occupied) {
728113
+ if (start2 === null) start2 = col;
728114
+ end = col + width - 1;
728115
+ }
728116
+ col += width;
728117
+ }
728118
+ return start2 === null || end === null ? null : { start: start2, end };
728119
+ }
728120
+ function truncateTerminalCells(input, maxCells) {
728121
+ const value2 = normalizeTerminalLine(input);
728122
+ if (maxCells <= 0) return "";
728123
+ if (terminalCellWidth(value2) <= maxCells) return value2;
728124
+ const closeStyles = "\x1B]8;;\x07\x1B[0m";
728125
+ if (maxCells === 1) return `…${closeStyles}`;
728126
+ const target = maxCells - 1;
728127
+ let width = 0;
728128
+ let out = "";
728129
+ for (let i2 = 0; i2 < value2.length; ) {
728130
+ if (value2[i2] === "\x1B") {
728131
+ const end2 = escapeEnd(value2, i2);
728132
+ out += value2.slice(i2, end2);
728133
+ i2 = end2;
728134
+ continue;
728135
+ }
728136
+ const nextEscape = value2.indexOf("\x1B", i2);
728137
+ const end = nextEscape < 0 ? value2.length : nextEscape;
728138
+ const chunk = value2.slice(i2, end);
728139
+ for (const part of graphemes.segment(chunk)) {
728140
+ const cellWidth = graphemeCellWidth(part.segment);
728141
+ if (width + cellWidth > target) {
728142
+ return `${out}…${closeStyles}`;
728143
+ }
728144
+ out += part.segment;
728145
+ width += cellWidth;
728146
+ }
728147
+ i2 = end;
728148
+ }
728149
+ return `${out}${closeStyles}`;
728150
+ }
728151
+ var graphemes, extendedPictographic, emojiPresentation, zeroWidthGrapheme;
728152
+ var init_terminal_cells = __esm({
728153
+ "packages/cli/src/tui/terminal-cells.ts"() {
728154
+ graphemes = new Intl.Segmenter(void 0, { granularity: "grapheme" });
728155
+ extendedPictographic = new RegExp("\\p{Extended_Pictographic}", "u");
728156
+ emojiPresentation = new RegExp("\\p{Emoji_Presentation}", "u");
728157
+ zeroWidthGrapheme = /^[\p{Mark}\p{Cf}\u200c\u200d\ufe0e\ufe0f]+$/u;
728158
+ }
728159
+ });
728160
+
727987
728161
  // packages/cli/src/tui/status-bar.ts
727988
728162
  var status_bar_exports = {};
727989
728163
  __export(status_bar_exports, {
@@ -728112,7 +728286,7 @@ function setTerminalTitle(task, version5) {
728112
728286
  process.stdout.write(data);
728113
728287
  }
728114
728288
  }
728115
- var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG_SEQ, CONTENT_BG_SEQ, BOX_FG, TEXT_PRIMARY, TEXT_DIM, NO_SUB_AGENTS_HEADER_LABEL, HEADER_BUTTON_GLYPH_FG, HEADER_BUTTON_BG, HEADER_BUTTON_FG, HEADER_ACCENT_BOLD_FG, HEADER_TELEGRAM_FG, BOX_TL3, BOX_TR3, BOX_BL3, BOX_BR3, BOX_H3, BOX_V3, BOX_BJ, BOX_TJ, ENHANCE_SEG_INNER, ENHANCE_SPIN_FRAMES, _globalFooterLock, RESET4, CURSOR_BLINK_BLOCK, HEADER_BUTTON_LEFT, HEADER_BUTTON_RIGHT, HEADER_BUTTON_SQUARE_PAD, SPONSOR_HEADER_LABEL_MAX, _termTitleWriter, StatusBar;
728289
+ var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG_SEQ, CONTENT_BG_SEQ, BOX_FG, TEXT_PRIMARY, TEXT_DIM, NO_SUB_AGENTS_HEADER_LABEL, HEADER_BUTTON_GLYPH_FG, HEADER_BUTTON_BG, HEADER_BUTTON_FG, HEADER_ACCENT_BOLD_FG, HEADER_BUTTON_HOVER_BG, HEADER_BUTTON_HOVER_FG, HEADER_TELEGRAM_FG, BOX_TL3, BOX_TR3, BOX_BL3, BOX_BR3, BOX_H3, BOX_V3, BOX_BJ, BOX_TJ, ENHANCE_SEG_INNER, ENHANCE_SPIN_FRAMES, _globalFooterLock, RESET4, CURSOR_BLINK_BLOCK, HEADER_BUTTON_LEFT, HEADER_BUTTON_RIGHT, HEADER_BUTTON_SQUARE_PAD, SPONSOR_HEADER_LABEL_MAX, _termTitleWriter, StatusBar;
728116
728290
  var init_status_bar = __esm({
728117
728291
  "packages/cli/src/tui/status-bar.ts"() {
728118
728292
  init_render();
@@ -728128,6 +728302,7 @@ var init_status_bar = __esm({
728128
728302
  init_overlay_lock();
728129
728303
  init_dist5();
728130
728304
  init_terminal_capabilities();
728305
+ init_terminal_cells();
728131
728306
  init_theme();
728132
728307
  init_tool_collapse_store();
728133
728308
  init_layout2();
@@ -728302,6 +728477,8 @@ var init_status_bar = __esm({
728302
728477
  HEADER_BUTTON_BG = headerButtonBg();
728303
728478
  HEADER_BUTTON_FG = headerButtonFg();
728304
728479
  HEADER_ACCENT_BOLD_FG = headerAccentBoldFg();
728480
+ HEADER_BUTTON_HOVER_BG = "\x1B[48;5;255m";
728481
+ HEADER_BUTTON_HOVER_FG = "\x1B[38;5;16m";
728305
728482
  HEADER_TELEGRAM_FG = headerTelegramFg();
728306
728483
  BOX_TL3 = "╭";
728307
728484
  BOX_TR3 = "╮";
@@ -728546,6 +728723,8 @@ var init_status_bar = __esm({
728546
728723
  _suggestions = [];
728547
728724
  /** Currently highlighted suggestion index (-1 = none) */
728548
728725
  _suggestIndex = -1;
728726
+ /** Exact visible command spans from the last suggestion paint. */
728727
+ _suggestionHitZones = [];
728549
728728
  /** Sponsor label/link shown in the normal header identity slot */
728550
728729
  _sponsorHeader = null;
728551
728730
  /** Whether suggestions were triggered by direct typing (instant) vs history navigation (delayed) */
@@ -728968,7 +729147,7 @@ var init_status_bar = __esm({
728968
729147
  const parts = [
728969
729148
  {
728970
729149
  text: firstText,
728971
- width: stripAnsi(firstText).length,
729150
+ width: terminalCellWidth(firstText),
728972
729151
  ...sponsorLabel && sponsorLink ? { linkUrl: sponsorLink } : {}
728973
729152
  }
728974
729153
  ];
@@ -729052,6 +729231,8 @@ var init_status_bar = __esm({
729052
729231
  /** Index of the currently visible panel (0 = main) */
729053
729232
  _headerPanelIndex = 0;
729054
729233
  _headerCommandZones = [];
729234
+ /** Action under the pointer. The active panel renderer owns its visuals. */
729235
+ _headerHoveredAction = null;
729055
729236
  /** Sys panel separator column offset (for T-junction rendering) */
729056
729237
  _sysSeparatorOffset = null;
729057
729238
  /** Register a header panel. Returns its index. */
@@ -729069,23 +729250,28 @@ var init_status_bar = __esm({
729069
729250
  * - Category B: Systems (agents/voice status/nexus status)
729070
729251
  * Each category paginates independently across N pages. */
729071
729252
  /** Filled header button whose hue band follows the child agent's current action. */
729072
- paintAgentButton(content, stage2, active) {
729253
+ paintAgentButton(content, stage2, active, action) {
729073
729254
  const useTruecolor = supportsAnimatedTuiChrome();
729074
729255
  const ornamentalEdges = supportsOrnamentalTuiButtonEdges();
729256
+ const hovered = this._headerHoveredAction === action;
729075
729257
  const chars = Array.from(
729076
729258
  ornamentalEdges ? content : `${HEADER_BUTTON_SQUARE_PAD}${content}${HEADER_BUTTON_SQUARE_PAD}`
729077
729259
  );
729078
729260
  let body = "";
729079
- for (let i2 = 0; i2 < chars.length; i2++) {
729080
- const char = chars[i2];
729081
- if (useTruecolor) {
729082
- const [r2, g, b] = stageGradientRgb(stage2, i2, this._stagePhase);
729083
- const luma = 0.299 * r2 + 0.587 * g + 0.114 * b;
729084
- const fg2 = luma >= 140 ? "\x1B[38;2;16;16;16m" : "\x1B[38;2;255;255;255m";
729085
- body += `${active ? "\x1B[1m" : ""}${fg2}\x1B[48;2;${r2};${g};${b}m${char}\x1B[0m`;
729086
- } else {
729087
- const fallback = stageFallbackColor(stage2);
729088
- body += `${active ? "\x1B[1m" : ""}\x1B[38;5;${contrastTextColor(fallback)}m\x1B[48;5;${fallback}m${char}\x1B[0m`;
729261
+ if (hovered) {
729262
+ body = `${active ? "\x1B[1m" : ""}${HEADER_BUTTON_HOVER_FG}${HEADER_BUTTON_HOVER_BG}${chars.join("")}\x1B[0m`;
729263
+ } else {
729264
+ for (let i2 = 0; i2 < chars.length; i2++) {
729265
+ const char = chars[i2];
729266
+ if (useTruecolor) {
729267
+ const [r2, g, b] = stageGradientRgb(stage2, i2, this._stagePhase);
729268
+ const luma = 0.299 * r2 + 0.587 * g + 0.114 * b;
729269
+ const fg2 = luma >= 140 ? "\x1B[38;2;16;16;16m" : "\x1B[38;2;255;255;255m";
729270
+ body += `${active ? "\x1B[1m" : ""}${fg2}\x1B[48;2;${r2};${g};${b}m${char}\x1B[0m`;
729271
+ } else {
729272
+ const fallback = stageFallbackColor(stage2);
729273
+ body += `${active ? "\x1B[1m" : ""}\x1B[38;5;${contrastTextColor(fallback)}m\x1B[48;5;${fallback}m${char}\x1B[0m`;
729274
+ }
729089
729275
  }
729090
729276
  }
729091
729277
  if (!ornamentalEdges) return `${body}${RESET4}${PANEL_BG_SEQ}`;
@@ -729121,10 +729307,14 @@ var init_status_bar = __esm({
729121
729307
  return `\x1B]8;;${cmdPrefix}\x07${label}\x1B]8;;\x07`;
729122
729308
  };
729123
729309
  const decorateMenuButton = (cmd, label) => {
729310
+ const action = cmd.startsWith("view:") ? cmd : `/${cmd}`;
729311
+ const hovered = this._headerHoveredAction === action;
729312
+ const buttonBg = hovered ? HEADER_BUTTON_HOVER_BG : HEADER_BUTTON_BG;
729313
+ const buttonFg = hovered ? HEADER_BUTTON_HOVER_FG : HEADER_BUTTON_FG;
729124
729314
  if (!supportsOrnamentalTuiButtonEdges()) {
729125
- return `${HEADER_BUTTON_BG}${HEADER_BUTTON_FG}${HEADER_BUTTON_SQUARE_PAD}${label}${HEADER_BUTTON_SQUARE_PAD}\x1B[0m${PANEL_BG_SEQ}`;
729315
+ return `${buttonBg}${buttonFg}${HEADER_BUTTON_SQUARE_PAD}${label}${HEADER_BUTTON_SQUARE_PAD}\x1B[0m${PANEL_BG_SEQ}`;
729126
729316
  }
729127
- return `${HEADER_BUTTON_GLYPH_FG}${HEADER_BUTTON_LEFT}\x1B[0m${HEADER_BUTTON_BG}${HEADER_BUTTON_FG}${label}\x1B[0m${PANEL_BG_SEQ}${HEADER_BUTTON_GLYPH_FG}${HEADER_BUTTON_RIGHT}\x1B[0m${PANEL_BG_SEQ}`;
729317
+ return `${HEADER_BUTTON_GLYPH_FG}${HEADER_BUTTON_LEFT}\x1B[0m${buttonBg}${buttonFg}${label}\x1B[0m${PANEL_BG_SEQ}${HEADER_BUTTON_GLYPH_FG}${HEADER_BUTTON_RIGHT}\x1B[0m${PANEL_BG_SEQ}`;
729128
729318
  };
729129
729319
  const renderBtn = (cmd, label) => {
729130
729320
  return linkify(cmd, decorateMenuButton(cmd, label));
@@ -729136,20 +729326,25 @@ var init_status_bar = __esm({
729136
729326
  const headerLiveDot = headerLiveMediaActive ? Math.floor(Date.now() / 500) % 2 === 0 ? "●" : "○" : "";
729137
729327
  const headerLiveLabel = headerLiveMediaActive ? `${headerLiveDot}live` : "live";
729138
729328
  const menuBtns = [
729139
- { cmd: "help", label: "help", w: "help".length + 2 },
729140
- // +2 for spaces
729329
+ { cmd: "help", label: "help", w: terminalCellWidth("help") + 2 },
729141
729330
  {
729142
729331
  cmd: "voice",
729143
729332
  label: this._voiceActive ? this._voiceModelId || "voice" : "voice",
729144
- w: (this._voiceActive ? this._voiceModelId || "voice" : "voice").length + 2
729145
- },
729146
- // +2 for spaces
729147
- { cmd: "live", label: headerLiveLabel, w: headerLiveLabel.length + 2 },
729148
- // +2 for spaces
729149
- { cmd: "model", label: modelLabel, w: modelLabel.length + 2 },
729150
- // +2 for spaces
729151
- { cmd: "endpoint", label: endpointLabel, w: endpointLabel.length + 2 }
729152
- // +2 for spaces
729333
+ w: terminalCellWidth(
729334
+ this._voiceActive ? this._voiceModelId || "voice" : "voice"
729335
+ ) + 2
729336
+ },
729337
+ {
729338
+ cmd: "live",
729339
+ label: headerLiveLabel,
729340
+ w: terminalCellWidth(headerLiveLabel) + 2
729341
+ },
729342
+ { cmd: "model", label: modelLabel, w: terminalCellWidth(modelLabel) + 2 },
729343
+ {
729344
+ cmd: "endpoint",
729345
+ label: endpointLabel,
729346
+ w: terminalCellWidth(endpointLabel) + 2
729347
+ }
729153
729348
  ];
729154
729349
  const verW = identity3.width;
729155
729350
  let menuPages = [];
@@ -729205,7 +729400,7 @@ var init_status_bar = __esm({
729205
729400
  const mainLabel = ` ↩ main `;
729206
729401
  sysItems.push({
729207
729402
  render: () => linkify("view:main", decorateMenuButton("view:main", mainLabel)) + " ",
729208
- w: mainLabel.length + 2 + 1
729403
+ w: terminalCellWidth(mainLabel) + 2 + 1
729209
729404
  });
729210
729405
  }
729211
729406
  if (this._agentViews.size > 1) {
@@ -729214,17 +729409,25 @@ var init_status_bar = __esm({
729214
729409
  const icon = view.status === "running" ? "●" : view.status === "completed" ? "✓" : view.status === "failed" ? "✗" : "○";
729215
729410
  const content = ` ${trunc3(view.label)} ${icon} `;
729216
729411
  const active = view.id === this._activeViewId;
729217
- const btn = this.paintAgentButton(content, view.stage, active);
729218
729412
  sysItems.push({
729219
- render: () => linkify(`view:${view.id}`, btn) + " ",
729220
- w: content.length + 2 + 1
729221
- // 2 border glyphs + trailing space
729413
+ // Build this at paint time. Hover changes do not rebuild the panel;
729414
+ // a precomputed ANSI string would keep the old background forever.
729415
+ render: () => linkify(
729416
+ `view:${view.id}`,
729417
+ this.paintAgentButton(
729418
+ content,
729419
+ view.stage,
729420
+ active,
729421
+ `view:${view.id}`
729422
+ )
729423
+ ) + " ",
729424
+ w: terminalCellWidth(content) + 2 + 1
729222
729425
  });
729223
729426
  }
729224
729427
  } else {
729225
729428
  sysItems.push({
729226
729429
  render: () => `\x1B[38;5;${TEXT_DIM}m${NO_SUB_AGENTS_HEADER_LABEL}`,
729227
- w: NO_SUB_AGENTS_HEADER_LABEL.length
729430
+ w: terminalCellWidth(NO_SUB_AGENTS_HEADER_LABEL)
729228
729431
  });
729229
729432
  }
729230
729433
  const sysSeparatorOffset = sysItems.reduce((sum2, item) => sum2 + item.w, 0);
@@ -729237,25 +729440,25 @@ var init_status_bar = __esm({
729237
729440
  const voiceIcon = this._voiceActive ? "●" : "○";
729238
729441
  sysItems.push({
729239
729442
  render: () => renderBtn("voice", `${voiceIcon}${voiceLabel}`) + " ",
729240
- w: voiceLabel.length + 2
729443
+ w: terminalCellWidth(`${voiceIcon}${voiceLabel}`) + 2 + 1
729241
729444
  });
729242
729445
  const telegramDot = this._telegramStatus.active ? "●" : "○";
729243
729446
  const telegramLabel = this._telegramStatus.activeSubAgents > 0 ? ` ✈ tg ${this._telegramStatus.activeSubAgents} ` : " ✈ tg ";
729244
729447
  sysItems.push({
729245
729448
  render: () => renderBtn("telegram", `${telegramDot}${telegramLabel}`) + " ",
729246
- w: telegramLabel.length + 2
729449
+ w: terminalCellWidth(`${telegramDot}${telegramLabel}`) + 2 + 1
729247
729450
  });
729248
729451
  const liveMediaActive = this._liveMediaStatus.audio || this._liveMediaStatus.video;
729249
729452
  const liveMediaDot = liveMediaActive ? Math.floor(Date.now() / 500) % 2 === 0 ? "●" : "○" : "○";
729250
729453
  const liveMediaLabel = liveMediaActive ? ` ${this._liveMediaStatus.audio ? "aud" : ""}${this._liveMediaStatus.audio && this._liveMediaStatus.video ? "+" : ""}${this._liveMediaStatus.video ? "vid" : ""} ` : " av ";
729251
729454
  sysItems.push({
729252
729455
  render: () => renderBtn("live", `${liveMediaDot}${liveMediaLabel}`) + " ",
729253
- w: liveMediaLabel.length + 2
729456
+ w: terminalCellWidth(`${liveMediaDot}${liveMediaLabel}`) + 2 + 1
729254
729457
  });
729255
729458
  const nexusDot = this._nexusStatus === "connected" || this._nexusStatus === "connecting" ? "●" : "○";
729256
729459
  sysItems.push({
729257
729460
  render: () => renderBtn("nexus", `${nexusDot} nexus `) + " ",
729258
- w: 9
729461
+ w: terminalCellWidth(`${nexusDot} nexus `) + 2 + 1
729259
729462
  });
729260
729463
  let sysPages = [];
729261
729464
  let sCurPage = [];
@@ -729290,6 +729493,7 @@ var init_status_bar = __esm({
729290
729493
  /** Switch to the next header panel (wraps around) */
729291
729494
  nextHeaderPanel() {
729292
729495
  if (this._headerPanels.length <= 1) return;
729496
+ this._headerHoveredAction = null;
729293
729497
  this._headerPanelIndex = (this._headerPanelIndex + 1) % this._headerPanels.length;
729294
729498
  if (this._bannerRefresh) this._bannerRefresh();
729295
729499
  else this.refreshHeaderContent();
@@ -729297,6 +729501,7 @@ var init_status_bar = __esm({
729297
729501
  /** Switch to the previous header panel (wraps around) */
729298
729502
  prevHeaderPanel() {
729299
729503
  if (this._headerPanels.length <= 1) return;
729504
+ this._headerHoveredAction = null;
729300
729505
  this._headerPanelIndex = (this._headerPanelIndex - 1 + this._headerPanels.length) % this._headerPanels.length;
729301
729506
  if (this._bannerRefresh) this._bannerRefresh();
729302
729507
  else this.refreshHeaderContent();
@@ -729315,7 +729520,8 @@ var init_status_bar = __esm({
729315
729520
  }
729316
729521
  if (panel.meta.kind === "system" && this._sysSeparatorOffset !== null) {
729317
729522
  const rendered = stripAnsi(panel.render(chrome.innerWidth));
729318
- const renderedOffset = Array.from(rendered).indexOf("│");
729523
+ const separatorIndex = rendered.indexOf("│");
729524
+ const renderedOffset = separatorIndex >= 0 ? terminalCellWidth(rendered.slice(0, separatorIndex)) : -1;
729319
729525
  const offset = renderedOffset >= 0 ? renderedOffset : this._sysSeparatorOffset;
729320
729526
  const col = chrome.contentStartCol + offset;
729321
729527
  if (col > 1 && col < termWidth) return [col];
@@ -729345,6 +729551,12 @@ var init_status_bar = __esm({
729345
729551
  );
729346
729552
  return hit?.cmd ?? null;
729347
729553
  }
729554
+ /** Repaint the header only when pointer focus crosses an exact action zone. */
729555
+ setHeaderHoveredAction(action) {
729556
+ if (this._headerHoveredAction === action) return;
729557
+ this._headerHoveredAction = action;
729558
+ this.refreshHeaderContent();
729559
+ }
729348
729560
  /** Render the current header panel content onto terminal row 2 (inside box) */
729349
729561
  refreshHeaderContent() {
729350
729562
  if (!this.active) return;
@@ -729388,8 +729600,9 @@ var init_status_bar = __esm({
729388
729600
  if (this._activeViewId !== "main") {
729389
729601
  const mainLabel = ` ↩ main `;
729390
729602
  zones.push({
729391
- w: mainLabel.length + 2 + 1,
729603
+ w: terminalCellWidth(mainLabel) + 2 + 1,
729392
729604
  id: "main",
729605
+ action: "view:main",
729393
729606
  render: () => ""
729394
729607
  });
729395
729608
  }
@@ -729398,20 +729611,48 @@ var init_status_bar = __esm({
729398
729611
  if (view.id === "main" && this._activeViewId === "main") continue;
729399
729612
  const icon = view.status === "running" ? "●" : view.status === "completed" ? "✓" : view.status === "failed" ? "✗" : "○";
729400
729613
  const base3 = ` ${trunc3(view.label)} ${icon} `;
729401
- zones.push({ w: base3.length + 2 + 1, id: view.id, render: () => "" });
729614
+ zones.push({
729615
+ w: terminalCellWidth(base3) + 2 + 1,
729616
+ id: view.id,
729617
+ action: `view:${view.id}`,
729618
+ render: () => ""
729619
+ });
729402
729620
  }
729403
729621
  } else {
729404
- zones.push({ w: NO_SUB_AGENTS_HEADER_LABEL.length, render: () => "" });
729622
+ zones.push({
729623
+ w: terminalCellWidth(NO_SUB_AGENTS_HEADER_LABEL),
729624
+ render: () => ""
729625
+ });
729405
729626
  }
729406
729627
  zones.push({ w: 2, render: () => "" });
729407
729628
  const voiceLabel = this._voiceActive ? ` ${this._voiceModelId || "voice"} ` : " voice ";
729408
- zones.push({ w: voiceLabel.length + 2, render: () => "" });
729629
+ const voiceIcon = this._voiceActive ? "●" : "";
729630
+ zones.push({
729631
+ w: terminalCellWidth(`${voiceIcon}${voiceLabel}`) + 2 + 1,
729632
+ action: "/voice",
729633
+ render: () => ""
729634
+ });
729635
+ const telegramDot = this._telegramStatus.active ? "●" : "○";
729409
729636
  const telegramLabel = this._telegramStatus.activeSubAgents > 0 ? ` ✈ tg ${this._telegramStatus.activeSubAgents} ` : " ✈ tg ";
729410
- zones.push({ w: telegramLabel.length + 2, render: () => "" });
729637
+ zones.push({
729638
+ w: terminalCellWidth(`${telegramDot}${telegramLabel}`) + 2 + 1,
729639
+ action: "/telegram",
729640
+ render: () => ""
729641
+ });
729411
729642
  const liveMediaActive = this._liveMediaStatus.audio || this._liveMediaStatus.video;
729643
+ const liveMediaDot = liveMediaActive ? "●" : "○";
729412
729644
  const liveMediaLabel = liveMediaActive ? ` ${this._liveMediaStatus.audio ? "aud" : ""}${this._liveMediaStatus.audio && this._liveMediaStatus.video ? "+" : ""}${this._liveMediaStatus.video ? "vid" : ""} ` : " av ";
729413
- zones.push({ w: liveMediaLabel.length + 2, render: () => "" });
729414
- zones.push({ w: 9, render: () => "" });
729645
+ zones.push({
729646
+ w: terminalCellWidth(`${liveMediaDot}${liveMediaLabel}`) + 2 + 1,
729647
+ action: "/live",
729648
+ render: () => ""
729649
+ });
729650
+ const nexusDot = this._nexusStatus === "connected" || this._nexusStatus === "connecting" ? "●" : "○";
729651
+ zones.push({
729652
+ w: terminalCellWidth(`${nexusDot} nexus `) + 2 + 1,
729653
+ action: "/nexus",
729654
+ render: () => ""
729655
+ });
729415
729656
  let pages = [];
729416
729657
  let cur = [];
729417
729658
  let used = 0;
@@ -729430,22 +729671,36 @@ var init_status_bar = __esm({
729430
729671
  let col = chromeLayout.contentStartCol;
729431
729672
  const clickZones = [];
729432
729673
  for (const z21 of page2) {
729433
- if (z21.id) clickZones.push({ start: col, end: col + z21.w - 2, id: z21.id });
729674
+ if (z21.action) {
729675
+ clickZones.push({
729676
+ start: col,
729677
+ end: col + z21.w - 2,
729678
+ id: z21.id,
729679
+ action: z21.action
729680
+ });
729681
+ }
729434
729682
  col += z21.w;
729435
729683
  }
729436
729684
  this._sysClickZones = clickZones;
729685
+ this._headerCommandZones = clickZones.map((zone) => ({
729686
+ start: zone.start,
729687
+ end: zone.end,
729688
+ cmd: zone.action
729689
+ }));
729437
729690
  }
729438
729691
  const hdrRow = layout().headerContent;
729439
729692
  let buf = "\x1B7";
729440
729693
  buf += `\x1B[${hdrRow};1H${PANEL_BG_SEQ}\x1B[2K`;
729441
729694
  buf += `${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
729442
729695
  if (chromeLayout.showPrev) {
729443
- buf += `${HEADER_BUTTON_FG}◀${RESET4}${PANEL_BG_SEQ} `;
729696
+ const prevStyle = this._headerHoveredAction === "header-prev" ? `${HEADER_BUTTON_HOVER_BG}${HEADER_BUTTON_HOVER_FG}` : HEADER_BUTTON_FG;
729697
+ buf += `${prevStyle}◀${RESET4}${PANEL_BG_SEQ} `;
729444
729698
  }
729445
729699
  buf += `\x1B[38;5;${TEXT_PRIMARY}m${PANEL_BG_SEQ}`;
729446
729700
  buf += content;
729447
729701
  if (chromeLayout.showNext) {
729448
- buf += `\x1B[${hdrRow};${w - 1}H${HEADER_BUTTON_FG}▶${RESET4}${PANEL_BG_SEQ}`;
729702
+ const nextStyle = this._headerHoveredAction === "header-next" ? `${HEADER_BUTTON_HOVER_BG}${HEADER_BUTTON_HOVER_FG}` : HEADER_BUTTON_FG;
729703
+ buf += `\x1B[${hdrRow};${w - 1}H${nextStyle}▶${RESET4}${PANEL_BG_SEQ}`;
729449
729704
  }
729450
729705
  buf += `\x1B[${hdrRow};${w}H${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
729451
729706
  const scrollPct = this._contentScrollOffset > 0 ? `${Math.round(this._contentScrollOffset / this._contentMaxLines * 100)}%` : "live";
@@ -730470,17 +730725,35 @@ var init_status_bar = __esm({
730470
730725
  }
730471
730726
  return false;
730472
730727
  }
730473
- /** Handle mouse click on a suggestion row */
730474
- suggestClickAt(row2) {
730475
- const pos = this.rowPositions(termRows());
730476
- if (pos.suggestStartRow <= 0 || this._suggestions.length === 0)
730477
- return false;
730478
- const idx = row2 - pos.suggestStartRow;
730479
- if (idx >= 0 && idx < this._suggestions.length) {
730480
- this._suggestIndex = idx;
730481
- return this.suggestAccept();
730728
+ rebuildSuggestionHitZones(suggestStartRow, width) {
730729
+ if (suggestStartRow <= 0 || this._suggestions.length === 0) {
730730
+ this._suggestionHitZones = [];
730731
+ return;
730482
730732
  }
730483
- return false;
730733
+ const startCol = 5;
730734
+ this._suggestionHitZones = this._suggestions.flatMap((command, index) => {
730735
+ const endCol = Math.min(
730736
+ width - 1,
730737
+ startCol + terminalCellWidth(command)
730738
+ );
730739
+ return endCol < startCol ? [] : [
730740
+ {
730741
+ row: suggestStartRow + index,
730742
+ startCol,
730743
+ endCol,
730744
+ index
730745
+ }
730746
+ ];
730747
+ });
730748
+ }
730749
+ /** Handle a click only when it lands on the visibly painted command text. */
730750
+ suggestClickAt(row2, col) {
730751
+ const zone = this._suggestionHitZones.find(
730752
+ (candidate) => candidate.row === row2 && col >= candidate.startCol && col <= candidate.endCol
730753
+ );
730754
+ if (!zone || zone.index >= this._suggestions.length) return false;
730755
+ this._suggestIndex = zone.index;
730756
+ return this.suggestAccept();
730484
730757
  }
730485
730758
  /** Update the suggestion list based on current input. Called on every render. */
730486
730759
  _updateSuggestions() {
@@ -730585,11 +730858,11 @@ var init_status_bar = __esm({
730585
730858
  return this._cohereActive;
730586
730859
  }
730587
730860
  // ── Mouse tracking management ──────────────────────────────────────
730588
- // Mouse reporting is required for header buttons and scroll-wheel routing.
730589
- // Use click-only reporting (?1000h) instead of drag-motion reporting (?1002h)
730590
- // so Omnius does not own click-drag selection or paint fake highlights while
730591
- // tokens are streaming. Overlay/select UIs may temporarily suspend mouse mode
730592
- // and then call restoreMouseTracking() on return.
730861
+ // Mouse reporting is required for header buttons, hover, and scroll routing.
730862
+ // Hover-capable reporting means terminals reserve unmodified pointer motion
730863
+ // for the application. Shift-drag remains the native terminal selection path.
730864
+ // Overlay/select UIs may temporarily suspend mouse mode and then call
730865
+ // restoreMouseTracking() on return.
730593
730866
  /** Callback to check if neovim has focus (set by interactive.ts to avoid circular import) */
730594
730867
  _isNeovimFocused = null;
730595
730868
  /** Register neovim focus checker — called from interactive.ts after neovim-mode imports */
@@ -730626,7 +730899,7 @@ var init_status_bar = __esm({
730626
730899
  if (this._isNeovimFocused?.()) return;
730627
730900
  this._mouseTrackingEnabled = true;
730628
730901
  if (process.stdout.isTTY) {
730629
- this._trueStdoutWrite.call(process.stdout, "\x1B[?1000h\x1B[?1006h");
730902
+ this._trueStdoutWrite.call(process.stdout, "\x1B[?1003h\x1B[?1006h");
730630
730903
  }
730631
730904
  }
730632
730905
  /** Disable mouse tracking entirely (overlay transitions + exit). */
@@ -730730,32 +731003,29 @@ var init_status_bar = __esm({
730730
731003
  handlePointerEvent(type, col, row2) {
730731
731004
  if (!this.active) return;
730732
731005
  const w = termCols();
731006
+ if (type === "drag") {
731007
+ this.setHeaderHoveredAction(
731008
+ this.hitTestCurrentHeaderAction(row2, col, w)
731009
+ );
731010
+ }
730733
731011
  if (type === "press" && row2 >= this.scrollRegionTop) {
730734
731012
  if (this.handleContentBlockClick(row2, col)) return;
730735
731013
  }
730736
731014
  if (type === "press" && this._suggestions.length > 0) {
730737
- if (this.suggestClickAt(row2)) return;
731015
+ if (this.suggestClickAt(row2, col)) return;
730738
731016
  }
730739
731017
  if (row2 < this.scrollRegionTop) {
730740
- const hdrRow = layout().headerContent;
730741
- if (type === "press" && row2 === hdrRow && String(this.currentHeaderPanel).startsWith("sys-")) {
730742
- const zones = this._sysClickZones ?? [];
730743
- const hit = zones.find((z21) => col >= z21.start && col <= z21.end);
730744
- if (hit) {
730745
- this.switchToView(hit.id);
730746
- return;
730747
- }
730748
- }
730749
731018
  if (type === "press" && this._updateLatest) {
730750
- const hdrRow2 = layout().headerContent;
731019
+ const hdrRow = layout().headerContent;
730751
731020
  const verZone = this._verClickZone;
730752
- if (row2 === hdrRow2 && verZone && col >= verZone.start && col <= verZone.end) {
731021
+ if (row2 === hdrRow && verZone && col >= verZone.start && col <= verZone.end) {
730753
731022
  if (this._headerButtonHandler) this._headerButtonHandler("/update");
730754
731023
  return;
730755
731024
  }
730756
731025
  }
730757
731026
  const cmd = this.hitTestCurrentHeaderAction(row2, col, w);
730758
731027
  if (type === "press" && cmd) {
731028
+ this.setHeaderHoveredAction(cmd);
730759
731029
  if (cmd === "header-prev") {
730760
731030
  this.prevHeaderPanel();
730761
731031
  return;
@@ -730775,8 +731045,11 @@ var init_status_bar = __esm({
730775
731045
  }
730776
731046
  return;
730777
731047
  }
731048
+ if (cmd.startsWith("view:")) {
731049
+ this.switchToView(cmd.slice("view:".length));
731050
+ return;
731051
+ }
730778
731052
  setPressedButton(cmd);
730779
- setHoveredButton(null);
730780
731053
  this.renderHeaderButtons();
730781
731054
  if (this._headerButtonHandler) this._headerButtonHandler(cmd);
730782
731055
  setTimeout(() => {
@@ -730787,7 +731060,6 @@ var init_status_bar = __esm({
730787
731060
  }
730788
731061
  if (type === "release") {
730789
731062
  setPressedButton(null);
730790
- setHoveredButton(null);
730791
731063
  this.renderHeaderButtons();
730792
731064
  return;
730793
731065
  }
@@ -731160,7 +731432,7 @@ var init_status_bar = __esm({
731160
731432
  if (view.id === "main" && this._activeViewId === "main") continue;
731161
731433
  const icon = view.status === "running" ? "●" : view.status === "completed" ? "✓" : view.status === "failed" ? "✗" : "○";
731162
731434
  const content = ` ${view.label} ${icon} `;
731163
- const visW = content.length + 2;
731435
+ const visW = terminalCellWidth(content) + 2;
731164
731436
  const endCol = testCol + visW - 1;
731165
731437
  if (col >= testCol && col <= endCol) return view.id;
731166
731438
  testCol = endCol + 2;
@@ -732329,7 +732601,7 @@ ${CONTENT_BG_SEQ}`);
732329
732601
  const reserved = clampGradientWidth(
732330
732602
  Math.max(12, Math.min(needed, maxWidth))
732331
732603
  );
732332
- const truecolor = supportsTruecolor();
732604
+ const truecolor = supportsAnimatedTuiChrome();
732333
732605
  const block = renderStageBlock(
732334
732606
  stage2,
732335
732607
  detail,
@@ -733049,6 +733321,7 @@ ${CONTENT_BG_SEQ}`);
733049
733321
  const oldFooterTop = Math.max(1, rows - this._currentFooterHeight + 1);
733050
733322
  const heightChanged = this.updateFooterHeight(w);
733051
733323
  const pos = this.rowPositions(rows);
733324
+ this.rebuildSuggestionHitZones(pos.suggestStartRow, w);
733052
733325
  if (heightChanged) {
733053
733326
  this.applyScrollRegion();
733054
733327
  this.clearFooterTransitionRows(oldFooterTop, pos.inputStartRow);
@@ -733133,6 +733406,7 @@ ${CONTENT_BG_SEQ}`);
733133
733406
  }
733134
733407
  const w = getTermWidth();
733135
733408
  const pos = this.rowPositions(termRows());
733409
+ this.rebuildSuggestionHitZones(pos.suggestStartRow, w);
733136
733410
  const inputWrap = this.wrapInput(w);
733137
733411
  let buf = "\x1B7\x1B[?7l";
733138
733412
  if (pos.tabBarRow > 0) {
@@ -733204,6 +733478,7 @@ ${CONTENT_BG_SEQ}`);
733204
733478
  const oldFooterTop = Math.max(1, rows - oldFooterHeight + 1);
733205
733479
  const heightChanged = this.updateFooterHeight(w);
733206
733480
  const pos = this.rowPositions(rows);
733481
+ this.rebuildSuggestionHitZones(pos.suggestStartRow, w);
733207
733482
  const inputWrap = this.wrapInput(w);
733208
733483
  if (heightChanged) {
733209
733484
  const heightDelta = this._currentFooterHeight - oldFooterHeight;
@@ -733789,7 +734064,10 @@ function tuiSelect(opts) {
733789
734064
  }
733790
734065
  const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
733791
734066
  const selectChrome = (hasCrumbs ? 9 : 8) + 1;
733792
- let maxVisible = opts.maxVisible ?? Math.max(3, termRows() - selectChrome);
734067
+ let maxVisible = Math.min(
734068
+ opts.maxVisible ?? Number.POSITIVE_INFINITY,
734069
+ Math.max(3, termRows() - selectChrome)
734070
+ );
733793
734071
  let scrollOffset = 0;
733794
734072
  let lastRenderedLines = 0;
733795
734073
  return new Promise((resolve98) => {
@@ -733812,8 +734090,13 @@ function tuiSelect(opts) {
733812
734090
  stdin.resume();
733813
734091
  enterOverlay();
733814
734092
  overlayWrite(`\x1B[?1049h${tuiBgSeq()}\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h`);
733815
- let listRowOffset = 0;
734093
+ let hitZones = [];
734094
+ let hoveredItemIndex = null;
734095
+ let pointerFocus = false;
733816
734096
  let backBtnHovered = false;
734097
+ const hitZoneAt = (row2, col) => hitZones.find(
734098
+ (zone) => zone.row === row2 && col >= zone.startCol && col <= zone.endCol
734099
+ ) ?? null;
733817
734100
  function clampScroll(displayList) {
733818
734101
  const cursorPos = displayList.indexOf(cursor);
733819
734102
  if (cursorPos < 0) return;
@@ -733827,32 +734110,49 @@ function tuiSelect(opts) {
733827
734110
  }
733828
734111
  const hasBreadcrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
733829
734112
  function render2() {
733830
- const currentRows = termRows();
733831
- if (!opts.maxVisible) {
733832
- maxVisible = Math.max(3, currentRows - selectChrome);
733833
- }
733834
- overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
734113
+ const currentRows = process.stdout.rows ?? termRows();
734114
+ const currentCols = process.stdout.columns ?? termCols();
734115
+ maxVisible = Math.min(
734116
+ opts.maxVisible ?? Number.POSITIVE_INFINITY,
734117
+ Math.max(3, currentRows - selectChrome)
734118
+ );
734119
+ overlayWrite(`${tuiBgSeq()}\x1B[?7l\x1B[H\x1B[2J`);
733835
734120
  const lines = [];
734121
+ const nextHitZones = [];
734122
+ const maxLineCells = Math.max(1, currentCols - 1);
734123
+ const pushLine = (value2, target) => {
734124
+ const text3 = truncateTerminalCells(value2, maxLineCells);
734125
+ lines.push(text3);
734126
+ if (!target) return;
734127
+ const span = terminalContentSpan(text3);
734128
+ if (!span) return;
734129
+ nextHitZones.push({
734130
+ ...target,
734131
+ row: lines.length,
734132
+ startCol: span.start,
734133
+ endCol: span.end
734134
+ });
734135
+ };
733836
734136
  const backLabel = hasBreadcrumbs ? "← back" : "← close";
733837
734137
  const backHighlighted = backBtnHovered;
733838
734138
  const backStyle = backHighlighted ? `\x1B[7m\x1B[38;5;245m ${backLabel} \x1B[0m${tuiBgSeq()}` : `${selectColors.dim(` ${backLabel} `)}`;
733839
- lines.push(backStyle);
734139
+ pushLine(backStyle, { kind: "back" });
733840
734140
  if (hasBreadcrumbs) {
733841
734141
  const trail = opts.breadcrumbs.map((b) => selectColors.dim(b)).join(selectColors.dim(" › "));
733842
- lines.push(`
733843
- ${selectColors.cyan("←")} ${trail}`);
734142
+ pushLine("");
734143
+ pushLine(` ${selectColors.cyan("←")} ${trail}`);
733844
734144
  }
733845
734145
  if (currentTitle) {
733846
- if (!hasBreadcrumbs) lines.push("");
733847
- lines.push(` ${selectColors.bold(currentTitle)}`);
734146
+ if (!hasBreadcrumbs) pushLine("");
734147
+ pushLine(` ${selectColors.bold(currentTitle)}`);
733848
734148
  }
733849
734149
  if (filter2) {
733850
734150
  const count = matchSet.size;
733851
- lines.push(` ${selectColors.cyan("/")} ${selectColors.bold(filter2)} ${selectColors.dim(`(${count} match${count !== 1 ? "es" : ""})`)}`);
734151
+ pushLine(` ${selectColors.cyan("/")} ${selectColors.bold(filter2)} ${selectColors.dim(`(${count} match${count !== 1 ? "es" : ""})`)}`);
733852
734152
  } else {
733853
- lines.push(` ${selectColors.dim("Type to filter...")}`);
734153
+ pushLine(` ${selectColors.dim("Type to filter...")}`);
733854
734154
  }
733855
- lines.push("");
734155
+ pushLine("");
733856
734156
  let displayList;
733857
734157
  if (filter2) {
733858
734158
  displayList = [];
@@ -733876,44 +734176,54 @@ function tuiSelect(opts) {
733876
734176
  const visibleStart = scrollOffset;
733877
734177
  const visibleEnd = Math.min(displayList.length, scrollOffset + maxVisible);
733878
734178
  if (visibleStart > 0) {
733879
- lines.push(` ${selectColors.dim(` ▲ ${visibleStart} more`)}`);
734179
+ pushLine(` ${selectColors.dim(` ▲ ${visibleStart} more`)}`);
733880
734180
  }
733881
- listRowOffset = lines.length;
733882
734181
  for (let vi = visibleStart; vi < visibleEnd; vi++) {
733883
734182
  const idx = displayList[vi];
733884
734183
  const item = items[idx];
733885
734184
  if (isSkippable(idx)) {
733886
- lines.push(` ${item.label}`);
734185
+ pushLine(` ${item.label}`);
733887
734186
  continue;
733888
734187
  }
733889
- const focused = idx === cursor;
734188
+ const focused = pointerFocus ? idx === hoveredItemIndex : idx === cursor;
733890
734189
  const isActive = item.key === activeKey;
733891
734190
  if (deleteConfirmIdx === idx) {
733892
734191
  const yesLabel = deleteConfirmSel ? selectColors.bold(selectColors.green("[Yes]")) : selectColors.dim("[Yes]");
733893
734192
  const noLabel = !deleteConfirmSel ? selectColors.bold(selectColors.blue("[No]")) : selectColors.dim("[No]");
733894
- lines.push(` ${ansi3("31", "✕")} ${ansi3("31", stripAnsi4(item.label))} Delete? ${yesLabel} ${noLabel}`);
734193
+ pushLine(
734194
+ ` ${ansi3("31", "✕")} ${ansi3("31", stripAnsi4(item.label))} Delete? ${yesLabel} ${noLabel}`,
734195
+ { kind: "item", itemIndex: idx }
734196
+ );
733895
734197
  } else if (filter2) {
733896
- lines.push(matchRow(item, focused, isActive));
734198
+ pushLine(matchRow(item, focused, isActive), {
734199
+ kind: "item",
734200
+ itemIndex: idx
734201
+ });
733897
734202
  } else {
733898
- lines.push(renderRow(item, focused, isActive));
734203
+ pushLine(renderRow(item, focused, isActive), {
734204
+ kind: "item",
734205
+ itemIndex: idx
734206
+ });
733899
734207
  }
733900
734208
  }
733901
734209
  const remaining = displayList.length - visibleEnd;
733902
734210
  if (remaining > 0) {
733903
- lines.push(` ${selectColors.dim(` ▼ ${remaining} more`)}`);
734211
+ pushLine(` ${selectColors.dim(` ▼ ${remaining} more`)}`);
733904
734212
  }
733905
734213
  if (deleteConfirmIdx >= 0) {
733906
- lines.push(` ${selectColors.dim("←/→ select Enter confirm Esc cancel")}`);
734214
+ pushLine(` ${selectColors.dim("←/→ select Enter confirm Esc cancel")}`);
733907
734215
  } else {
733908
734216
  const actionHint = opts.onAction ? " ←/→/Space toggle" : "";
733909
734217
  const deleteHint = opts.onDelete ? " Del remove" : "";
733910
734218
  const customHint = opts.customKeyHint ?? "";
733911
734219
  const escLabel = filter2 ? "clear filter" : hasBreadcrumbs ? "← back" : "cancel";
733912
- lines.push(` ${selectColors.dim("↑/↓ navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
734220
+ pushLine(` ${selectColors.dim("↑/↓ navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
733913
734221
  }
733914
- let output2 = lines.join("\n").replace(/\x1B\[0m/g, `\x1B[0m${tuiBgSeq()}`).replace(/\n/g, `\x1B[K
733915
- ${tuiBgSeq()}`);
733916
- overlayWrite(tuiBgSeq() + output2 + "\x1B[K");
734222
+ const output2 = lines.map(
734223
+ (line, index) => `\x1B[${index + 1};1H${tuiBgSeq()}${line.replace(/\x1B\[0m/g, `\x1B[0m${tuiBgSeq()}`)}\x1B[K`
734224
+ ).join("");
734225
+ overlayWrite(`${output2}\x1B[?7h`);
734226
+ hitZones = nextHitZones;
733917
734227
  lastRenderedLines = lines.length;
733918
734228
  }
733919
734229
  let externalCleanup = null;
@@ -733924,7 +734234,7 @@ ${tuiBgSeq()}`);
733924
734234
  }
733925
734235
  stdin.removeListener("data", onData);
733926
734236
  process.stdout.removeListener("resize", onResize);
733927
- overlayWrite("\x1B[?1003l\x1B[?1002l\x1B[?1000l\x1B[?1006l\x1B[?1049l\x1B[?25h");
734237
+ overlayWrite("\x1B[?7h\x1B[?1003l\x1B[?1002l\x1B[?1000l\x1B[?1006l\x1B[?1049l\x1B[?25h");
733928
734238
  leaveOverlay();
733929
734239
  if (typeof stdin.setRawMode === "function") {
733930
734240
  stdin.setRawMode(hadRawMode ?? false);
@@ -733947,6 +734257,48 @@ ${tuiBgSeq()}`);
733947
734257
  currentTitle = title;
733948
734258
  render2();
733949
734259
  };
734260
+ const actionHelpers = () => ({
734261
+ done: () => render2(),
734262
+ resolve: (result) => {
734263
+ cleanup();
734264
+ resolve98(result);
734265
+ },
734266
+ getInput: (prompt, prefill) => getInputFromUser(prompt, prefill),
734267
+ render: () => render2(),
734268
+ updateItem
734269
+ });
734270
+ function activateItem(itemIndex) {
734271
+ if (itemIndex < 0 || itemIndex >= items.length || isSkippable(itemIndex) || !matchSet.has(itemIndex)) {
734272
+ return;
734273
+ }
734274
+ cursor = itemIndex;
734275
+ if (opts.onEnter && opts.onEnter(items[itemIndex], actionHelpers())) {
734276
+ return;
734277
+ }
734278
+ cleanup();
734279
+ resolve98({
734280
+ confirmed: true,
734281
+ key: items[itemIndex].key,
734282
+ index: itemIndex
734283
+ });
734284
+ }
734285
+ function activateBack() {
734286
+ if (filter2) {
734287
+ filter2 = "";
734288
+ updateFilter();
734289
+ const valid = findSelectable(cursor, 1);
734290
+ if (valid >= 0) cursor = valid;
734291
+ scrollOffset = 0;
734292
+ hoveredItemIndex = null;
734293
+ render2();
734294
+ } else if (hasBreadcrumbs) {
734295
+ cleanup();
734296
+ resolve98({ confirmed: false, key: "__back__", index: cursor });
734297
+ } else {
734298
+ cleanup();
734299
+ resolve98({ confirmed: false, key: null, index: cursor });
734300
+ }
734301
+ }
733950
734302
  function onData(chunk) {
733951
734303
  let seq = chunk.toString("utf8");
733952
734304
  const mouseRe = /\x1B\[<(\d+);(\d+);(\d+)([Mm])/g;
@@ -733958,106 +734310,52 @@ ${tuiBgSeq()}`);
733958
734310
  const mCol = parseInt(mouseM[2]);
733959
734311
  const mRow = parseInt(mouseM[3]);
733960
734312
  const suffix = mouseM[4];
733961
- if (btn === 0 && suffix === "M" && mRow === 1 && mCol <= 9) {
733962
- if (filter2) {
733963
- filter2 = "";
733964
- updateFilter();
733965
- const valid = findSelectable(cursor, 1);
733966
- if (valid >= 0) cursor = valid;
733967
- scrollOffset = 0;
733968
- render2();
733969
- } else if (hasBreadcrumbs) {
733970
- cleanup();
733971
- resolve98({ confirmed: false, key: "__back__", index: cursor });
733972
- } else {
733973
- cleanup();
733974
- resolve98({ confirmed: false, key: null, index: cursor });
733975
- }
733976
- return;
733977
- }
733978
- if (btn === 0 && suffix === "M") {
733979
- const listIdx = mRow - listRowOffset - 1;
733980
- if (listIdx >= 0 && listIdx < maxVisible) {
733981
- let displayList;
733982
- if (filter2) {
733983
- displayList = [];
733984
- for (let i2 = 0; i2 < items.length; i2++) {
733985
- if (matchSet.has(i2) || isSkippable(i2)) displayList.push(i2);
733986
- }
733987
- displayList = displayList.filter((idx, pos) => {
733988
- if (!isSkippable(idx)) return true;
733989
- for (let j = pos + 1; j < displayList.length; j++) {
733990
- if (!isSkippable(displayList[j])) return true;
733991
- break;
733992
- }
733993
- return false;
733994
- });
733995
- } else {
733996
- displayList = items.map((_, i2) => i2);
733997
- }
733998
- const vi = scrollOffset + listIdx;
733999
- if (vi < displayList.length) {
734000
- const itemIdx = displayList[vi];
734001
- if (!isSkippable(itemIdx) && matchSet.has(itemIdx)) {
734002
- cursor = itemIdx;
734003
- cleanup();
734004
- resolve98({ confirmed: true, key: items[cursor].key, index: cursor });
734005
- return;
734006
- } else if (!isSkippable(itemIdx)) {
734007
- cursor = itemIdx;
734008
- render2();
734009
- }
734010
- }
734313
+ const zone = hitZoneAt(mRow, mCol);
734314
+ const isPrimaryPress = suffix === "M" && (btn & 32) === 0 && (btn & 64) === 0 && (btn & 3) === 0;
734315
+ const isMotion = suffix === "M" && (btn & 32) !== 0 && (btn & 64) === 0;
734316
+ if (isPrimaryPress) {
734317
+ if (zone?.kind === "back") {
734318
+ activateBack();
734319
+ return;
734011
734320
  }
734012
- }
734013
- if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M" && mRow === 1 && mCol <= 9) {
734014
- if (!backBtnHovered) {
734015
- backBtnHovered = true;
734016
- render2();
734321
+ if (zone?.kind === "item" && zone.itemIndex !== void 0) {
734322
+ pointerFocus = true;
734323
+ backBtnHovered = false;
734324
+ hoveredItemIndex = zone.itemIndex;
734325
+ activateItem(zone.itemIndex);
734326
+ return;
734017
734327
  }
734018
- continue;
734019
- }
734020
- if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M" && backBtnHovered && (mRow !== 1 || mCol > 9)) {
734328
+ const changed = backBtnHovered || hoveredItemIndex !== null;
734329
+ pointerFocus = true;
734021
734330
  backBtnHovered = false;
734022
- render2();
734331
+ hoveredItemIndex = null;
734332
+ if (changed) render2();
734333
+ continue;
734023
734334
  }
734024
- if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M") {
734025
- const listIdx = mRow - listRowOffset - 1;
734026
- if (listIdx >= 0 && listIdx < maxVisible) {
734027
- let displayList;
734028
- if (filter2) {
734029
- displayList = [];
734030
- for (let i2 = 0; i2 < items.length; i2++) {
734031
- if (matchSet.has(i2) || isSkippable(i2)) displayList.push(i2);
734032
- }
734033
- displayList = displayList.filter((idx, pos) => {
734034
- if (!isSkippable(idx)) return true;
734035
- for (let j = pos + 1; j < displayList.length; j++) {
734036
- if (!isSkippable(displayList[j])) return true;
734037
- break;
734038
- }
734039
- return false;
734040
- });
734041
- } else {
734042
- displayList = items.map((_, i2) => i2);
734043
- }
734044
- const vi = scrollOffset + listIdx;
734045
- if (vi < displayList.length) {
734046
- const itemIdx = displayList[vi];
734047
- if (!isSkippable(itemIdx) && itemIdx !== cursor) {
734048
- cursor = itemIdx;
734049
- render2();
734050
- }
734051
- }
734052
- }
734335
+ if (isMotion) {
734336
+ const nextBack = zone?.kind === "back";
734337
+ const nextHovered = zone?.kind === "item" ? zone.itemIndex ?? null : null;
734338
+ const changed = !pointerFocus || backBtnHovered !== nextBack || hoveredItemIndex !== nextHovered;
734339
+ pointerFocus = true;
734340
+ backBtnHovered = nextBack;
734341
+ hoveredItemIndex = nextHovered;
734342
+ if (nextHovered !== null) cursor = nextHovered;
734343
+ if (changed) render2();
734344
+ continue;
734053
734345
  }
734054
734346
  if (btn === 64) {
734347
+ pointerFocus = false;
734348
+ backBtnHovered = false;
734349
+ hoveredItemIndex = null;
734055
734350
  const next = findSelectable(cursor - 1, -1);
734056
734351
  if (next >= 0 && next !== cursor) {
734057
734352
  cursor = next;
734058
734353
  render2();
734059
734354
  }
734060
734355
  } else if (btn === 65) {
734356
+ pointerFocus = false;
734357
+ backBtnHovered = false;
734358
+ hoveredItemIndex = null;
734061
734359
  const next = findSelectable(cursor + 1, 1);
734062
734360
  if (next >= 0 && next !== cursor) {
734063
734361
  cursor = next;
@@ -734067,6 +734365,11 @@ ${tuiBgSeq()}`);
734067
734365
  }
734068
734366
  seq = seq.replace(mouseRe, "");
734069
734367
  if (!seq && mouseProcessed) return;
734368
+ if (seq) {
734369
+ pointerFocus = false;
734370
+ backBtnHovered = false;
734371
+ hoveredItemIndex = null;
734372
+ }
734070
734373
  if (deleteConfirmIdx >= 0) {
734071
734374
  if (seq === "\x1B[D") {
734072
734375
  deleteConfirmSel = true;
@@ -734164,23 +734467,7 @@ ${tuiBgSeq()}`);
734164
734467
  if (opts.onAction(items[cursor], "space")) render2();
734165
734468
  }
734166
734469
  } else if (seq === "\r" || seq === "\n") {
734167
- if (!isSkippable(cursor) && matchSet.has(cursor)) {
734168
- if (opts.onEnter) {
734169
- const consumed = opts.onEnter(items[cursor], {
734170
- done: () => render2(),
734171
- resolve: (result) => {
734172
- cleanup();
734173
- resolve98(result);
734174
- },
734175
- getInput: (prompt, prefill) => getInputFromUser(prompt, prefill),
734176
- render: () => render2(),
734177
- updateItem
734178
- });
734179
- if (consumed) return;
734180
- }
734181
- cleanup();
734182
- resolve98({ confirmed: true, key: items[cursor].key, index: cursor });
734183
- }
734470
+ activateItem(cursor);
734184
734471
  } else if (seq === "\x1B" || seq === "\x1B\x1B") {
734185
734472
  if (filter2) {
734186
734473
  filter2 = "";
@@ -734336,6 +734623,7 @@ var init_tui_select = __esm({
734336
734623
  init_overlay_lock();
734337
734624
  init_theme();
734338
734625
  init_layout2();
734626
+ init_terminal_cells();
734339
734627
  isTTY3 = process.stdout.isTTY ?? false;
734340
734628
  MENU_ACTIVE_GREEN_256 = 154;
734341
734629
  selectColors = {
@@ -752892,6 +753180,41 @@ async function handleSlashCommand(input, ctx3) {
752892
753180
  case "colors":
752893
753181
  case "theme": {
752894
753182
  const colorAction = arg.toLowerCase();
753183
+ const colorParts = colorAction.split(/\s+/).filter(Boolean);
753184
+ const effectName = colorParts[0];
753185
+ const effectKey = effectName === "frill" || effectName === "button-frill" ? "buttonFrill" : effectName === "flow" || effectName === "box-flow" ? "boxColorFlow" : null;
753186
+ if (effectName === "effects" || effectName === "status") {
753187
+ const effects = getTuiChromeEffects();
753188
+ renderInfo(
753189
+ `TUI chrome: button frill ${effects.buttonFrill ? "on" : "off"}; box color flow ${effects.boxColorFlow ? "on" : "off"}.`
753190
+ );
753191
+ return "handled";
753192
+ }
753193
+ if (effectKey) {
753194
+ const action = colorParts[1] ?? "toggle";
753195
+ const current = getTuiChromeEffects()[effectKey];
753196
+ if (action === "status") {
753197
+ renderInfo(
753198
+ `${effectKey === "buttonFrill" ? "Button frill" : "Box color flow"}: ${current ? "on" : "off"}.`
753199
+ );
753200
+ return "handled";
753201
+ }
753202
+ if (!["toggle", "on", "off", "enable", "disable"].includes(action)) {
753203
+ renderWarning(
753204
+ `Usage: /color ${effectKey === "buttonFrill" ? "frill" : "flow"} on|off|toggle|status`
753205
+ );
753206
+ return "handled";
753207
+ }
753208
+ const next = action === "on" || action === "enable" ? true : action === "off" || action === "disable" ? false : !current;
753209
+ setTuiChromeEffects({ [effectKey]: next });
753210
+ const save3 = hasLocal ? ctx3.saveLocalSettings.bind(ctx3) : ctx3.saveSettings.bind(ctx3);
753211
+ save3({ [effectKey]: next });
753212
+ await refreshColorSurfaces(ctx3, false);
753213
+ renderInfo(
753214
+ `${effectKey === "buttonFrill" ? "Button frill" : "Box color flow"}: ${next ? "on" : "off"}.${hasLocal ? " (project-local)" : ""}`
753215
+ );
753216
+ return "handled";
753217
+ }
752895
753218
  if (cmd !== "theme" && ["toggle", "on", "off", "enable", "disable"].includes(colorAction)) {
752896
753219
  const current = ctx3.getColors?.() ?? true;
752897
753220
  const next = colorAction === "on" || colorAction === "enable" ? true : colorAction === "off" || colorAction === "disable" ? false : !current;
@@ -752905,14 +753228,7 @@ async function handleSlashCommand(input, ctx3) {
752905
753228
  }
752906
753229
  if (["system", "branding", "custom"].includes(colorAction)) {
752907
753230
  setThemeMode(colorAction);
752908
- refreshThemeVars();
752909
- try {
752910
- const tasksRenderer = await Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports));
752911
- tasksRenderer.refreshTuiTasksThemeVars?.();
752912
- tasksRenderer.refreshTuiTasks?.();
752913
- } catch {
752914
- }
752915
- ctx3.refreshBanner?.();
753231
+ await refreshColorSurfaces(ctx3, true);
752916
753232
  const settings = { colorTheme: colorAction };
752917
753233
  const save3 = hasLocal ? ctx3.saveLocalSettings.bind(ctx3) : ctx3.saveSettings.bind(ctx3);
752918
753234
  save3(settings);
@@ -752921,7 +753237,7 @@ async function handleSlashCommand(input, ctx3) {
752921
753237
  );
752922
753238
  return "handled";
752923
753239
  }
752924
- await showColorMenu(ctx3);
753240
+ await showColorMenu(ctx3, hasLocal);
752925
753241
  return "handled";
752926
753242
  }
752927
753243
  case "apikey":
@@ -758900,8 +759216,20 @@ async function restoreNamedSession(ctx3, query) {
758900
759216
  ctx3.clearScreen();
758901
759217
  await replaySession(ctx3, session.id);
758902
759218
  }
758903
- async function showColorMenu(ctx3) {
759219
+ async function refreshColorSurfaces(ctx3, themeChanged) {
759220
+ if (themeChanged) refreshThemeVars();
759221
+ try {
759222
+ const tasksRenderer = await Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports));
759223
+ if (themeChanged) tasksRenderer.refreshTuiTasksThemeVars?.();
759224
+ tasksRenderer.refreshTuiTasks?.();
759225
+ } catch {
759226
+ }
759227
+ ctx3.refreshBanner?.();
759228
+ ctx3.refreshDisplay?.();
759229
+ }
759230
+ async function showColorMenu(ctx3, hasLocal = false) {
758904
759231
  const currentConfig = getThemeConfig();
759232
+ const effects = getTuiChromeEffects();
758905
759233
  const items = [
758906
759234
  {
758907
759235
  key: "system",
@@ -758917,29 +759245,40 @@ async function showColorMenu(ctx3) {
758917
759245
  key: "custom",
758918
759246
  label: `Custom${currentConfig.mode === "custom" ? " (active)" : ""}`,
758919
759247
  detail: "User-defined overrides"
759248
+ },
759249
+ {
759250
+ key: "__button_frill__",
759251
+ label: `Button frill: ${effects.buttonFrill ? "on" : "off"}`,
759252
+ detail: "Toggle ornamental Unicode button ends"
759253
+ },
759254
+ {
759255
+ key: "__box_color_flow__",
759256
+ label: `Box color flow: ${effects.boxColorFlow ? "on" : "off"}`,
759257
+ detail: "Toggle animated and gradient-flowing box borders"
758920
759258
  }
758921
759259
  ];
758922
759260
  const result = await tuiSelect({
758923
759261
  items,
758924
- title: "Color Theme"
759262
+ title: "Color and Chrome"
758925
759263
  });
758926
759264
  if (!result || result.key === "cancel") return;
758927
- setThemeMode(result.key);
758928
- refreshThemeVars();
758929
- try {
758930
- const tasksRenderer = await Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports));
758931
- tasksRenderer.refreshTuiTasksThemeVars?.();
758932
- tasksRenderer.refreshTuiTasks?.();
758933
- } catch {
759265
+ if (result.key === "__button_frill__" || result.key === "__box_color_flow__") {
759266
+ const effectKey = result.key === "__button_frill__" ? "buttonFrill" : "boxColorFlow";
759267
+ const next = !getTuiChromeEffects()[effectKey];
759268
+ setTuiChromeEffects({ [effectKey]: next });
759269
+ const save4 = hasLocal ? ctx3.saveLocalSettings.bind(ctx3) : ctx3.saveSettings.bind(ctx3);
759270
+ save4({ [effectKey]: next });
759271
+ await refreshColorSurfaces(ctx3, false);
759272
+ renderInfo(
759273
+ `${effectKey === "buttonFrill" ? "Button frill" : "Box color flow"}: ${next ? "on" : "off"}.${hasLocal ? " (project-local)" : ""}`
759274
+ );
759275
+ return;
758934
759276
  }
758935
- ctx3.refreshBanner?.();
759277
+ setThemeMode(result.key);
759278
+ await refreshColorSurfaces(ctx3, true);
758936
759279
  renderInfo(`Theme set to: ${result.key}`);
758937
- try {
758938
- const settings = loadGlobalSettings();
758939
- settings.colorTheme = result.key;
758940
- saveGlobalSettings(settings);
758941
- } catch {
758942
- }
759280
+ const save3 = hasLocal ? ctx3.saveLocalSettings.bind(ctx3) : ctx3.saveSettings.bind(ctx3);
759281
+ save3({ colorTheme: result.key });
758943
759282
  }
758944
759283
  async function showConfigEditor(ctx3) {
758945
759284
  const merged = {
@@ -768826,6 +769165,7 @@ var init_commands = __esm({
768826
769165
  init_updater();
768827
769166
  init_omnius_directory();
768828
769167
  init_theme();
769168
+ init_terminal_capabilities();
768829
769169
  init_status_bar();
768830
769170
  init_layout2();
768831
769171
  init_setup();
@@ -821311,6 +821651,10 @@ async function startInteractive(config, repoPath2) {
821311
821651
  setEmojisEnabled(savedSettings.emojis);
821312
821652
  if (savedSettings.colors !== void 0)
821313
821653
  setColorsEnabled(savedSettings.colors);
821654
+ setTuiChromeEffects({
821655
+ buttonFrill: savedSettings.buttonFrill === true,
821656
+ boxColorFlow: savedSettings.boxColorFlow === true
821657
+ });
821314
821658
  if (savedSettings.colorTheme) {
821315
821659
  try {
821316
821660
  const { setThemeMode: setThemeMode2 } = await Promise.resolve().then(() => (init_theme(), theme_exports));
@@ -827920,6 +828264,7 @@ var init_interactive = __esm({
827920
828264
  init_omnius_directory();
827921
828265
  init_render();
827922
828266
  init_internal_output();
828267
+ init_terminal_capabilities();
827923
828268
  init_task_complete_box();
827924
828269
  init_audio_waveform();
827925
828270
  init_carousel();
@@ -863994,7 +864339,7 @@ function removeCronByDirectory(dir) {
863994
864339
  return 0;
863995
864340
  }
863996
864341
  function disableAllOmniusTimers() {
863997
- let disabled = 0;
864342
+ let disabled2 = 0;
863998
864343
  try {
863999
864344
  const { execSync: es } = require4("node:child_process");
864000
864345
  const home3 = process.env.HOME || require4("node:os").homedir();
@@ -864011,7 +864356,7 @@ function disableAllOmniusTimers() {
864011
864356
  }
864012
864357
  try {
864013
864358
  userServiceAction(`${t2.name}.timer`, "disable");
864014
- disabled++;
864359
+ disabled2++;
864015
864360
  } catch {
864016
864361
  }
864017
864362
  try {
@@ -864031,7 +864376,7 @@ function disableAllOmniusTimers() {
864031
864376
  }
864032
864377
  } catch {
864033
864378
  }
864034
- return disabled;
864379
+ return disabled2;
864035
864380
  }
864036
864381
  function removeAllOmniusCrons() {
864037
864382
  try {