omnius 1.0.262 → 1.0.263

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,29 @@ 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();
595376
+ while (visibleLen(remaining) > avail) {
595377
+ let breakAt = remaining.length;
595378
+ let bestBreak = remaining.lastIndexOf(" ", avail);
595379
+ if (bestBreak > 0) {
595380
+ breakAt = bestBreak;
595381
+ } else {
595382
+ breakAt = findVisibleBreak(remaining, avail);
595383
+ }
595384
+ const line = remaining.slice(0, breakAt).trimEnd();
595385
+ out.push(prefix ? prefix + line : line);
595386
+ remaining = remaining.slice(breakAt).trimStart();
595379
595387
  }
595380
- out.push(remaining);
595388
+ const lastLine = prefix ? prefix + remaining : remaining;
595389
+ out.push(lastLine);
595381
595390
  return out;
595382
595391
  }
595383
595392
  function wrapLinesWithPrefix(content, prefix, maxWidth) {
@@ -595545,7 +595554,8 @@ function wrapFooterItems(items, width) {
595545
595554
  }
595546
595555
  if (current) lines.push(current);
595547
595556
  if (clean5.length > width) {
595548
- const chunks = wrapToolTextLine(clean5, width);
595557
+ const pipe3 = "│ ";
595558
+ const chunks = wrapToolTextLine(clean5, width, pipe3);
595549
595559
  lines.push(...chunks.slice(0, -1));
595550
595560
  current = chunks[chunks.length - 1] ?? "";
595551
595561
  } else {
@@ -595616,7 +595626,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595616
595626
  ];
595617
595627
  const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
595618
595628
  for (const text2 of triggerTexts) {
595619
- const chunks = wrapToolTextLine(text2, innerWidth);
595629
+ const pipe3 = "│ ";
595630
+ const chunks = wrapToolTextLine(text2, innerWidth, pipe3);
595620
595631
  for (const chunk of chunks) {
595621
595632
  lines.push(
595622
595633
  buildToolContentRow(formatToolBoxLine(chunk, "tool"), w, colorCode)
@@ -595627,7 +595638,8 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595627
595638
  if (resultBody.length > 0) {
595628
595639
  for (const bodyLine of resultBody) {
595629
595640
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595630
- const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth);
595641
+ const pipe3 = "│ ";
595642
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595631
595643
  for (const chunk of chunks) {
595632
595644
  lines.push(
595633
595645
  buildToolContentRow(
@@ -595668,7 +595680,8 @@ function buildToolBoxLines(data, width) {
595668
595680
  ];
595669
595681
  for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
595670
595682
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595671
- const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth);
595683
+ const pipe3 = "│ ";
595684
+ const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595672
595685
  for (const chunk of chunks) {
595673
595686
  lines.push(
595674
595687
  buildToolContentRow(
@@ -596278,17 +596291,26 @@ function wrapTaskCompleteSummary(summary) {
596278
596291
  }
596279
596292
  return lines.join("\n");
596280
596293
  }
596281
- function wrapPlainLine(line, width) {
596294
+ function wrapPlainLine(line, width, prefix = "") {
596282
596295
  const out = [];
596283
596296
  const continuationIndent = hangingIndentForPlainLine(line, width);
596297
+ const prefixLen = visibleLen(prefix);
596298
+ const avail = Math.max(4, width - prefixLen);
596284
596299
  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();
596300
+ while (visibleLen(remaining) > avail) {
596301
+ let breakAt = remaining.length;
596302
+ let bestBreak = remaining.lastIndexOf(" ", avail);
596303
+ if (bestBreak > 0) {
596304
+ breakAt = bestBreak;
596305
+ } else {
596306
+ breakAt = findVisibleBreak(remaining, avail);
596307
+ }
596308
+ const wrappedLine = remaining.slice(0, breakAt).trimEnd();
596309
+ out.push(prefix ? prefix + wrappedLine : wrappedLine);
596310
+ remaining = remaining.slice(breakAt).trimStart();
596290
596311
  }
596291
- out.push(remaining);
596312
+ const lastLine = prefix ? prefix + remaining : remaining;
596313
+ out.push(lastLine);
596292
596314
  return out;
596293
596315
  }
596294
596316
  function hangingIndentForPlainLine(line, width) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.262",
3
+ "version": "1.0.263",
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.263",
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.263",
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",