omnius 1.0.262 → 1.0.264

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
@@ -595364,20 +595364,28 @@ function truncateAnsiToWidth(text2, width) {
595364
595364
  }
595365
595365
  return `${out}…${hasAnsi ? RESET2 : ""}`;
595366
595366
  }
595367
- function wrapToolTextLine(text2, width) {
595367
+ function wrapToolTextLine(text2, width, prefix = "") {
595368
595368
  text2 = sanitizeToolBoxContent(text2);
595369
- if (width <= 0) return [text2];
595370
- if (text2.length === 0) return [""];
595369
+ if (width <= 0) return prefix ? [prefix] : [text2];
595370
+ if (text2.length === 0) return prefix ? [prefix] : [""];
595371
595371
  const out = [];
595372
595372
  const continuationIndent = hangingIndentForPlainLine(text2, width);
595373
+ const prefixLen = visibleLen(prefix);
595374
+ const avail = Math.max(4, width - prefixLen);
595373
595375
  let remaining = text2;
595374
- while (remaining.length > width) {
595375
- let breakAt = remaining.lastIndexOf(" ", width);
595376
- if (breakAt <= continuationIndent.length) breakAt = width;
595377
- out.push(remaining.slice(0, breakAt).trimEnd());
595378
- remaining = continuationIndent + remaining.slice(breakAt).trimStart();
595379
- }
595380
- out.push(remaining);
595376
+ while (visibleLen(remaining) > avail) {
595377
+ const breakOffset = findVisibleBreak(remaining, avail);
595378
+ let breakAt = breakOffset;
595379
+ let bestBreak = remaining.lastIndexOf(" ", breakOffset);
595380
+ if (bestBreak > 0) {
595381
+ breakAt = bestBreak;
595382
+ }
595383
+ const line = remaining.slice(0, breakAt).trimEnd();
595384
+ out.push(prefix ? prefix + line : line);
595385
+ remaining = remaining.slice(breakAt).trimStart();
595386
+ }
595387
+ const lastLine = prefix ? prefix + remaining : remaining;
595388
+ out.push(lastLine);
595381
595389
  return out;
595382
595390
  }
595383
595391
  function wrapLinesWithPrefix(content, prefix, maxWidth) {
@@ -595397,12 +595405,11 @@ function wrapLinesWithPrefix(content, prefix, maxWidth) {
595397
595405
  }
595398
595406
  let remaining = trimmed;
595399
595407
  while (visibleLen(remaining) > avail) {
595400
- let breakAt = remaining.length;
595401
- let bestBreak = remaining.lastIndexOf(" ", avail);
595408
+ const breakOffset = findVisibleBreak(remaining, avail);
595409
+ let breakAt = breakOffset;
595410
+ let bestBreak = remaining.lastIndexOf(" ", breakOffset);
595402
595411
  if (bestBreak > 0) {
595403
595412
  breakAt = bestBreak;
595404
- } else {
595405
- breakAt = findVisibleBreak(remaining, avail);
595406
595413
  }
595407
595414
  out.push(prefix + remaining.slice(0, breakAt).trimEnd());
595408
595415
  remaining = remaining.slice(breakAt).trimStart();
@@ -595545,7 +595552,8 @@ function wrapFooterItems(items, width) {
595545
595552
  }
595546
595553
  if (current) lines.push(current);
595547
595554
  if (clean5.length > width) {
595548
- const chunks = wrapToolTextLine(clean5, width);
595555
+ const pipe3 = "│ ";
595556
+ const chunks = wrapToolTextLine(clean5, width, pipe3);
595549
595557
  lines.push(...chunks.slice(0, -1));
595550
595558
  current = chunks[chunks.length - 1] ?? "";
595551
595559
  } else {
@@ -595616,7 +595624,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595616
595624
  ];
595617
595625
  const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
595618
595626
  for (const text2 of triggerTexts) {
595619
- const chunks = wrapToolTextLine(text2, innerWidth);
595627
+ const pipe3 = "│ ";
595628
+ const chunks = wrapToolTextLine(text2, innerWidth, pipe3);
595620
595629
  for (const chunk of chunks) {
595621
595630
  lines.push(
595622
595631
  buildToolContentRow(formatToolBoxLine(chunk, "tool"), w, colorCode)
@@ -595627,7 +595636,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595627
595636
  if (resultBody.length > 0) {
595628
595637
  for (const bodyLine of resultBody) {
595629
595638
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595630
- const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth);
595639
+ const pipe3 = "│ ";
595640
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595631
595641
  for (const chunk of chunks) {
595632
595642
  lines.push(
595633
595643
  buildToolContentRow(
@@ -595668,7 +595678,8 @@ function buildToolBoxLines(data, width) {
595668
595678
  ];
595669
595679
  for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
595670
595680
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595671
- const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth);
595681
+ const pipe3 = "│ ";
595682
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595672
595683
  for (const chunk of chunks) {
595673
595684
  lines.push(
595674
595685
  buildToolContentRow(
@@ -596278,17 +596289,26 @@ function wrapTaskCompleteSummary(summary) {
596278
596289
  }
596279
596290
  return lines.join("\n");
596280
596291
  }
596281
- function wrapPlainLine(line, width) {
596292
+ function wrapPlainLine(line, width, prefix = "") {
596282
596293
  const out = [];
596283
596294
  const continuationIndent = hangingIndentForPlainLine(line, width);
596295
+ const prefixLen = visibleLen(prefix);
596296
+ const avail = Math.max(4, width - prefixLen);
596284
596297
  let remaining = line;
596285
- while (remaining.length > width) {
596286
- let breakAt = remaining.lastIndexOf(" ", width);
596287
- if (breakAt <= continuationIndent.length) breakAt = width;
596288
- out.push(remaining.slice(0, breakAt).trimEnd());
596289
- remaining = continuationIndent + remaining.slice(breakAt).trimStart();
596298
+ while (visibleLen(remaining) > avail) {
596299
+ let breakAt = remaining.length;
596300
+ let bestBreak = remaining.lastIndexOf(" ", avail);
596301
+ if (bestBreak > 0) {
596302
+ breakAt = bestBreak;
596303
+ } else {
596304
+ breakAt = findVisibleBreak(remaining, avail);
596305
+ }
596306
+ const wrappedLine = remaining.slice(0, breakAt).trimEnd();
596307
+ out.push(prefix ? prefix + wrappedLine : wrappedLine);
596308
+ remaining = remaining.slice(breakAt).trimStart();
596290
596309
  }
596291
- out.push(remaining);
596310
+ const lastLine = prefix ? prefix + remaining : remaining;
596311
+ out.push(lastLine);
596292
596312
  return out;
596293
596313
  }
596294
596314
  function hangingIndentForPlainLine(line, width) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.262",
3
+ "version": "1.0.264",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.262",
9
+ "version": "1.0.264",
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.262",
3
+ "version": "1.0.264",
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",