omnius 1.0.92 → 1.0.93

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
@@ -562893,13 +562893,6 @@ function fileLink(filePath) {
562893
562893
  }
562894
562894
  return filePath;
562895
562895
  }
562896
- function linkifyPaths(text) {
562897
- if (!isTTY2) return text;
562898
- return text.replace(/(\/[\w./\-@+]+)/g, (match) => {
562899
- if (match.length < 3 || match.endsWith("/")) return match;
562900
- return hyperlink(`file://${match}`, match);
562901
- });
562902
- }
562903
562896
  function setEmojisEnabled(enabled2) {
562904
562897
  _emojisEnabled = enabled2;
562905
562898
  }
@@ -563025,131 +563018,391 @@ function renderTaskAborted() {
563025
563018
  ${c3.yellow("⚠")} ${c3.bold("Task aborted by user")}
563026
563019
  `);
563027
563020
  }
563028
- function renderToolCallStart(toolName, args, verbose) {
563029
- const icon = TOOL_ICONS[toolName] ?? "🔧";
563030
- const label = TOOL_LABELS[toolName] ?? toolName;
563031
- const argsSummary = formatToolArgs(toolName, args, verbose);
563032
- const colorFn = _colorsEnabled ? TOOL_COLORS[toolName] ?? c3.dim : (t2) => t2;
563033
- const emojiPrefix = _emojisEnabled ? `${icon} ` : "";
563034
- process.stdout.write(`
563035
- ${emojiPrefix}${colorFn(c3.bold(label))}${argsSummary ? c3.dim(": ") + argsSummary : ""}
563036
- `);
563021
+ function normalizeToolOpts(arg) {
563022
+ return typeof arg === "boolean" ? { verbose: arg } : arg ?? {};
563037
563023
  }
563038
- function renderToolLine(content, isLast = false) {
563039
- const connector = isLast ? "└" : "├";
563040
- process.stdout.write(` ${c3.dim(connector)}─ ${content}
563041
- `);
563024
+ function toolColorCode(toolName) {
563025
+ return TOOL_COLOR_CODES[toolName] ?? tuiTextDim();
563042
563026
  }
563043
- function renderToolResult(toolName, success, output, verbose) {
563044
- const debug = loadConfig()?.debug ?? false;
563045
- const maxW = verbose ? Math.max(getTermWidth() - 10, 200) : getTermWidth() - 10;
563046
- const prefix = ` ${c3.dim("│")} `;
563047
- switch (toolName) {
563048
- case "file_write": {
563049
- const summary = extractFirstLine(output, maxW);
563050
- if (success) {
563051
- process.stdout.write(`${prefix}${c3.dim(linkifyPaths(summary))}
563052
- `);
563053
- } else {
563054
- process.stdout.write(`${prefix}${c3.red(summary)}
563055
- `);
563056
- }
563057
- return;
563027
+ function toolColorSeq(code8, bold = false) {
563028
+ if (!_colorsEnabled || !isTTY2) return "";
563029
+ return `\x1B[${bold ? "1;" : ""}38;5;${code8}m`;
563030
+ }
563031
+ function toolResetSeq() {
563032
+ return _colorsEnabled && isTTY2 ? RESET2 : "";
563033
+ }
563034
+ function visibleLen(text) {
563035
+ return stripAnsi(text).length;
563036
+ }
563037
+ function truncateAnsiToWidth(text, width) {
563038
+ if (width <= 0) return "";
563039
+ if (visibleLen(text) <= width) return text;
563040
+ if (width === 1) return "…";
563041
+ const target = Math.max(0, width - 1);
563042
+ let out = "";
563043
+ let visible = 0;
563044
+ let hasAnsi = false;
563045
+ const tokenRe = /\x1B\[[0-?]*[ -/]*[@-~]|\x1B\][^\x07]*(?:\x07|\x1B\\)|./gs;
563046
+ for (const token of text.matchAll(tokenRe)) {
563047
+ const value2 = token[0];
563048
+ if (value2.startsWith("\x1B")) {
563049
+ hasAnsi = true;
563050
+ out += value2;
563051
+ continue;
563058
563052
  }
563059
- case "file_edit": {
563060
- const summary = extractFirstLine(output, maxW);
563061
- if (success) {
563062
- process.stdout.write(`${prefix}${c3.dim(linkifyPaths(summary))}
563063
- `);
563064
- } else {
563065
- process.stdout.write(`${prefix}${c3.red(summary)}
563066
- `);
563067
- }
563068
- return;
563053
+ if (visible >= target) break;
563054
+ out += value2;
563055
+ visible += 1;
563056
+ }
563057
+ return `${out}…${hasAnsi ? RESET2 : ""}`;
563058
+ }
563059
+ function wrapToolTextLine(text, width) {
563060
+ if (width <= 0) return [text];
563061
+ if (text.length === 0) return [""];
563062
+ const out = [];
563063
+ const continuationIndent = hangingIndentForPlainLine(text, width);
563064
+ let remaining = text;
563065
+ while (remaining.length > width) {
563066
+ let breakAt = remaining.lastIndexOf(" ", width);
563067
+ if (breakAt <= continuationIndent.length) breakAt = width;
563068
+ out.push(remaining.slice(0, breakAt).trimEnd());
563069
+ remaining = continuationIndent + remaining.slice(breakAt).trimStart();
563070
+ }
563071
+ out.push(remaining);
563072
+ return out;
563073
+ }
563074
+ function buildToolTopBorder(title, metrics2, width, colorCode) {
563075
+ const border = toolColorSeq(colorCode);
563076
+ const titleColor = toolColorSeq(colorCode, true);
563077
+ const metricColor = toolColorSeq(222);
563078
+ const reset = toolResetSeq();
563079
+ const inner = Math.max(4, width - 2);
563080
+ const titleVisible = stripAnsi(title);
563081
+ const metricsVisible = stripAnsi(metrics2);
563082
+ const titleChip = ` ${titleVisible} `;
563083
+ const titleSpan = titleChip.length + 2;
563084
+ const metricsChip = metricsVisible ? ` ${metricsVisible} ` : "";
563085
+ const metricsSpan = metricsChip ? metricsChip.length + 2 : 0;
563086
+ let titleSegment;
563087
+ let metricsSegment = "";
563088
+ let fillerWidth;
563089
+ if (titleSpan + metricsSpan + 4 <= inner) {
563090
+ titleSegment = `${border}[${titleColor}${titleChip}${reset}${border}]`;
563091
+ metricsSegment = metricsChip ? `${border}[${metricColor}${metricsChip}${reset}${border}]` : "";
563092
+ fillerWidth = inner - titleSpan - metricsSpan - 2;
563093
+ } else if (titleSpan + 4 <= inner) {
563094
+ titleSegment = `${border}[${titleColor}${titleChip}${reset}${border}]`;
563095
+ fillerWidth = inner - titleSpan - 2;
563096
+ } else {
563097
+ const room = Math.max(3, inner - 8);
563098
+ const truncated = titleVisible.length > room ? titleVisible.slice(0, Math.max(1, room - 1)) + "…" : titleVisible;
563099
+ titleSegment = `${border}[${titleColor} ${truncated} ${reset}${border}]`;
563100
+ fillerWidth = Math.max(0, inner - (truncated.length + 4) - 2);
563101
+ }
563102
+ return `${border}${BOX_TL2}${BOX_H2}${titleSegment}${BOX_H2.repeat(Math.max(0, fillerWidth))}${metricsSegment}${BOX_H2}${BOX_TR2}${reset}`;
563103
+ }
563104
+ function buildToolDivider(width, colorCode) {
563105
+ const border = toolColorSeq(colorCode);
563106
+ return `${border}${BOX_TJ_L2}${BOX_H2.repeat(Math.max(0, width - 2))}${BOX_TJ_R2}${toolResetSeq()}`;
563107
+ }
563108
+ function buildToolBottom(width, colorCode) {
563109
+ const border = toolColorSeq(colorCode);
563110
+ return `${border}${BOX_BL2}${BOX_H2.repeat(Math.max(0, width - 2))}${BOX_BR2}${toolResetSeq()}`;
563111
+ }
563112
+ function buildToolContentRow(content, width, colorCode) {
563113
+ const border = toolColorSeq(colorCode);
563114
+ const reset = toolResetSeq();
563115
+ const innerWidth = Math.max(1, width - 4);
563116
+ let padded = visibleLen(content) > innerWidth ? truncateAnsiToWidth(content, innerWidth) : content;
563117
+ const visible = visibleLen(padded);
563118
+ if (visible < innerWidth) padded += " ".repeat(innerWidth - visible);
563119
+ return `${border}${BOX_V2}${reset} ${padded} ${border}${BOX_V2}${reset}`;
563120
+ }
563121
+ function formatToolBoxLine(line, kind) {
563122
+ switch (kind) {
563123
+ case "error":
563124
+ return c3.red(line);
563125
+ case "success":
563126
+ return c3.green(line);
563127
+ case "dim":
563128
+ return c3.dim(line);
563129
+ case "markdown": {
563130
+ const formatted = formatMarkdownLine(line);
563131
+ return formatted === line ? highlightToolOutput(line) : formatted;
563132
+ }
563133
+ case "tool":
563134
+ return /\x1B\[[0-?]*[ -/]*[@-~]/.test(line) ? line : highlightToolOutput(line);
563135
+ case "plain":
563136
+ default:
563137
+ return line;
563138
+ }
563139
+ }
563140
+ function wrapFooterItems(items, width) {
563141
+ const sep4 = " · ";
563142
+ const lines = [];
563143
+ let current = "";
563144
+ for (const item of items) {
563145
+ const clean5 = item.replace(/\s+/g, " ").trim();
563146
+ if (!clean5) continue;
563147
+ const candidate = current ? `${current}${sep4}${clean5}` : clean5;
563148
+ if (visibleLen(candidate) <= width) {
563149
+ current = candidate;
563150
+ continue;
563069
563151
  }
563070
- case "file_read": {
563071
- if (!success) {
563072
- process.stdout.write(`${prefix}${c3.red(extractFirstLine(output, maxW))}
563073
- `);
563074
- return;
563075
- }
563076
- renderCodePreview(output, prefix, maxW, 10);
563077
- return;
563152
+ if (current) lines.push(current);
563153
+ if (clean5.length > width) {
563154
+ const chunks = wrapToolTextLine(clean5, width);
563155
+ lines.push(...chunks.slice(0, -1));
563156
+ current = chunks[chunks.length - 1] ?? "";
563157
+ } else {
563158
+ current = clean5;
563078
563159
  }
563079
- case "shell":
563080
- case "background_run": {
563081
- renderShellOutput(output, success, prefix, maxW, 10);
563082
- return;
563160
+ }
563161
+ if (current) lines.push(current);
563162
+ return lines;
563163
+ }
563164
+ function buildToolFooterRows(footer, width, colorCode) {
563165
+ const items = [...new Set(footer.items.map((item) => item.trim()).filter(Boolean))];
563166
+ if (items.length === 0) return [];
563167
+ const innerWidth = Math.max(8, width - 4);
563168
+ const labelVisible = `${footer.label}: `.length;
563169
+ const label = `${toolColorSeq(colorCode, true)}${footer.label}:${toolResetSeq()} `;
563170
+ const wrapped = wrapFooterItems(items, Math.max(8, innerWidth - labelVisible));
563171
+ if (wrapped.length === 0) return [];
563172
+ const rows = [buildToolContentRow(`${label}${wrapped[0]}`, width, colorCode)];
563173
+ for (const line of wrapped.slice(1)) {
563174
+ rows.push(buildToolContentRow(`${" ".repeat(labelVisible)}${line}`, width, colorCode));
563175
+ }
563176
+ return rows;
563177
+ }
563178
+ function buildToolBoxLines(data, width) {
563179
+ const w = Math.max(40, width);
563180
+ const innerWidth = Math.max(1, w - 4);
563181
+ const lines = [
563182
+ buildToolTopBorder(data.title, data.metrics, w, data.colorCode),
563183
+ buildToolDivider(w, data.colorCode)
563184
+ ];
563185
+ for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
563186
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(bodyLine.text, innerWidth)] : wrapToolTextLine(bodyLine.text, innerWidth);
563187
+ for (const chunk of chunks) {
563188
+ lines.push(buildToolContentRow(formatToolBoxLine(chunk, bodyLine.kind), w, data.colorCode));
563083
563189
  }
563084
- case "grep_search": {
563085
- renderShellOutput(output, success, prefix, maxW, 10);
563086
- return;
563190
+ }
563191
+ const footers = (data.footers ?? []).filter((footer) => footer.items.length > 0);
563192
+ if (footers.length > 0) {
563193
+ lines.push(buildToolDivider(w, data.colorCode));
563194
+ for (const footer of footers) {
563195
+ lines.push(...buildToolFooterRows(footer, w, data.colorCode));
563087
563196
  }
563088
- case "task_complete": {
563089
- process.stdout.write(`${prefix}${c3.green("✔")} ${c3.dim("Done")}
563090
- `);
563091
- return;
563197
+ }
563198
+ lines.push(buildToolBottom(w, data.colorCode));
563199
+ return lines;
563200
+ }
563201
+ function renderToolDynamicBlock(kind, render2, opts) {
563202
+ const redir = _contentWriteHook?.redirect?.();
563203
+ const host = opts.host !== void 0 ? opts.host : _contentWriteHook?.dynamicBlockHost?.();
563204
+ if (!redir && host) {
563205
+ const id = `${kind}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
563206
+ host.registerDynamicBlock(id, render2);
563207
+ host.appendDynamicBlock(id);
563208
+ return;
563209
+ }
563210
+ const text = `${render2(getTermWidth()).join("\n")}
563211
+ `;
563212
+ if (redir) {
563213
+ redir(text);
563214
+ return;
563215
+ }
563216
+ process.stdout.write(text);
563217
+ }
563218
+ function buildToolCallBoxLines(toolName, args, verbose, width) {
563219
+ const icon = _emojisEnabled ? `${TOOL_ICONS[toolName] ?? "🔧"} ` : "";
563220
+ const label = TOOL_LABELS[toolName] ?? toolName;
563221
+ const body = formatToolArgsForBox(toolName, args, verbose).map((text) => ({
563222
+ text,
563223
+ mode: "wrap",
563224
+ kind: "tool"
563225
+ }));
563226
+ return buildToolBoxLines({
563227
+ title: `${icon}${label}`,
563228
+ metrics: "call",
563229
+ body,
563230
+ colorCode: toolColorCode(toolName)
563231
+ }, width);
563232
+ }
563233
+ function formatToolArgsForBox(toolName, args, verbose) {
563234
+ switch (toolName) {
563235
+ case "shell":
563236
+ return [`Command: ${String(args["command"] ?? "")}${args["stdin"] ? " (with stdin)" : ""}`];
563237
+ case "background_run":
563238
+ return [`Command: ${String(args["command"] ?? "")}`];
563239
+ case "file_read":
563240
+ case "file_write":
563241
+ case "file_edit":
563242
+ case "list_directory":
563243
+ return [`Path: ${String(args["path"] ?? ".")}`];
563244
+ case "grep_search":
563245
+ return [
563246
+ `Pattern: ${String(args["pattern"] ?? "")}`,
563247
+ args["path"] ? `Path: ${String(args["path"])}` : ""
563248
+ ].filter(Boolean);
563249
+ case "find_files":
563250
+ return [`Pattern: ${String(args["pattern"] ?? "")}`];
563251
+ case "web_search":
563252
+ return [`Query: ${String(args["query"] ?? "")}`];
563253
+ case "web_fetch":
563254
+ return [`URL: ${String(args["url"] ?? "")}`];
563255
+ case "memory_read":
563256
+ return [`Key: ${args["topic"]}${args["key"] ? "." + args["key"] : ""}`];
563257
+ case "memory_write":
563258
+ return [`Key: ${args["topic"]}.${args["key"]}`];
563259
+ default: {
563260
+ const entries = Object.entries(args ?? {});
563261
+ if (entries.length === 0) return ["Starting tool call"];
563262
+ const maxValue2 = verbose ? 500 : 160;
563263
+ return entries.slice(0, verbose ? 20 : 8).map(([key, value2]) => {
563264
+ const rendered = typeof value2 === "string" ? value2 : JSON.stringify(value2);
563265
+ return `${key}: ${truncStr(String(rendered ?? ""), maxValue2)}`;
563266
+ });
563092
563267
  }
563093
- default:
563094
- break;
563095
563268
  }
563096
- const lines = output.split("\n").filter((l2) => {
563097
- const trimmed = l2.trim();
563269
+ }
563270
+ function buildToolResultBoxLines(toolName, success, output, opts, width) {
563271
+ const label = TOOL_LABELS[toolName] ?? toolName;
563272
+ const status = success ? "✔" : "✖";
563273
+ const body = buildToolResultBody(toolName, success, output, opts.verbose);
563274
+ const rawLines = output.split("\n").filter((line) => line.trim()).length;
563275
+ const metrics2 = [
563276
+ success ? "ok" : "failed",
563277
+ rawLines > 0 ? `${rawLines} line${rawLines === 1 ? "" : "s"}` : "",
563278
+ output.length > 0 ? `${output.length.toLocaleString()} chars` : "",
563279
+ opts.durationMs && opts.durationMs > 0 ? formatDuration3(opts.durationMs) : ""
563280
+ ].filter(Boolean).join(" · ");
563281
+ const provenance = detectProvenanceAnchors([output]);
563282
+ const artifacts = detectToolArtifacts(output);
563283
+ const footers = [
563284
+ { label: "Artifacts", items: artifacts },
563285
+ { label: "Provenance", items: provenance }
563286
+ ];
563287
+ return buildToolBoxLines({
563288
+ title: `${status} ${label}`,
563289
+ metrics: metrics2,
563290
+ body,
563291
+ footers,
563292
+ colorCode: toolColorCode(toolName)
563293
+ }, width);
563294
+ }
563295
+ function buildToolResultBody(toolName, success, output, verbose) {
563296
+ const debug = loadConfig()?.debug ?? false;
563297
+ if (toolName === "file_write" || toolName === "file_edit") {
563298
+ const summary = extractFirstLine(output, Number.MAX_SAFE_INTEGER);
563299
+ return [{
563300
+ text: summary,
563301
+ mode: "wrap",
563302
+ kind: success ? "dim" : "error"
563303
+ }];
563304
+ }
563305
+ if (toolName === "file_read") {
563306
+ if (!success) {
563307
+ return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
563308
+ }
563309
+ return codePreviewLines(output, 10);
563310
+ }
563311
+ if (toolName === "task_complete") {
563312
+ return [{ text: "Done", mode: "wrap", kind: "success" }];
563313
+ }
563314
+ const filtered = output.split("\n").filter((line) => {
563315
+ const trimmed = line.trim();
563098
563316
  if (!trimmed) return false;
563099
563317
  if (!debug && (trimmed.startsWith("[trust_tier:") || trimmed.startsWith("[SYSTEM]:") || trimmed.includes("tool_output_untrusted") || trimmed.includes("FORCED PROGRESS BLOCK"))) return false;
563100
563318
  return true;
563101
563319
  });
563102
- if (lines.length === 0) {
563103
- const icon = success ? _emojisEnabled ? c3.green("") : c3.green("+") : _emojisEnabled ? c3.red("") : c3.red("x");
563104
- process.stdout.write(`${prefix}${icon} ${success ? c3.dim("Done") : c3.red("Failed")}
563105
- `);
563106
- return;
563320
+ if (filtered.length === 0) {
563321
+ return [{ text: success ? "Done" : "Failed", mode: "wrap", kind: success ? "success" : "error" }];
563107
563322
  }
563108
- const maxLines = verbose ? 200 : 6;
563109
- const shown = lines.slice(0, maxLines);
563110
- for (const line of shown) {
563323
+ const maxLines = verbose ? 200 : toolName === "shell" || toolName === "background_run" || toolName === "grep_search" ? 10 : 6;
563324
+ const shown = [];
563325
+ for (const line of filtered.slice(0, maxLines)) {
563111
563326
  if (isRawJsonDump(line) && !verbose) {
563112
- process.stdout.write(`${prefix}${c3.dim("(content omitted)")}
563113
- `);
563114
- return;
563115
- }
563116
- if (verbose) {
563117
- const termW = getTermWidth() - 10;
563118
- if (line.length > termW) {
563119
- let remaining = line;
563120
- let first2 = true;
563121
- while (remaining.length > 0) {
563122
- if (remaining.length <= termW) {
563123
- const formatted2 = formatMarkdownLine(remaining);
563124
- process.stdout.write(`${first2 ? prefix : prefix + " "}${formatted2 === remaining ? highlightToolOutput(remaining) : formatted2}
563125
- `);
563126
- break;
563127
- }
563128
- let breakAt = remaining.lastIndexOf(" ", termW);
563129
- if (breakAt < termW * 0.3) breakAt = termW;
563130
- const chunk = remaining.slice(0, breakAt);
563131
- remaining = remaining.slice(breakAt).trimStart();
563132
- const formatted = formatMarkdownLine(chunk);
563133
- process.stdout.write(`${first2 ? prefix : prefix + " "}${formatted === chunk ? highlightToolOutput(chunk) : formatted}
563134
- `);
563135
- first2 = false;
563136
- }
563137
- } else {
563138
- const formatted = formatMarkdownLine(line);
563139
- process.stdout.write(`${prefix}${formatted === line ? highlightToolOutput(line) : formatted}
563140
- `);
563141
- }
563142
- } else {
563143
- const cropped = line.length > maxW ? line.slice(0, maxW - 3) + "..." : line;
563144
- const formatted = formatMarkdownLine(cropped);
563145
- process.stdout.write(`${prefix}${formatted === cropped ? highlightToolOutput(cropped) : formatted}
563146
- `);
563327
+ shown.push({ text: "(output omitted)", mode: "wrap", kind: "dim" });
563328
+ break;
563147
563329
  }
563330
+ shown.push({
563331
+ text: line,
563332
+ mode: shouldPreserveToolLine(toolName, line) ? "truncate" : "wrap",
563333
+ kind: outputLineKind(toolName, line)
563334
+ });
563148
563335
  }
563149
- if (lines.length > maxLines) {
563150
- process.stdout.write(`${prefix}${c3.dim(`... ${lines.length - maxLines} more lines`)}
563151
- `);
563336
+ if (filtered.length > maxLines) {
563337
+ shown.push({
563338
+ text: `... ${filtered.length - maxLines} more lines`,
563339
+ mode: "wrap",
563340
+ kind: "dim"
563341
+ });
563342
+ }
563343
+ return shown;
563344
+ }
563345
+ function codePreviewLines(output, maxLines) {
563346
+ const lines = output.split("\n");
563347
+ let start2 = 0;
563348
+ while (start2 < lines.length && !lines[start2].trim()) start2++;
563349
+ const shown = lines.slice(start2, start2 + maxLines);
563350
+ if (shown.length === 0) return [{ text: "(empty file)", mode: "wrap", kind: "dim" }];
563351
+ const body = shown.map((line) => ({
563352
+ text: line,
563353
+ mode: "truncate",
563354
+ kind: "dim"
563355
+ }));
563356
+ const remaining = lines.length - start2 - shown.length;
563357
+ if (remaining > 0) {
563358
+ body.push({ text: `... ${remaining} more lines`, mode: "wrap", kind: "dim" });
563152
563359
  }
563360
+ return body;
563361
+ }
563362
+ function shouldPreserveToolLine(toolName, line) {
563363
+ if (toolName === "file_read") return true;
563364
+ if (/^\s*\d+\s*(?:[|:│])/.test(line)) return true;
563365
+ if (/^\s*(?:@@|\+\+\+|---|\+|-)\s/.test(line)) return true;
563366
+ if (/^\s*(?:import|export|const|let|var|function|class|interface|type)\b/.test(line)) return true;
563367
+ if (/^\s*[{}[\](),.;]+\s*$/.test(line)) return true;
563368
+ return false;
563369
+ }
563370
+ function outputLineKind(toolName, line) {
563371
+ if (/\x1B\[[0-?]*[ -/]*[@-~]/.test(line)) return "plain";
563372
+ if (toolName === "shell" || toolName === "background_run" || toolName === "grep_search") return "tool";
563373
+ return "markdown";
563374
+ }
563375
+ function detectToolArtifacts(output) {
563376
+ const out = /* @__PURE__ */ new Set();
563377
+ const artifactPattern = /\b(?:Saved to|Written to|Output|File|Path|Artifact):\s*([^\s]+(?:\.(?:png|jpe?g|gif|webp|svg|json|md|txt|log|wav|mp3|mp4|mov|pdf|html|csv|ts|tsx|js|jsx|py|go|rs|java|c|cpp|h|hpp|css|scss|yaml|yml)))/gi;
563378
+ for (const match of output.matchAll(artifactPattern)) {
563379
+ const value2 = match[1]?.replace(/[),.;]+$/, "");
563380
+ if (value2) out.add(value2);
563381
+ }
563382
+ return [...out].slice(0, 12);
563383
+ }
563384
+ function renderToolCallStart(toolName, args, verboseOrOpts) {
563385
+ const opts = normalizeToolOpts(verboseOrOpts);
563386
+ const frozenArgs = { ...args ?? {} };
563387
+ renderToolDynamicBlock(
563388
+ "tool-call",
563389
+ (width) => buildToolCallBoxLines(toolName, frozenArgs, opts.verbose, width),
563390
+ opts
563391
+ );
563392
+ }
563393
+ function renderToolLine(content, isLast = false) {
563394
+ const connector = isLast ? "└" : "├";
563395
+ process.stdout.write(` ${c3.dim(connector)}─ ${content}
563396
+ `);
563397
+ }
563398
+ function renderToolResult(toolName, success, output, verboseOrOpts) {
563399
+ const opts = normalizeToolOpts(verboseOrOpts);
563400
+ const frozenOutput = String(output ?? "");
563401
+ renderToolDynamicBlock(
563402
+ "tool-result",
563403
+ (width) => buildToolResultBoxLines(toolName, success, frozenOutput, opts, width),
563404
+ opts
563405
+ );
563153
563406
  }
563154
563407
  function renderImageAsciiPreview(title, imagePath, ascii2, renderer) {
563155
563408
  const prefix = ` ${c3.dim("│")} `;
@@ -563173,51 +563426,6 @@ function isRawJsonDump(line) {
563173
563426
  if (/\[38;5;\d+m/.test(line) && line.length > 100) return true;
563174
563427
  return false;
563175
563428
  }
563176
- function renderCodePreview(output, prefix, maxW, maxLines) {
563177
- const lines = output.split("\n");
563178
- let start2 = 0;
563179
- while (start2 < lines.length && !lines[start2].trim()) start2++;
563180
- const shown = lines.slice(start2, start2 + maxLines);
563181
- if (shown.length === 0) {
563182
- process.stdout.write(`${prefix}${c3.dim("(empty file)")}
563183
- `);
563184
- return;
563185
- }
563186
- for (const line of shown) {
563187
- const cropped = line.length > maxW ? line.slice(0, maxW - 3) + "..." : line;
563188
- process.stdout.write(`${prefix}${c3.dim(cropped)}
563189
- `);
563190
- }
563191
- const remaining = lines.length - start2 - shown.length;
563192
- if (remaining > 0) {
563193
- process.stdout.write(`${prefix}${c3.dim(`... ${remaining} more lines`)}
563194
- `);
563195
- }
563196
- }
563197
- function renderShellOutput(output, success, prefix, maxW, maxLines) {
563198
- const lines = output.split("\n").filter((l2) => l2.trim());
563199
- if (lines.length === 0) {
563200
- const icon = success ? c3.green("✔") : c3.red("✖");
563201
- process.stdout.write(`${prefix}${icon} ${success ? c3.dim("Done") : c3.red("Failed")}
563202
- `);
563203
- return;
563204
- }
563205
- const shown = lines.slice(0, maxLines);
563206
- for (const line of shown) {
563207
- if (isRawJsonDump(line)) {
563208
- process.stdout.write(`${prefix}${c3.dim("(output omitted)")}
563209
- `);
563210
- return;
563211
- }
563212
- const cropped = line.length > maxW ? line.slice(0, maxW - 3) + "..." : line;
563213
- process.stdout.write(`${prefix}${highlightToolOutput(cropped)}
563214
- `);
563215
- }
563216
- if (lines.length > maxLines) {
563217
- process.stdout.write(`${prefix}${c3.dim(`... ${lines.length - maxLines} more lines`)}
563218
- `);
563219
- }
563220
- }
563221
563429
  function highlightToolOutput(line) {
563222
563430
  if (line.startsWith("+") && !line.startsWith("+++")) return c3.green(line);
563223
563431
  if (line.startsWith("-") && !line.startsWith("---")) return c3.red(line);
@@ -563520,113 +563728,6 @@ function renderConfig(config) {
563520
563728
  }
563521
563729
  process.stdout.write("\n");
563522
563730
  }
563523
- function formatToolArgs(toolName, args, verbose) {
563524
- const maxArg = verbose ? 1e4 : Math.max(40, getTermWidth() - 20);
563525
- switch (toolName) {
563526
- case "file_read":
563527
- case "file_write":
563528
- case "file_edit":
563529
- return fileLink(String(args["path"] ?? ""));
563530
- case "shell": {
563531
- const cmd = truncStr(String(args["command"] ?? ""), maxArg);
563532
- return args["stdin"] ? `${cmd} ${c3.dim("(with stdin)")}` : cmd;
563533
- }
563534
- case "grep_search":
563535
- return `${c3.yellow(String(args["pattern"] ?? ""))}${args["path"] ? ` in ${fileLink(String(args["path"]))}` : ""}`;
563536
- case "find_files":
563537
- return String(args["pattern"] ?? "");
563538
- case "list_directory":
563539
- return fileLink(String(args["path"] ?? "."));
563540
- case "web_search":
563541
- return `"${truncStr(String(args["query"] ?? ""), maxArg - 2)}"`;
563542
- case "web_fetch":
563543
- return truncStr(String(args["url"] ?? ""), maxArg);
563544
- case "memory_read":
563545
- return `${args["topic"]}${args["key"] ? "." + args["key"] : ""}`;
563546
- case "memory_write":
563547
- return `${args["topic"]}.${args["key"]}`;
563548
- case "task_complete":
563549
- return "";
563550
- case "aiwg_setup":
563551
- return String(args["framework"] ?? "sdlc");
563552
- case "aiwg_health":
563553
- return args["detailed"] ? "detailed" : "summary";
563554
- case "aiwg_workflow":
563555
- return truncStr(String(args["command"] ?? ""), maxArg);
563556
- case "batch_edit": {
563557
- const edits = args["edits"];
563558
- return edits ? `${edits.length} edit(s)` : "";
563559
- }
563560
- case "codebase_map":
563561
- return args["path"] ? String(args["path"]) : ".";
563562
- case "diagnostic": {
563563
- const steps = args["steps"];
563564
- return steps ? steps.join(", ") : "all";
563565
- }
563566
- case "git_info":
563567
- return args["show_diff"] ? "with diff" : "summary";
563568
- case "background_run":
563569
- return truncStr(String(args["command"] ?? ""), maxArg);
563570
- case "task_status":
563571
- case "task_output":
563572
- case "task_stop":
563573
- return String(args["task_id"] ?? "all");
563574
- case "sub_agent": {
563575
- const bg = args["background"] ? " (background)" : "";
563576
- return truncStr(String(args["task"] ?? ""), maxArg - 15) + bg;
563577
- }
563578
- case "image_read":
563579
- return String(args["path"] ?? "");
563580
- case "screenshot":
563581
- return String(args["region"] ?? "full screen");
563582
- case "ocr":
563583
- return `${args["path"] ?? ""}${args["region"] ? ` (${args["region"]})` : ""}`;
563584
- case "transcribe_file":
563585
- return `${args["path"] ?? ""}${args["model"] ? ` (${args["model"]})` : ""}`;
563586
- case "transcribe_url":
563587
- return truncStr(String(args["url"] ?? ""), maxArg);
563588
- case "ask_user": {
563589
- const q = truncStr(String(args["question"] ?? ""), maxArg - 10);
563590
- const opts = args["options"];
563591
- const count = opts ? ` (${opts.length} options)` : "";
563592
- return `${q}${c3.dim(count)}`;
563593
- }
563594
- case "todo_write": {
563595
- const todos = args["todos"];
563596
- if (!Array.isArray(todos)) return "";
563597
- const counts = { p: 0, i: 0, c: 0, b: 0 };
563598
- for (const t2 of todos) {
563599
- if (t2?.status === "completed") counts.c++;
563600
- else if (t2?.status === "in_progress") counts.i++;
563601
- else if (t2?.status === "blocked") counts.b++;
563602
- else counts.p++;
563603
- }
563604
- const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}○${counts.b > 0 ? ` ${counts.b}◍` : ""})`;
563605
- if (verbose) {
563606
- const current = todos.find((t2) => t2?.status === "in_progress");
563607
- if (current?.content) {
563608
- return `${summary} — ${truncStr(current.content, maxArg - summary.length - 4)}`;
563609
- }
563610
- }
563611
- return summary;
563612
- }
563613
- case "todo_read":
563614
- return "";
563615
- default:
563616
- return Object.entries(args).map(([k, v]) => {
563617
- let valStr;
563618
- if (v === null || v === void 0) valStr = String(v);
563619
- else if (typeof v === "object") {
563620
- try {
563621
- valStr = JSON.stringify(v);
563622
- } catch {
563623
- valStr = String(v);
563624
- }
563625
- } else valStr = String(v);
563626
- return `${k}=${truncStr(valStr, Math.max(30, maxArg / 3))}`;
563627
- }).join(", ");
563628
- }
563629
- }
563630
563731
  function truncStr(s2, max) {
563631
563732
  return s2.length > max ? s2.slice(0, max) + "..." : s2;
563632
563733
  }
@@ -563638,7 +563739,7 @@ function formatDuration3(ms) {
563638
563739
  const secs = Math.floor(totalSecs % 60);
563639
563740
  return `${mins}m ${secs}s`;
563640
563741
  }
563641
- var isTTY2, c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, accent, accentBright, accentDim, accentWarm, accentSoft, TOOL_COLORS, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
563742
+ var isTTY2, c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLOR_CODES, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, BOX_TJ_L2, BOX_TJ_R2, RESET2, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
563642
563743
  var init_render = __esm({
563643
563744
  "packages/cli/src/tui/render.ts"() {
563644
563745
  "use strict";
@@ -563646,6 +563747,8 @@ var init_render = __esm({
563646
563747
  init_layout2();
563647
563748
  init_command_registry();
563648
563749
  init_config();
563750
+ init_text_selection();
563751
+ init_task_complete_box();
563649
563752
  isTTY2 = process.stdout.isTTY ?? false;
563650
563753
  c3 = {
563651
563754
  bold: (t2) => ansi2("1", t2),
@@ -563785,43 +563888,47 @@ var init_render = __esm({
563785
563888
  // User interaction
563786
563889
  ask_user: "Ask user"
563787
563890
  };
563788
- accent = (t2) => fg256(37, t2);
563789
- accentBright = (t2) => fg256(44, t2);
563790
- accentDim = (t2) => fg256(30, t2);
563791
- accentWarm = (t2) => fg256(43, t2);
563792
- accentSoft = (t2) => fg256(80, t2);
563793
- TOOL_COLORS = {
563794
- file_read: accentSoft,
563795
- file_write: accentWarm,
563796
- file_edit: accentWarm,
563797
- shell: accentBright,
563798
- grep_search: accentDim,
563799
- find_files: accentDim,
563800
- list_directory: accentDim,
563801
- web_search: accent,
563802
- web_fetch: accent,
563803
- memory_read: accentSoft,
563804
- memory_write: accentSoft,
563805
- task_complete: accentBright,
563806
- aiwg_setup: accentDim,
563807
- aiwg_health: accentDim,
563808
- aiwg_workflow: accentDim,
563809
- batch_edit: accentWarm,
563810
- codebase_map: accentDim,
563811
- diagnostic: accentWarm,
563812
- git_info: accentDim,
563813
- background_run: accent,
563814
- task_status: accent,
563815
- task_output: accent,
563816
- task_stop: accent,
563817
- sub_agent: accentBright,
563818
- image_read: accentSoft,
563819
- screenshot: accentSoft,
563820
- ocr: accentSoft,
563821
- transcribe_file: accentWarm,
563822
- transcribe_url: accentWarm,
563823
- ask_user: accentBright
563891
+ TOOL_COLOR_CODES = {
563892
+ file_read: 80,
563893
+ file_write: 43,
563894
+ file_edit: 43,
563895
+ shell: 44,
563896
+ grep_search: 30,
563897
+ find_files: 30,
563898
+ list_directory: 30,
563899
+ web_search: 37,
563900
+ web_fetch: 37,
563901
+ memory_read: 80,
563902
+ memory_write: 80,
563903
+ task_complete: 44,
563904
+ aiwg_setup: 30,
563905
+ aiwg_health: 30,
563906
+ aiwg_workflow: 30,
563907
+ batch_edit: 43,
563908
+ codebase_map: 30,
563909
+ diagnostic: 43,
563910
+ git_info: 30,
563911
+ background_run: 37,
563912
+ task_status: 37,
563913
+ task_output: 37,
563914
+ task_stop: 37,
563915
+ sub_agent: 44,
563916
+ image_read: 80,
563917
+ screenshot: 80,
563918
+ ocr: 80,
563919
+ transcribe_file: 43,
563920
+ transcribe_url: 43,
563921
+ ask_user: 44
563824
563922
  };
563923
+ BOX_TL2 = "╭";
563924
+ BOX_TR2 = "╮";
563925
+ BOX_BL2 = "╰";
563926
+ BOX_BR2 = "╯";
563927
+ BOX_H2 = "─";
563928
+ BOX_V2 = "│";
563929
+ BOX_TJ_L2 = "├";
563930
+ BOX_TJ_R2 = "┤";
563931
+ RESET2 = "\x1B[0m";
563825
563932
  _contentWriteHook = null;
563826
563933
  HINTS = [
563827
563934
  "Ask the agent to connect to the Omnius Nexus for P2P agent networking",
@@ -571409,16 +571516,16 @@ function buildTodoProgressBar(todos, maxWidth) {
571409
571516
  for (let i2 = 0; i2 < cells; i2++) {
571410
571517
  const t2 = todos[i2];
571411
571518
  if (t2.status === "completed") {
571412
- out += `\x1B[1m${DONE_Y}█${RESET2}`;
571519
+ out += `\x1B[1m${DONE_Y}█${RESET3}`;
571413
571520
  } else if (i2 === inIdx) {
571414
- out += `${INPROG}▒${RESET2}`;
571521
+ out += `${INPROG}▒${RESET3}`;
571415
571522
  } else if (i2 === nextIdx && inIdx >= 0) {
571416
- out += `${NEXT}▒${RESET2}`;
571523
+ out += `${NEXT}▒${RESET3}`;
571417
571524
  } else {
571418
- out += `${PEND}░${RESET2}`;
571525
+ out += `${PEND}░${RESET3}`;
571419
571526
  }
571420
571527
  }
571421
- if (truncated && maxWidth > 0) out += `${DIM_LABEL}…${RESET2}`;
571528
+ if (truncated && maxWidth > 0) out += `${DIM_LABEL}…${RESET3}`;
571422
571529
  return out;
571423
571530
  }
571424
571531
  function render() {
@@ -571440,7 +571547,7 @@ function render() {
571440
571547
  const total = _lastTodos.length;
571441
571548
  const headerColor = ACCENT;
571442
571549
  const lines = [];
571443
- const headerPrefix = `tasks ${headerColor}${completed}/${total}${RESET2} `;
571550
+ const headerPrefix = `tasks ${headerColor}${completed}/${total}${RESET3} `;
571444
571551
  const headerPrefixWidth = visualLen(headerPrefix);
571445
571552
  const maxBarWidth = Math.max(0, cols - 2 - headerPrefixWidth);
571446
571553
  const progressBar = buildTodoProgressBar(_lastTodos, maxBarWidth);
@@ -571452,11 +571559,11 @@ function render() {
571452
571559
  const contentWidth = Math.max(4, cols - 8);
571453
571560
  const contentText = t2.content + (t2.blocker ? ` (blocked: ${t2.blocker})` : "");
571454
571561
  const truncated = truncate2(contentText, contentWidth);
571455
- lines.push(`${color}${mark}${RESET2} ${color}${truncated}${RESET2}`);
571562
+ lines.push(`${color}${mark}${RESET3} ${color}${truncated}${RESET3}`);
571456
571563
  }
571457
571564
  if (_lastTodos.length > visible.length) {
571458
571565
  const more = _lastTodos.length - visible.length;
571459
- lines[lines.length - 1] = `${DIM_LABEL}… +${more} more${RESET2}`;
571566
+ lines[lines.length - 1] = `${DIM_LABEL}… +${more} more${RESET3}`;
571460
571567
  }
571461
571568
  let out = HIDE + SAVE;
571462
571569
  const newTop = L.tasksTop;
@@ -571473,7 +571580,7 @@ function render() {
571473
571580
  for (let i2 = 0; i2 < lines.length; i2++) {
571474
571581
  const row = L.tasksTop + i2;
571475
571582
  if (row > L.tasksBottom) break;
571476
- out += `\x1B[${row};1H${CLEAR_LINE}${BG}${" ".repeat(cols)}\x1B[${row};2H${lines[i2]}${RESET2}`;
571583
+ out += `\x1B[${row};1H${CLEAR_LINE}${BG}${" ".repeat(cols)}\x1B[${row};2H${lines[i2]}${RESET3}`;
571477
571584
  }
571478
571585
  out += RESTORE + SHOW;
571479
571586
  try {
@@ -571501,7 +571608,7 @@ function clearLastPaintedRows() {
571501
571608
  _lastPaintedTop = -1;
571502
571609
  _lastPaintedBottom = -1;
571503
571610
  }
571504
- var chromeWrite, _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, _scopePagerActive, _lastPaintedTop, _lastPaintedBottom, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET2, BG, DIM_LABEL, ACCENT, DONE2, PENDING, BLOCKED;
571611
+ var chromeWrite, _activeSessionId, _watcher, _lastTodos, _enabled, _redrawScheduled, _onResizeChange, _scopeOverlayActive, _scopeMainViewActive, _scopeNeovimActive, _scopePagerActive, _lastPaintedTop, _lastPaintedBottom, MAX_VISIBLE_ROWS, SAVE, RESTORE, HIDE, SHOW, CLEAR_LINE, RESET3, BG, DIM_LABEL, ACCENT, DONE2, PENDING, BLOCKED;
571505
571612
  var init_tui_tasks_renderer = __esm({
571506
571613
  "packages/cli/src/tui/tui-tasks-renderer.ts"() {
571507
571614
  "use strict";
@@ -571528,7 +571635,7 @@ var init_tui_tasks_renderer = __esm({
571528
571635
  HIDE = "\x1B[?25l";
571529
571636
  SHOW = "\x1B[?25h";
571530
571637
  CLEAR_LINE = "\x1B[2K";
571531
- RESET2 = "\x1B[0m";
571638
+ RESET3 = "\x1B[0m";
571532
571639
  BG = tuiBgSeq();
571533
571640
  DIM_LABEL = "";
571534
571641
  ACCENT = "";
@@ -571575,7 +571682,7 @@ function setTerminalTitle(task, version4) {
571575
571682
  const title = task ? `${task.slice(0, 60)} · ${ver}` : ver;
571576
571683
  process.stdout.write(`\x1B]2;${title}\x07`);
571577
571684
  }
571578
- 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, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, _globalFooterLock, RESET3, CURSOR_BLINK_BLOCK, _isWindows, StatusBar;
571685
+ 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, BOX_TL3, BOX_TR3, BOX_BL3, BOX_BR3, BOX_H3, BOX_V3, _globalFooterLock, RESET4, CURSOR_BLINK_BLOCK, _isWindows, StatusBar;
571579
571686
  var init_status_bar = __esm({
571580
571687
  "packages/cli/src/tui/status-bar.ts"() {
571581
571688
  "use strict";
@@ -571754,14 +571861,14 @@ var init_status_bar = __esm({
571754
571861
  TEXT_PRIMARY = tuiTextPrimary() < 0 ? 252 : tuiTextPrimary();
571755
571862
  TEXT_DIM = tuiTextDim();
571756
571863
  NO_SUB_AGENTS_HEADER_LABEL = " no sub-agents ";
571757
- BOX_TL2 = "╭";
571758
- BOX_TR2 = "╮";
571759
- BOX_BL2 = "╰";
571760
- BOX_BR2 = "╯";
571761
- BOX_H2 = "─";
571762
- BOX_V2 = "│";
571864
+ BOX_TL3 = "╭";
571865
+ BOX_TR3 = "╮";
571866
+ BOX_BL3 = "╰";
571867
+ BOX_BR3 = "╯";
571868
+ BOX_H3 = "─";
571869
+ BOX_V3 = "│";
571763
571870
  _globalFooterLock = false;
571764
- RESET3 = "\x1B[0m";
571871
+ RESET4 = "\x1B[0m";
571765
571872
  CURSOR_BLINK_BLOCK = "\x1B[1 q";
571766
571873
  _isWindows = process.platform === "win32";
571767
571874
  StatusBar = class _StatusBar {
@@ -572104,7 +572211,7 @@ var init_status_bar = __esm({
572104
572211
  const segment = segments[i2];
572105
572212
  if (i2 > 0) {
572106
572213
  separatorOffsets.push(width);
572107
- text += `${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
572214
+ text += `${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
572108
572215
  width += 1;
572109
572216
  }
572110
572217
  text += `\x1B[1;38;5;${TEXT_PRIMARY}m${PANEL_BG_SEQ}${segment}`;
@@ -572286,7 +572393,7 @@ var init_status_bar = __esm({
572286
572393
  const sysSeparatorOffset = sysItems.reduce((sum, item) => sum + item.w, 0);
572287
572394
  this._sysSeparatorOffset = sysSeparatorOffset;
572288
572395
  sysItems.push({
572289
- render: () => `${BOX_FG}│${RESET3}${PANEL_BG_SEQ} `,
572396
+ render: () => `${BOX_FG}│${RESET4}${PANEL_BG_SEQ} `,
572290
572397
  w: 2
572291
572398
  });
572292
572399
  const voiceLabel = this._voiceActive ? ` ${this._voiceModelId || "voice"} ` : " voice ";
@@ -572483,7 +572590,7 @@ var init_status_bar = __esm({
572483
572590
  const hdrRow = layout().headerContent;
572484
572591
  let buf = "\x1B7";
572485
572592
  buf += `\x1B[${hdrRow};1H${PANEL_BG_SEQ}\x1B[2K`;
572486
- buf += `${BOX_FG}│${RESET3}${PANEL_BG_SEQ}`;
572593
+ buf += `${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
572487
572594
  if (chrome.showPrev) {
572488
572595
  buf += leftArrow;
572489
572596
  buf += ` `;
@@ -572494,7 +572601,7 @@ var init_status_bar = __esm({
572494
572601
  buf += `\x1B[${hdrRow};${w - 1}H`;
572495
572602
  buf += rightArrow;
572496
572603
  }
572497
- buf += `\x1B[${hdrRow};${w}H${BOX_FG}│${RESET3}${PANEL_BG_SEQ}`;
572604
+ buf += `\x1B[${hdrRow};${w}H${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
572498
572605
  buf += "\x1B8";
572499
572606
  this.termWrite(buf);
572500
572607
  }
@@ -573697,11 +573804,11 @@ var init_status_bar = __esm({
573697
573804
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
573698
573805
  const row = pos.inputStartRow + i2;
573699
573806
  const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
573700
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${prefix}${inputWrap.lines[i2]}${RESET3}${PANEL_BG_SEQ}`;
573807
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${prefix}${inputWrap.lines[i2]}${RESET4}${PANEL_BG_SEQ}`;
573701
573808
  }
573702
573809
  const boxInnerP = w - 2;
573703
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInnerP))}${BOX_BR2}${RESET3}${PANEL_BG_SEQ}`;
573704
- buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET3}${PANEL_BG_SEQ}\x1B[?7h\x1B[${pos.inputStartRow};1H`;
573810
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerP))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
573811
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}\x1B[?7h\x1B[${pos.inputStartRow};1H`;
573705
573812
  this.termWrite(buf);
573706
573813
  if (this._bannerRefresh) this._bannerRefresh();
573707
573814
  } else {
@@ -573902,7 +574009,7 @@ ${CONTENT_BG_SEQ}`);
573902
574009
  process.stdout.write = this._origWrite;
573903
574010
  this._origWrite = null;
573904
574011
  }
573905
- process.stdout.write(RESET3);
574012
+ process.stdout.write(RESET4);
573906
574013
  this._brailleSpinner.setMetrics({ isStreaming: false });
573907
574014
  this.renderFooterAndPositionInput();
573908
574015
  this.parkCursorInInput();
@@ -574116,7 +574223,7 @@ ${CONTENT_BG_SEQ}`);
574116
574223
  const endRaw = this.rawIndexForVisibleColumn(line, end);
574117
574224
  const activeStyle = this.activeSgrAt(line, startRaw);
574118
574225
  const raw = line.slice(startRaw, endRaw);
574119
- return activeStyle ? `${activeStyle}${raw}${RESET3}` : raw;
574226
+ return activeStyle ? `${activeStyle}${raw}${RESET4}` : raw;
574120
574227
  }
574121
574228
  rawIndexForVisibleColumn(line, target) {
574122
574229
  if (target <= 0) return 0;
@@ -574140,7 +574247,7 @@ ${CONTENT_BG_SEQ}`);
574140
574247
  let match;
574141
574248
  while ((match = sgr.exec(line)) && match.index < rawIndex) {
574142
574249
  const seq = match[0];
574143
- if (seq === RESET3 || /\x1B\[(?:0|39|49)(?:;0)?m/.test(seq)) {
574250
+ if (seq === RESET4 || /\x1B\[(?:0|39|49)(?:;0)?m/.test(seq)) {
574144
574251
  active = "";
574145
574252
  } else {
574146
574253
  active += seq;
@@ -574915,21 +575022,21 @@ ${CONTENT_BG_SEQ}`);
574915
575022
  const inputWrap = this.wrapInput(w);
574916
575023
  let buf = "\x1B[?7l";
574917
575024
  const boxInner = w - 2;
574918
- buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL2}${BOX_H2.repeat(Math.max(0, boxInner))}${BOX_TR2}${RESET3}${PANEL_BG_SEQ}`;
575025
+ buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL3}${BOX_H3.repeat(Math.max(0, boxInner))}${BOX_TR3}${RESET4}${PANEL_BG_SEQ}`;
574919
575026
  const Lspacer = layout();
574920
575027
  const spacerRow = pos.inputStartRow - 1;
574921
575028
  const tasksOccupiesSpacer = Lspacer.tasksHeight > 0 && spacerRow >= Lspacer.tasksTop && spacerRow <= Lspacer.tasksBottom;
574922
575029
  if (spacerRow >= this.scrollRegionTop && !tasksOccupiesSpacer) {
574923
- buf += `\x1B[${spacerRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET3}`;
575030
+ buf += `\x1B[${spacerRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET4}`;
574924
575031
  }
574925
575032
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
574926
575033
  const row = pos.inputStartRow + 1 + i2;
574927
575034
  const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
574928
575035
  const lineContent = `${prefix}${inputWrap.lines[i2]}`;
574929
575036
  buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K`;
574930
- buf += `${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}${lineContent}`;
575037
+ buf += `${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}${lineContent}`;
574931
575038
  buf += `${PANEL_BG_SEQ}\x1B[K`;
574932
- buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
575039
+ buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
574933
575040
  }
574934
575041
  const cursorTermRow = pos.inputStartRow + 1 + inputWrap.cursorRow;
574935
575042
  if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
@@ -574941,17 +575048,17 @@ ${CONTENT_BG_SEQ}`);
574941
575048
  const fg2 = isHighlighted ? `\x1B[1;38;5;${TEXT_PRIMARY}m` : `\x1B[38;5;${TEXT_PRIMARY}m`;
574942
575049
  const slash = isHighlighted ? `\x1B[38;5;245m` : `\x1B[38;5;${TEXT_DIM}m`;
574943
575050
  const marker = isHighlighted ? `\x1B[38;5;${TEXT_PRIMARY}m› ` : " ";
574944
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
575051
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
574945
575052
  buf += `${bg} ${marker}${slash}/${fg2}${cmd}`;
574946
575053
  buf += `${PANEL_BG_SEQ}\x1B[K`;
574947
- buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
575054
+ buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
574948
575055
  }
574949
575056
  const suggestBottomRow = pos.suggestStartRow + this._suggestions.length;
574950
- buf += `\x1B[${suggestBottomRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInner))}${BOX_BR2}${RESET3}${PANEL_BG_SEQ}`;
575057
+ buf += `\x1B[${suggestBottomRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInner))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
574951
575058
  } else {
574952
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInner))}${BOX_BR2}${RESET3}${PANEL_BG_SEQ}`;
575059
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInner))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
574953
575060
  }
574954
- buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET3}${PANEL_BG_SEQ}`;
575061
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
574955
575062
  buf += "\x1B[?7h";
574956
575063
  if (this.writeDepth === 0) {
574957
575064
  buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H${CURSOR_BLINK_BLOCK}\x1B[?25h`;
@@ -574984,7 +575091,7 @@ ${CONTENT_BG_SEQ}`);
574984
575091
  const pos = this.rowPositions(termRows());
574985
575092
  let buf = "\x1B7\x1B[?7l";
574986
575093
  if (pos.tabBarRow > 0) {
574987
- buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET3}`;
575094
+ buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET4}`;
574988
575095
  }
574989
575096
  const boxInnerR = w - 2;
574990
575097
  if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
@@ -574994,14 +575101,14 @@ ${CONTENT_BG_SEQ}`);
574994
575101
  const isHl = si === this._suggestIndex;
574995
575102
  const fg2 = isHl ? `\x1B[1;38;5;${TEXT_PRIMARY}m` : `\x1B[38;5;${TEXT_PRIMARY}m`;
574996
575103
  const marker = isHl ? `\x1B[38;5;${TEXT_PRIMARY}m› ` : " ";
574997
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ} ${marker}\x1B[38;5;${TEXT_DIM}m/${fg2}${cmd}`;
574998
- buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}`;
575104
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ} ${marker}\x1B[38;5;${TEXT_DIM}m/${fg2}${cmd}`;
575105
+ buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}`;
574999
575106
  }
575000
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInnerR))}${BOX_BR2}${RESET3}`;
575107
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerR))}${BOX_BR3}${RESET4}`;
575001
575108
  } else {
575002
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInnerR))}${BOX_BR2}${RESET3}`;
575109
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerR))}${BOX_BR3}${RESET4}`;
575003
575110
  }
575004
- buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET3}${PANEL_BG_SEQ}\x1B[?7h\x1B8` + // DEC restore cursor
575111
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}\x1B[?7h\x1B8` + // DEC restore cursor
575005
575112
  (this.writeDepth === 0 ? `${CURSOR_BLINK_BLOCK}\x1B[?25h` : "");
575006
575113
  this.termWrite(buf);
575007
575114
  if (pos.tabBarRow > 0) this.renderAgentTabs();
@@ -575045,12 +575152,12 @@ ${CONTENT_BG_SEQ}`);
575045
575152
  }
575046
575153
  buf += "\x1B[?7l";
575047
575154
  const boxInnerH = w - 2;
575048
- buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL2}${BOX_H2.repeat(Math.max(0, boxInnerH))}${BOX_TR2}${RESET3}`;
575155
+ buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL3}${BOX_H3.repeat(Math.max(0, boxInnerH))}${BOX_TR3}${RESET4}`;
575049
575156
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
575050
575157
  const row = pos.inputStartRow + 1 + i2;
575051
575158
  const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
575052
575159
  const lineContent = `${prefix}${inputWrap.lines[i2]}`;
575053
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}${lineContent}${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}`;
575160
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}${lineContent}${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}`;
575054
575161
  }
575055
575162
  if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
575056
575163
  for (let si = 0; si < this._suggestions.length; si++) {
@@ -575060,14 +575167,14 @@ ${CONTENT_BG_SEQ}`);
575060
575167
  const bg = isHl ? `\x1B[48;5;235m` : PANEL_BG_SEQ;
575061
575168
  const fg2 = isHl ? `\x1B[1;38;5;${TEXT_PRIMARY}m` : `\x1B[38;5;${TEXT_PRIMARY}m`;
575062
575169
  const marker = isHl ? `\x1B[38;5;${TEXT_PRIMARY}m› ` : " ";
575063
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
575170
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
575064
575171
  buf += `${bg} ${marker}\x1B[38;5;${TEXT_DIM}m/${fg2}${cmd}`;
575065
- buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}`;
575172
+ buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}`;
575066
575173
  }
575067
575174
  }
575068
575175
  const boxInnerS = w - 2;
575069
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL2}${BOX_H2.repeat(Math.max(0, boxInnerS))}${BOX_BR2}${RESET3}`;
575070
- buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET3}`;
575176
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerS))}${BOX_BR3}${RESET4}`;
575177
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}`;
575071
575178
  buf += "\x1B[?7h";
575072
575179
  buf += "\x1B8";
575073
575180
  if (heightDelta > 0) {
@@ -575079,17 +575186,34 @@ ${CONTENT_BG_SEQ}`);
575079
575186
  w1.call(process.stdout, buf);
575080
575187
  if (heightDelta !== 0) this.refreshTasksPanelAfterLayoutChange();
575081
575188
  } else {
575082
- let buf = "\x1B[?7l";
575189
+ let buf = "\x1B7\x1B[?25l\x1B[?7l";
575190
+ const boxInnerH = w - 2;
575191
+ buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL3}${BOX_H3.repeat(Math.max(0, boxInnerH))}${BOX_TR3}${RESET4}${PANEL_BG_SEQ}`;
575083
575192
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
575084
575193
  const row = pos.inputStartRow + 1 + i2;
575085
575194
  const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
575086
575195
  const lineContent = `${prefix}${inputWrap.lines[i2]}`;
575087
575196
  buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K`;
575088
- buf += `${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}${lineContent}`;
575197
+ buf += `${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}${lineContent}`;
575089
575198
  buf += `${PANEL_BG_SEQ}\x1B[K`;
575090
- buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V2}${RESET3}${PANEL_BG_SEQ}`;
575199
+ buf += `\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
575091
575200
  }
575092
- buf += "\x1B[?7h";
575201
+ if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
575202
+ for (let si = 0; si < this._suggestions.length; si++) {
575203
+ const row = pos.suggestStartRow + si;
575204
+ const cmd = this._suggestions[si];
575205
+ const isHl = si === this._suggestIndex;
575206
+ const bg = isHl ? `\x1B[48;5;235m` : PANEL_BG_SEQ;
575207
+ const fg2 = isHl ? `\x1B[1;38;5;${TEXT_PRIMARY}m` : `\x1B[38;5;${TEXT_PRIMARY}m`;
575208
+ const marker = isHl ? `\x1B[38;5;${TEXT_PRIMARY}m› ` : " ";
575209
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
575210
+ buf += `${bg} ${marker}\x1B[38;5;${TEXT_DIM}m/${fg2}${cmd}`;
575211
+ buf += `${PANEL_BG_SEQ}\x1B[K\x1B[${row};${w}H${BOX_FG}${BOX_V3}${RESET4}${PANEL_BG_SEQ}`;
575212
+ }
575213
+ }
575214
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL3}${BOX_H3.repeat(Math.max(0, boxInnerH))}${BOX_BR3}${RESET4}${PANEL_BG_SEQ}`;
575215
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
575216
+ buf += "\x1B[?7h\x1B8\x1B[?25l";
575093
575217
  this.termWrite(buf);
575094
575218
  }
575095
575219
  }
@@ -578237,13 +578361,13 @@ ${c3.cyan(OMNIUS_FIRST_RUN_BANNER)}
578237
578361
  const sw = 24;
578238
578362
  const boxW = 52;
578239
578363
  const boxLine = (content) => {
578240
- const visLen = visibleLen(content);
578364
+ const visLen = visibleLen2(content);
578241
578365
  const pad = Math.max(0, boxW - visLen);
578242
578366
  return ` ${c3.dim("│")}${content}${" ".repeat(pad)}${c3.dim("│")}
578243
578367
  `;
578244
578368
  };
578245
578369
  const boxWrappedDimLine = (content, indent = " ") => {
578246
- const lines = wrapText(content, Math.max(1, boxW - visibleLen(indent)));
578370
+ const lines = wrapText(content, Math.max(1, boxW - visibleLen2(indent)));
578247
578371
  for (const line of lines) {
578248
578372
  process.stdout.write(boxLine(`${indent}${c3.dim(line)}`));
578249
578373
  }
@@ -579498,7 +579622,7 @@ export PATH="${binDir}:$PATH" # Added by omnius for nvim
579498
579622
  } catch {
579499
579623
  }
579500
579624
  }
579501
- var execAsync2, OMNIUS_FIRST_RUN_BANNER, ANSI_RE, visibleLen, QWEN_VARIANTS, _toolSupportCache, _cloudflaredInstallPromise;
579625
+ var execAsync2, OMNIUS_FIRST_RUN_BANNER, ANSI_RE, visibleLen2, QWEN_VARIANTS, _toolSupportCache, _cloudflaredInstallPromise;
579502
579626
  var init_setup = __esm({
579503
579627
  "packages/cli/src/tui/setup.ts"() {
579504
579628
  "use strict";
@@ -579518,7 +579642,7 @@ var init_setup = __esm({
579518
579642
  " ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░ "
579519
579643
  ].join("\n");
579520
579644
  ANSI_RE = /\x1B\[[0-?]*[ -/]*[@-~]/g;
579521
- visibleLen = (value2) => Array.from(value2.replace(ANSI_RE, "")).length;
579645
+ visibleLen2 = (value2) => Array.from(value2.replace(ANSI_RE, "")).length;
579522
579646
  QWEN_VARIANTS = [
579523
579647
  { tag: "qwen3.5:0.8b", sizeGB: 1, label: "0.8B params (1.0 GB)", cloud: false },
579524
579648
  { tag: "qwen3.5:2b", sizeGB: 2.7, label: "2B params (2.7 GB)", cloud: false },
@@ -603127,30 +603251,30 @@ function getNodeMnemonic() {
603127
603251
  function createDefaultBanner(version4 = "0.120.0") {
603128
603252
  const width = termCols();
603129
603253
  const rows = headerHeight();
603130
- const accent2 = tuiAccent() < 0 ? -1 : tuiAccent();
603254
+ const accent = tuiAccent() < 0 ? -1 : tuiAccent();
603131
603255
  const bgBlack = tuiBg() < 0 ? -1 : tuiBg();
603132
603256
  const grid = [];
603133
603257
  const innerW = width - 2;
603134
603258
  const topRow = [];
603135
- topRow.push({ char: "╭", fg: accent2, bg: bgBlack, bold: false });
603259
+ topRow.push({ char: "╭", fg: accent, bg: bgBlack, bold: false });
603136
603260
  for (let c9 = 0; c9 < innerW; c9++) {
603137
- topRow.push({ char: "─", fg: accent2, bg: bgBlack, bold: false });
603261
+ topRow.push({ char: "─", fg: accent, bg: bgBlack, bold: false });
603138
603262
  }
603139
- topRow.push({ char: "╮", fg: accent2, bg: bgBlack, bold: false });
603263
+ topRow.push({ char: "╮", fg: accent, bg: bgBlack, bold: false });
603140
603264
  grid.push(topRow);
603141
603265
  const midRow = [];
603142
- midRow.push({ char: "│", fg: accent2, bg: bgBlack, bold: false });
603266
+ midRow.push({ char: "│", fg: accent, bg: bgBlack, bold: false });
603143
603267
  for (let c9 = 0; c9 < innerW; c9++) {
603144
603268
  midRow.push({ char: " ", fg: 0, bg: bgBlack, bold: false });
603145
603269
  }
603146
- midRow.push({ char: "│", fg: accent2, bg: bgBlack, bold: false });
603270
+ midRow.push({ char: "│", fg: accent, bg: bgBlack, bold: false });
603147
603271
  grid.push(midRow);
603148
603272
  const botRow = [];
603149
- botRow.push({ char: "╰", fg: accent2, bg: bgBlack, bold: false });
603273
+ botRow.push({ char: "╰", fg: accent, bg: bgBlack, bold: false });
603150
603274
  for (let c9 = 0; c9 < innerW; c9++) {
603151
- botRow.push({ char: "─", fg: accent2, bg: bgBlack, bold: false });
603275
+ botRow.push({ char: "─", fg: accent, bg: bgBlack, bold: false });
603152
603276
  }
603153
- botRow.push({ char: "╯", fg: accent2, bg: bgBlack, bold: false });
603277
+ botRow.push({ char: "╯", fg: accent, bg: bgBlack, bold: false });
603154
603278
  grid.push(botRow);
603155
603279
  return {
603156
603280
  id: "default-header",
@@ -649955,15 +650079,8 @@ ${entry.fullContent}`
649955
650079
  event.toolName ?? "unknown",
649956
650080
  event.success ?? false,
649957
650081
  displayContent,
649958
- config.verbose
650082
+ { verbose: config.verbose, durationMs: toolDurationMs }
649959
650083
  );
649960
- if (config.verbose && toolDurationMs > 0) {
649961
- const durStr = toolDurationMs < 1e3 ? `${toolDurationMs}ms` : `${(toolDurationMs / 1e3).toFixed(1)}s`;
649962
- const sizeStr = resultLen > 0 ? ` | ${resultLen.toLocaleString()} chars (~${Math.ceil(resultLen / 4).toLocaleString()} tokens)` : "";
649963
- renderVerbose(
649964
- `${event.toolName ?? "unknown"}: ${durStr}${sizeStr}`
649965
- );
649966
- }
649967
650084
  if (voice?.enabled && event.toolName !== "task_complete" && !displayContent.includes("[FORCED PROGRESS BLOCK") && (voice.voiceMode === "action" || voice.voiceMode === "verbose")) {
649968
650085
  const emoState2 = emotionEngine?.getState();
649969
650086
  const emoCtx2 = emoState2 ? {
@@ -651301,13 +651418,21 @@ ${result.summary}`
651301
651418
  end: () => statusBar.endContentWrite(),
651302
651419
  // During overlays, send render output to the alternate screen via overlayWrite;
651303
651420
  // in neovim mode, route to the Agent Output pane. Otherwise, null (normal).
651304
- redirect: () => isOverlayActive() ? overlayWrite : isNeovimActive() ? writeToNeovimOutput : null
651421
+ redirect: () => isOverlayActive() ? overlayWrite : isNeovimActive() ? writeToNeovimOutput : null,
651422
+ dynamicBlockHost: () => statusBar.isActive && !isOverlayActive() && !isNeovimActive() ? {
651423
+ registerDynamicBlock: (id, render2) => statusBar.registerDynamicBlock(id, render2),
651424
+ appendDynamicBlock: (id) => statusBar.appendDynamicBlock(id)
651425
+ } : null
651305
651426
  });
651306
651427
  }
651307
651428
  setContentWriteHook({
651308
651429
  begin: () => statusBar.beginContentWrite(),
651309
651430
  end: () => statusBar.endContentWrite(),
651310
- redirect: () => isNeovimActive() ? writeToNeovimOutput : null
651431
+ redirect: () => isNeovimActive() ? writeToNeovimOutput : null,
651432
+ dynamicBlockHost: () => statusBar.isActive && !isOverlayActive() && !isNeovimActive() ? {
651433
+ registerDynamicBlock: (id, render2) => statusBar.registerDynamicBlock(id, render2),
651434
+ appendDynamicBlock: (id) => statusBar.appendDynamicBlock(id)
651435
+ } : null
651311
651436
  });
651312
651437
  let resolvedContextWindowSize = 0;
651313
651438
  queryContextSize(config.backendUrl, config.model, config.apiKey).then((ctxSize) => {
@@ -655131,9 +655256,6 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
655131
655256
  if (!setupReady) return;
655132
655257
  persistHistoryLine(line);
655133
655258
  const input = line.trim();
655134
- if (statusBar?.isActive && line.length > 0) {
655135
- statusBar.redrawFooter();
655136
- }
655137
655259
  if (!input) {
655138
655260
  if (pasteBuffer.length > 0) {
655139
655261
  if (pasteIndicatorShown) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.92",
3
+ "version": "1.0.93",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.92",
9
+ "version": "1.0.93",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.92",
3
+ "version": "1.0.93",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",