omnius 1.0.300 → 1.0.302
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 +170 -81
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -594387,6 +594387,7 @@ __export(text_selection_exports, {
|
|
|
594387
594387
|
SEL_END: () => SEL_END,
|
|
594388
594388
|
SEL_START: () => SEL_START,
|
|
594389
594389
|
TextSelection: () => TextSelection,
|
|
594390
|
+
charWidth: () => charWidth,
|
|
594390
594391
|
computeHeaderButtons: () => computeHeaderButtons,
|
|
594391
594392
|
copyText: () => copyText,
|
|
594392
594393
|
hitTestHeaderButton: () => hitTestHeaderButton,
|
|
@@ -594402,8 +594403,19 @@ import { execSync as execSync50 } from "node:child_process";
|
|
|
594402
594403
|
function stripAnsi(s2) {
|
|
594403
594404
|
return s2.replace(/\x1B\[[0-9;]*[A-Za-z]|\x1B\].*?(?:\x07|\x1B\\)/g, "");
|
|
594404
594405
|
}
|
|
594406
|
+
function charWidth(ch) {
|
|
594407
|
+
const cp2 = ch.codePointAt(0);
|
|
594408
|
+
if (cp2 >= 4352 && cp2 <= 4447 || cp2 >= 11904 && cp2 <= 12350 || cp2 >= 12352 && cp2 <= 13247 || cp2 >= 13312 && cp2 <= 19903 || cp2 >= 19968 && cp2 <= 42191 || cp2 >= 44032 && cp2 <= 55215 || cp2 >= 63744 && cp2 <= 64255 || cp2 >= 65072 && cp2 <= 65135 || cp2 >= 65281 && cp2 <= 65376 || cp2 >= 65504 && cp2 <= 65510 || cp2 >= 131072 && cp2 <= 195103 || cp2 >= 126976 && cp2 <= 131071) {
|
|
594409
|
+
return 2;
|
|
594410
|
+
}
|
|
594411
|
+
return 1;
|
|
594412
|
+
}
|
|
594405
594413
|
function visibleLength(s2) {
|
|
594406
|
-
|
|
594414
|
+
let w = 0;
|
|
594415
|
+
for (const ch of stripAnsi(s2)) {
|
|
594416
|
+
w += charWidth(ch);
|
|
594417
|
+
}
|
|
594418
|
+
return w;
|
|
594407
594419
|
}
|
|
594408
594420
|
function copyText(text2) {
|
|
594409
594421
|
try {
|
|
@@ -594416,7 +594428,11 @@ function copyText(text2) {
|
|
|
594416
594428
|
execSync50("clip", { input: text2, timeout: 3e3 });
|
|
594417
594429
|
return true;
|
|
594418
594430
|
}
|
|
594419
|
-
for (const tool of [
|
|
594431
|
+
for (const tool of [
|
|
594432
|
+
"xclip -selection clipboard",
|
|
594433
|
+
"xsel --clipboard --input",
|
|
594434
|
+
"wl-copy"
|
|
594435
|
+
]) {
|
|
594420
594436
|
try {
|
|
594421
594437
|
execSync50(tool, { input: text2, timeout: 3e3 });
|
|
594422
594438
|
return true;
|
|
@@ -594429,8 +594445,14 @@ function copyText(text2) {
|
|
|
594429
594445
|
try {
|
|
594430
594446
|
execSync50("which apt-get", { timeout: 2e3, stdio: "pipe" });
|
|
594431
594447
|
try {
|
|
594432
|
-
execSync50("sudo -n apt-get install -y xclip 2>/dev/null", {
|
|
594433
|
-
|
|
594448
|
+
execSync50("sudo -n apt-get install -y xclip 2>/dev/null", {
|
|
594449
|
+
timeout: 15e3,
|
|
594450
|
+
stdio: "pipe"
|
|
594451
|
+
});
|
|
594452
|
+
execSync50("xclip -selection clipboard", {
|
|
594453
|
+
input: text2,
|
|
594454
|
+
timeout: 3e3
|
|
594455
|
+
});
|
|
594434
594456
|
return true;
|
|
594435
594457
|
} catch {
|
|
594436
594458
|
}
|
|
@@ -594454,7 +594476,10 @@ function pasteText() {
|
|
|
594454
594476
|
return execSync50("pbpaste", { timeout: 3e3, encoding: "utf8" }).trimEnd();
|
|
594455
594477
|
}
|
|
594456
594478
|
if (platform7 === "win32") {
|
|
594457
|
-
return execSync50("powershell -command Get-Clipboard", {
|
|
594479
|
+
return execSync50("powershell -command Get-Clipboard", {
|
|
594480
|
+
timeout: 3e3,
|
|
594481
|
+
encoding: "utf8"
|
|
594482
|
+
}).trimEnd();
|
|
594458
594483
|
}
|
|
594459
594484
|
for (const tool of [
|
|
594460
594485
|
{ cmd: "xclip", args: ["-selection", "clipboard", "-o"] },
|
|
@@ -594462,7 +594487,10 @@ function pasteText() {
|
|
|
594462
594487
|
{ cmd: "wl-paste", args: [] }
|
|
594463
594488
|
]) {
|
|
594464
594489
|
try {
|
|
594465
|
-
const result = execSync50(`${tool.cmd} ${tool.args.join(" ")}`, {
|
|
594490
|
+
const result = execSync50(`${tool.cmd} ${tool.args.join(" ")}`, {
|
|
594491
|
+
timeout: 3e3,
|
|
594492
|
+
encoding: "utf8"
|
|
594493
|
+
});
|
|
594466
594494
|
return result.trimEnd();
|
|
594467
594495
|
} catch {
|
|
594468
594496
|
continue;
|
|
@@ -594611,7 +594639,11 @@ var init_text_selection = __esm({
|
|
|
594611
594639
|
if (mode === "block") {
|
|
594612
594640
|
for (let idx = minRow; idx <= maxRow; idx++) {
|
|
594613
594641
|
if (idx >= 0 && idx < totalLines) {
|
|
594614
|
-
ranges.push({
|
|
594642
|
+
ranges.push({
|
|
594643
|
+
bufferIdx: idx,
|
|
594644
|
+
startCol: minCol - 1,
|
|
594645
|
+
endCol: maxCol - 1
|
|
594646
|
+
});
|
|
594615
594647
|
}
|
|
594616
594648
|
}
|
|
594617
594649
|
} else {
|
|
@@ -594622,11 +594654,17 @@ var init_text_selection = __esm({
|
|
|
594622
594654
|
const endC = isForward ? current.col - 1 : anchor.col - 1;
|
|
594623
594655
|
for (let idx = startR; idx <= endR; idx++) {
|
|
594624
594656
|
if (idx < 0 || idx >= totalLines) continue;
|
|
594625
|
-
const lineLen = visibleLength(
|
|
594657
|
+
const lineLen = visibleLength(
|
|
594658
|
+
this._provider.getContentLines()[idx] ?? ""
|
|
594659
|
+
);
|
|
594626
594660
|
if (idx === startR && idx === endR) {
|
|
594627
594661
|
ranges.push({ bufferIdx: idx, startCol: startC, endCol: endC });
|
|
594628
594662
|
} else if (idx === startR) {
|
|
594629
|
-
ranges.push({
|
|
594663
|
+
ranges.push({
|
|
594664
|
+
bufferIdx: idx,
|
|
594665
|
+
startCol: startC,
|
|
594666
|
+
endCol: Math.max(lineLen, startC)
|
|
594667
|
+
});
|
|
594630
594668
|
} else if (idx === endR) {
|
|
594631
594669
|
ranges.push({ bufferIdx: idx, startCol: 0, endCol: endC });
|
|
594632
594670
|
} else {
|
|
@@ -594647,9 +594685,10 @@ var init_text_selection = __esm({
|
|
|
594647
594685
|
*/
|
|
594648
594686
|
static applyHighlight(line, startCol, endCol) {
|
|
594649
594687
|
const plain = stripAnsi(line);
|
|
594650
|
-
|
|
594688
|
+
const lineLen = visibleLength(plain);
|
|
594689
|
+
if (startCol > lineLen || endCol < 0 || startCol > endCol) return line;
|
|
594651
594690
|
const sc = Math.max(0, startCol);
|
|
594652
|
-
const ec = Math.min(
|
|
594691
|
+
const ec = Math.min(lineLen - 1, endCol);
|
|
594653
594692
|
let result = "";
|
|
594654
594693
|
let visPos = 0;
|
|
594655
594694
|
let i2 = 0;
|
|
@@ -594674,7 +594713,7 @@ var init_text_selection = __esm({
|
|
|
594674
594713
|
result += SEL_END;
|
|
594675
594714
|
inHighlight = false;
|
|
594676
594715
|
}
|
|
594677
|
-
visPos
|
|
594716
|
+
visPos += charWidth(line[i2]);
|
|
594678
594717
|
i2++;
|
|
594679
594718
|
}
|
|
594680
594719
|
if (inHighlight) result += SEL_END;
|
|
@@ -594788,7 +594827,8 @@ function buildSessionHistoryMetricsChip(data) {
|
|
|
594788
594827
|
const parts = [];
|
|
594789
594828
|
parts.push(`${total} entr${total === 1 ? "y" : "ies"}`);
|
|
594790
594829
|
if (completed > 0) parts.push(`${completed} done`);
|
|
594791
|
-
if (data.updatedAt)
|
|
594830
|
+
if (data.updatedAt)
|
|
594831
|
+
parts.push(`updated ${formatShortTimestamp(data.updatedAt)}`);
|
|
594792
594832
|
return parts.join(" · ");
|
|
594793
594833
|
}
|
|
594794
594834
|
function compactDisplayText(value2, maxLen) {
|
|
@@ -594833,11 +594873,11 @@ function wrapListItems(items, width) {
|
|
|
594833
594873
|
let current = "";
|
|
594834
594874
|
for (const item of items) {
|
|
594835
594875
|
const candidate = current === "" ? item : current + sep6 + item;
|
|
594836
|
-
if (
|
|
594876
|
+
if (visibleLength(candidate) <= width) {
|
|
594837
594877
|
current = candidate;
|
|
594838
594878
|
} else {
|
|
594839
594879
|
if (current) lines.push(current);
|
|
594840
|
-
if (
|
|
594880
|
+
if (visibleLength(item) > width) {
|
|
594841
594881
|
const chunks = wrapToWidth(item, width);
|
|
594842
594882
|
lines.push(...chunks.slice(0, -1));
|
|
594843
594883
|
current = chunks[chunks.length - 1] ?? "";
|
|
@@ -594853,10 +594893,12 @@ function buildTopBorder(title, metrics2, width) {
|
|
|
594853
594893
|
const inner = Math.max(4, width - 2);
|
|
594854
594894
|
const titleVisible = stripAnsi(title);
|
|
594855
594895
|
const metricsVisible = stripAnsi(metrics2);
|
|
594896
|
+
const titleVisibleLen = visibleLength(title);
|
|
594897
|
+
const metricsVisibleLen = metrics2 ? visibleLength(metrics2) : 0;
|
|
594856
594898
|
const titleChip = ` ${titleVisible} `;
|
|
594857
|
-
const titleSpan =
|
|
594899
|
+
const titleSpan = titleVisibleLen + 4;
|
|
594858
594900
|
const metricsChip = metricsVisible ? ` ${metricsVisible} ` : "";
|
|
594859
|
-
const metricsSpan = metricsChip
|
|
594901
|
+
const metricsSpan = metricsChip ? metricsVisibleLen + 4 : 0;
|
|
594860
594902
|
let titleSegment;
|
|
594861
594903
|
let metricsSegment;
|
|
594862
594904
|
let fillerWidth;
|
|
@@ -594870,10 +594912,13 @@ function buildTopBorder(title, metrics2, width) {
|
|
|
594870
594912
|
fillerWidth = inner - titleSpan - 2;
|
|
594871
594913
|
} else {
|
|
594872
594914
|
const room = Math.max(3, inner - 8);
|
|
594873
|
-
const truncated =
|
|
594915
|
+
const truncated = titleVisibleLen > room ? titleVisible.slice(0, Math.max(1, room - 1)) + "…" : titleVisible;
|
|
594874
594916
|
titleSegment = `${FG_BORDER}┤${FG_TITLE} ${truncated} ${RESET}${FG_BORDER}├`;
|
|
594875
594917
|
metricsSegment = "";
|
|
594876
|
-
fillerWidth = Math.max(
|
|
594918
|
+
fillerWidth = Math.max(
|
|
594919
|
+
0,
|
|
594920
|
+
inner - (Math.min(room, titleVisibleLen) + 4) - 2
|
|
594921
|
+
);
|
|
594877
594922
|
}
|
|
594878
594923
|
const leadDash = `${FG_BORDER}${BOX_H}`;
|
|
594879
594924
|
const trailDash = `${FG_BORDER}${BOX_H}${RESET}`;
|
|
@@ -594890,11 +594935,11 @@ function buildInnerDivider(width) {
|
|
|
594890
594935
|
}
|
|
594891
594936
|
function buildContentRow(content, width) {
|
|
594892
594937
|
const innerWidth = Math.max(1, width - 4);
|
|
594893
|
-
const
|
|
594938
|
+
const visLen = visibleLength(content);
|
|
594894
594939
|
let padded = content;
|
|
594895
|
-
if (
|
|
594896
|
-
padded = content + " ".repeat(innerWidth -
|
|
594897
|
-
} else if (
|
|
594940
|
+
if (visLen < innerWidth) {
|
|
594941
|
+
padded = content + " ".repeat(innerWidth - visLen);
|
|
594942
|
+
} else if (visLen > innerWidth) {
|
|
594898
594943
|
padded = content;
|
|
594899
594944
|
}
|
|
594900
594945
|
return `${FG_BORDER}${BOX_V}${RESET} ${padded} ${FG_BORDER}${BOX_V}${RESET}`;
|
|
@@ -594949,7 +594994,9 @@ function buildBoxLines(data, width) {
|
|
|
594949
594994
|
lines.push(...buildLabeledFooterLines("Files", data.filesEdited, w));
|
|
594950
594995
|
}
|
|
594951
594996
|
if (data.provenanceAnchors?.length) {
|
|
594952
|
-
lines.push(
|
|
594997
|
+
lines.push(
|
|
594998
|
+
...buildLabeledFooterLines("Provenance", data.provenanceAnchors, w)
|
|
594999
|
+
);
|
|
594953
595000
|
}
|
|
594954
595001
|
}
|
|
594955
595002
|
lines.push(buildBottomBorder(w));
|
|
@@ -594971,8 +595018,13 @@ function buildSessionHistoryBoxLines(data, width) {
|
|
|
594971
595018
|
} else {
|
|
594972
595019
|
for (const entry of entries) {
|
|
594973
595020
|
const status = entry.completed ? "✔" : "○";
|
|
594974
|
-
const task = compactDisplayText(
|
|
594975
|
-
|
|
595021
|
+
const task = compactDisplayText(
|
|
595022
|
+
entry.task || entry.summary || "Untitled session",
|
|
595023
|
+
180
|
|
595024
|
+
);
|
|
595025
|
+
bodyLines.push(
|
|
595026
|
+
`${status} [${formatShortTimestamp(entry.savedAt)}] ${task}`
|
|
595027
|
+
);
|
|
594976
595028
|
const summary = compactDisplayText(entry.summary, 220);
|
|
594977
595029
|
if (summary) bodyLines.push(` Summary: ${summary}`);
|
|
594978
595030
|
const model = compactDisplayText(entry.model, 80);
|
|
@@ -594987,9 +595039,15 @@ function buildSessionHistoryBoxLines(data, width) {
|
|
|
594987
595039
|
}
|
|
594988
595040
|
}
|
|
594989
595041
|
lines.push(buildEmptyRow(w));
|
|
594990
|
-
const footerFiles = uniqueNonEmpty(
|
|
594991
|
-
|
|
594992
|
-
|
|
595042
|
+
const footerFiles = uniqueNonEmpty(
|
|
595043
|
+
entries.flatMap((entry) => entry.filesModified ?? [])
|
|
595044
|
+
).slice(0, 16);
|
|
595045
|
+
const footerTools = uniqueNonEmpty(
|
|
595046
|
+
entries.flatMap((entry) => entry.toolsUsed ?? [])
|
|
595047
|
+
).slice(0, 16);
|
|
595048
|
+
const footerProvenance = uniqueNonEmpty(
|
|
595049
|
+
entries.map((entry) => entry.provenance)
|
|
595050
|
+
).slice(0, 8);
|
|
594993
595051
|
const hasFooter = footerFiles.length > 0 || footerTools.length > 0 || footerProvenance.length > 0;
|
|
594994
595052
|
if (hasFooter) {
|
|
594995
595053
|
lines.push(buildInnerDivider(w));
|
|
@@ -595035,7 +595093,10 @@ function renderSessionHistoryBox(host, data) {
|
|
|
595035
595093
|
model: entry.model
|
|
595036
595094
|
}))
|
|
595037
595095
|
};
|
|
595038
|
-
host.registerDynamicBlock(
|
|
595096
|
+
host.registerDynamicBlock(
|
|
595097
|
+
blockId,
|
|
595098
|
+
(width) => buildSessionHistoryBoxLines(frozen, width)
|
|
595099
|
+
);
|
|
595039
595100
|
host.appendDynamicBlock(blockId);
|
|
595040
595101
|
return blockId;
|
|
595041
595102
|
}
|
|
@@ -596007,6 +596068,7 @@ __export(render_exports, {
|
|
|
596007
596068
|
SLASH_COMMANDS: () => SLASH_COMMANDS2,
|
|
596008
596069
|
breakTelegramCoalesce: () => breakTelegramCoalesce,
|
|
596009
596070
|
c: () => c3,
|
|
596071
|
+
charWidth: () => charWidth2,
|
|
596010
596072
|
fileLink: () => fileLink,
|
|
596011
596073
|
formatInlineMarkdown: () => formatInlineMarkdown,
|
|
596012
596074
|
formatMarkdownBlock: () => formatMarkdownBlock,
|
|
@@ -596254,8 +596316,30 @@ function toolColorSeq(code8, bold = false) {
|
|
|
596254
596316
|
function toolResetSeq() {
|
|
596255
596317
|
return _colorsEnabled && stdoutIsTTY() ? RESET2 : "";
|
|
596256
596318
|
}
|
|
596319
|
+
function charWidth2(ch) {
|
|
596320
|
+
const cp2 = ch.codePointAt(0);
|
|
596321
|
+
if (cp2 >= 4352 && cp2 <= 4447 || // Hangul Jamo
|
|
596322
|
+
cp2 >= 11904 && cp2 <= 12350 || // CJK Radicals, Kangxi, CJK Symbols
|
|
596323
|
+
cp2 >= 12352 && cp2 <= 13247 || // Hiragana, Katakana, CJK Compat
|
|
596324
|
+
cp2 >= 13312 && cp2 <= 19903 || // CJK Ext A
|
|
596325
|
+
cp2 >= 19968 && cp2 <= 42191 || // CJK Unified, Yi
|
|
596326
|
+
cp2 >= 44032 && cp2 <= 55215 || // Hangul Syllables
|
|
596327
|
+
cp2 >= 63744 && cp2 <= 64255 || // CJK Compat Ideographs
|
|
596328
|
+
cp2 >= 65072 && cp2 <= 65135 || // CJK Compat Forms
|
|
596329
|
+
cp2 >= 65281 && cp2 <= 65376 || // Fullwidth Forms
|
|
596330
|
+
cp2 >= 65504 && cp2 <= 65510 || // Fullwidth Signs
|
|
596331
|
+
cp2 >= 131072 && cp2 <= 195103 || // CJK Ext B-F, Compat Supplement
|
|
596332
|
+
cp2 >= 126976 && cp2 <= 131071) {
|
|
596333
|
+
return 2;
|
|
596334
|
+
}
|
|
596335
|
+
return 1;
|
|
596336
|
+
}
|
|
596257
596337
|
function visibleLen(text2) {
|
|
596258
|
-
|
|
596338
|
+
let w = 0;
|
|
596339
|
+
for (const ch of stripAnsi(text2)) {
|
|
596340
|
+
w += charWidth2(ch);
|
|
596341
|
+
}
|
|
596342
|
+
return w;
|
|
596259
596343
|
}
|
|
596260
596344
|
function truncateAnsiToWidth(text2, width) {
|
|
596261
596345
|
if (width <= 0) return "";
|
|
@@ -596273,9 +596357,10 @@ function truncateAnsiToWidth(text2, width) {
|
|
|
596273
596357
|
out += value2;
|
|
596274
596358
|
continue;
|
|
596275
596359
|
}
|
|
596276
|
-
|
|
596360
|
+
const cw = charWidth2(value2);
|
|
596361
|
+
if (visible + cw > target) break;
|
|
596277
596362
|
out += value2;
|
|
596278
|
-
visible +=
|
|
596363
|
+
visible += cw;
|
|
596279
596364
|
}
|
|
596280
596365
|
return `${out}…${hasAnsi ? RESET2 : ""}`;
|
|
596281
596366
|
}
|
|
@@ -596346,9 +596431,10 @@ function findVisibleBreak(text2, targetLen) {
|
|
|
596346
596431
|
offset = match.index + token.length;
|
|
596347
596432
|
continue;
|
|
596348
596433
|
}
|
|
596349
|
-
|
|
596434
|
+
const cw = charWidth2(token);
|
|
596435
|
+
if (visible + cw > targetLen) break;
|
|
596436
|
+
visible += cw;
|
|
596350
596437
|
offset = match.index + token.length;
|
|
596351
|
-
if (visible >= targetLen) break;
|
|
596352
596438
|
}
|
|
596353
596439
|
return offset;
|
|
596354
596440
|
}
|
|
@@ -607473,10 +607559,7 @@ var init_status_bar = __esm({
|
|
|
607473
607559
|
return fg2;
|
|
607474
607560
|
};
|
|
607475
607561
|
const decorateMenuButton = (cmd, label) => {
|
|
607476
|
-
return
|
|
607477
|
-
cmd,
|
|
607478
|
-
`\x1B[38;5;${HEADER_ACCENT_GREEN}m🭁\x1B[0m${HEADER_BUTTON_FG}${HEADER_BUTTON_BG}${label}\x1B[0m${PANEL_BG_SEQ}\x1B[38;5;${HEADER_ACCENT_GREEN}m🭝\x1B[0m${PANEL_BG_SEQ}`
|
|
607479
|
-
);
|
|
607562
|
+
return `\x1B[38;5;${HEADER_ACCENT_GREEN}m🭁\x1B[0m${HEADER_BUTTON_FG}${HEADER_BUTTON_BG}${label}\x1B[0m${PANEL_BG_SEQ}\x1B[38;5;${HEADER_ACCENT_GREEN}m🭝\x1B[0m${PANEL_BG_SEQ}`;
|
|
607480
607563
|
};
|
|
607481
607564
|
const renderBtn = (cmd, label) => {
|
|
607482
607565
|
const fg2 = buttonFg(cmd);
|
|
@@ -607800,16 +607883,7 @@ var init_status_bar = __esm({
|
|
|
607800
607883
|
).join(" ") : "no sub-agents";
|
|
607801
607884
|
buf += ` ${subAgents.substring(0, w - 4)}`;
|
|
607802
607885
|
buf += `\x1B[${subRow};${w}H${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
607803
|
-
const
|
|
607804
|
-
buf += `\x1B[${sepRow};1H${PANEL_BG_SEQ}\x1B[2K`;
|
|
607805
|
-
buf += `${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
607806
|
-
buf += `\x1B[${sepRow};${w}H${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
607807
|
-
const scrollRow = sepRow + 1;
|
|
607808
|
-
buf += `\x1B[${scrollRow};1H${PANEL_BG_SEQ}\x1B[2K`;
|
|
607809
|
-
buf += `${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
607810
|
-
buf += `\x1B[38;5;${TEXT_DIM}m${PANEL_BG_SEQ}`;
|
|
607811
|
-
buf += `scroll: ${scrollPct}`.substring(0, w - 4);
|
|
607812
|
-
buf += `\x1B[${scrollRow};${w}H${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
607886
|
+
const scrollRow = subRow + 1;
|
|
607813
607887
|
buf += `\x1B[${scrollRow};1H${BOX_FG}╰${"─".repeat(w - 2)}${BOX_FG}╯${RESET4}${PANEL_BG_SEQ}`;
|
|
607814
607888
|
} else {
|
|
607815
607889
|
const scrollRow = hdrRow + 1;
|
|
@@ -608824,14 +608898,16 @@ var init_status_bar = __esm({
|
|
|
608824
608898
|
const wasExpanded = this._headerExpanded;
|
|
608825
608899
|
this._headerExpanded = !this._headerExpanded;
|
|
608826
608900
|
this.refreshHeaderAndFooter();
|
|
608827
|
-
this.scrollRegionTop += this._headerExpanded ?
|
|
608901
|
+
this.scrollRegionTop += this._headerExpanded ? 2 : -2;
|
|
608828
608902
|
if (this.active) {
|
|
608829
608903
|
this.applyScrollRegion();
|
|
608830
608904
|
this.renderFooterAndPositionInput();
|
|
608831
608905
|
}
|
|
608832
608906
|
if (!this._headerExpanded && wasExpanded) {
|
|
608833
608907
|
const base3 = this.scrollRegionTop;
|
|
608834
|
-
|
|
608908
|
+
let buf = `\x1B[${base3};1H\x1B[2K\x1B[${base3 + 1};1H\x1B[2K`;
|
|
608909
|
+
buf += `\x1B[${base3};1H\x1BM\x1BM`;
|
|
608910
|
+
this.termWrite(buf);
|
|
608835
608911
|
}
|
|
608836
608912
|
return;
|
|
608837
608913
|
}
|
|
@@ -609589,17 +609665,30 @@ ${CONTENT_BG_SEQ}`);
|
|
|
609589
609665
|
const ranges = [];
|
|
609590
609666
|
let start2 = 0;
|
|
609591
609667
|
let available = width;
|
|
609668
|
+
let col = 0;
|
|
609592
609669
|
while (start2 < visible.length) {
|
|
609593
|
-
|
|
609670
|
+
let remainingVisible = 0;
|
|
609671
|
+
for (const ch of visible.slice(start2)) {
|
|
609672
|
+
remainingVisible += charWidth2(ch);
|
|
609673
|
+
}
|
|
609674
|
+
if (remainingVisible <= available) {
|
|
609594
609675
|
ranges.push({ start: start2, end: visible.length });
|
|
609595
609676
|
break;
|
|
609596
609677
|
}
|
|
609597
|
-
|
|
609598
|
-
let
|
|
609599
|
-
|
|
609600
|
-
|
|
609601
|
-
|
|
609602
|
-
|
|
609678
|
+
let end = start2;
|
|
609679
|
+
let used = 0;
|
|
609680
|
+
for (const ch of visible.slice(start2)) {
|
|
609681
|
+
const cw = charWidth2(ch);
|
|
609682
|
+
if (used + cw > available) break;
|
|
609683
|
+
used += cw;
|
|
609684
|
+
end += ch.length;
|
|
609685
|
+
}
|
|
609686
|
+
let breakAt = end;
|
|
609687
|
+
const limit = end;
|
|
609688
|
+
const lastSpace = visible.lastIndexOf(" ", limit);
|
|
609689
|
+
if (lastSpace > start2 + 2) breakAt = lastSpace;
|
|
609690
|
+
breakAt = Math.max(start2 + 1, breakAt);
|
|
609691
|
+
ranges.push({ start: start2, end: breakAt });
|
|
609603
609692
|
start2 = breakAt;
|
|
609604
609693
|
while (start2 < visible.length && /\s/.test(visible[start2] ?? "")) start2++;
|
|
609605
609694
|
available = Math.max(8, width - continuationIndent);
|
|
@@ -609625,7 +609714,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
609625
609714
|
}
|
|
609626
609715
|
}
|
|
609627
609716
|
if (visible >= target) return i2;
|
|
609628
|
-
visible
|
|
609717
|
+
visible += charWidth2(line[i2]);
|
|
609629
609718
|
}
|
|
609630
609719
|
return line.length;
|
|
609631
609720
|
}
|
|
@@ -609935,8 +610024,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
609935
610024
|
const m2 = this.metrics;
|
|
609936
610025
|
const termWidth = getTermWidth();
|
|
609937
610026
|
const pastel2 = (code8, s2) => `${PANEL_BG_SEQ}\x1B[38;5;${code8}m${s2}\x1B[0m${PANEL_BG_SEQ}`;
|
|
609938
|
-
const pipe3 =
|
|
609939
|
-
const pipeW =
|
|
610027
|
+
const pipe3 = `${PANEL_BG_SEQ}${BOX_FG}│${RESET4}${PANEL_BG_SEQ}`;
|
|
610028
|
+
const pipeW = 1;
|
|
609940
610029
|
const BTN_L = _isWindows ? "" : "🛁";
|
|
609941
610030
|
const BTN_R = _isWindows ? "" : "🛂";
|
|
609942
610031
|
const BTN_L_W = _isWindows ? 0 : 2;
|
|
@@ -610157,40 +610246,40 @@ ${CONTENT_BG_SEQ}`);
|
|
|
610157
610246
|
if (rm4.cpuUtil >= 0) {
|
|
610158
610247
|
const cpuColor = rm4.cpuUtil > 80 ? c3.red : rm4.cpuUtil > 50 ? c3.yellow : c3.green;
|
|
610159
610248
|
const cpuCoresInfo = rm4.cpuCores > 0 ? ` (${_StatusBar.digitBar(rm4.cpuCores)}c` + (rm4.cpuModel ? " " + rm4.cpuModel.replace(/\s+/g, " ").slice(0, 30) : "") + ")" : "";
|
|
610160
|
-
hwExpStr += `CPU
|
|
610161
|
-
hwCompStr += `CPU
|
|
610249
|
+
hwExpStr += `CPU${cpuColor(_StatusBar.digitBar(rm4.cpuUtil) + "%")}${c3.dim(cpuCoresInfo)}`;
|
|
610250
|
+
hwCompStr += `CPU${cpuColor(_StatusBar.digitBar(rm4.cpuUtil) + "%")}`;
|
|
610162
610251
|
hwExpW += 4 + `${rm4.cpuUtil}%`.length + cpuCoresInfo.length;
|
|
610163
610252
|
hwCompW += 4 + `${rm4.cpuUtil}%`.length;
|
|
610164
610253
|
}
|
|
610165
610254
|
if (rm4.memUtil >= 0) {
|
|
610166
610255
|
const memColor = rm4.memUtil > 80 ? c3.red : rm4.memUtil > 50 ? c3.yellow : c3.green;
|
|
610167
610256
|
const memDetail = rm4.memTotalGB > 0 ? ` (${rm4.memUsedGB}/${rm4.memTotalGB}GB)` : "";
|
|
610168
|
-
hwExpStr += ` RAM
|
|
610169
|
-
hwCompStr += ` RAM
|
|
610257
|
+
hwExpStr += ` RAM${memColor(_StatusBar.digitBar(rm4.memUtil) + "%")}${c3.dim(memDetail)}`;
|
|
610258
|
+
hwCompStr += ` RAM${memColor(_StatusBar.digitBar(rm4.memUtil) + "%")}`;
|
|
610170
610259
|
hwExpW += 5 + `${rm4.memUtil}%`.length + memDetail.length;
|
|
610171
610260
|
hwCompW += 5 + `${rm4.memUtil}%`.length;
|
|
610172
610261
|
}
|
|
610173
610262
|
if (rm4.diskUtil >= 0) {
|
|
610174
610263
|
const diskColor = rm4.diskUtil > 90 ? c3.red : rm4.diskUtil > 75 ? c3.yellow : c3.green;
|
|
610175
610264
|
const diskDetail = rm4.diskTotalGB > 0 ? ` (${rm4.diskFreeGB.toFixed(rm4.diskFreeGB < 10 ? 1 : 0)}GB free)` : "";
|
|
610176
|
-
hwExpStr += ` DISK
|
|
610177
|
-
hwCompStr += ` DISK
|
|
610265
|
+
hwExpStr += ` DISK${diskColor(_StatusBar.digitBar(rm4.diskUtil) + "%")}${c3.dim(diskDetail)}`;
|
|
610266
|
+
hwCompStr += ` DISK${diskColor(_StatusBar.digitBar(rm4.diskUtil) + "%")}`;
|
|
610178
610267
|
hwExpW += 6 + `${rm4.diskUtil}%`.length + diskDetail.length;
|
|
610179
610268
|
hwCompW += 6 + `${rm4.diskUtil}%`.length;
|
|
610180
610269
|
}
|
|
610181
610270
|
if (rm4.gpuUtil >= 0) {
|
|
610182
610271
|
const gpuColor = rm4.gpuUtil > 80 ? c3.red : rm4.gpuUtil > 50 ? c3.yellow : c3.green;
|
|
610183
610272
|
const gpuNameShort = rm4.gpuName ? ` (${rm4.gpuName.slice(0, 20)})` : "";
|
|
610184
|
-
hwExpStr += ` GPU
|
|
610185
|
-
hwCompStr += ` GPU
|
|
610273
|
+
hwExpStr += ` GPU${gpuColor(_StatusBar.digitBar(rm4.gpuUtil) + "%")}${c3.dim(gpuNameShort)}`;
|
|
610274
|
+
hwCompStr += ` GPU${gpuColor(_StatusBar.digitBar(rm4.gpuUtil) + "%")}`;
|
|
610186
610275
|
hwExpW += 5 + `${rm4.gpuUtil}%`.length + gpuNameShort.length;
|
|
610187
610276
|
hwCompW += 5 + `${rm4.gpuUtil}%`.length;
|
|
610188
610277
|
}
|
|
610189
610278
|
if (rm4.vramUtil >= 0) {
|
|
610190
610279
|
const vramColor = rm4.vramUtil > 80 ? c3.red : rm4.vramUtil > 50 ? c3.yellow : c3.green;
|
|
610191
610280
|
const vramDetail = rm4.vramTotalMB > 0 ? ` (${rm4.vramUsedMB}/${rm4.vramTotalMB}MB)` : "";
|
|
610192
|
-
hwExpStr += ` VRAM
|
|
610193
|
-
hwCompStr += ` VRAM
|
|
610281
|
+
hwExpStr += ` VRAM${vramColor(_StatusBar.digitBar(rm4.vramUtil) + "%")}${c3.dim(vramDetail)}`;
|
|
610282
|
+
hwCompStr += ` VRAM${vramColor(_StatusBar.digitBar(rm4.vramUtil) + "%")}`;
|
|
610194
610283
|
hwExpW += 6 + `${rm4.vramUtil}%`.length + vramDetail.length;
|
|
610195
610284
|
hwCompW += 6 + `${rm4.vramUtil}%`.length;
|
|
610196
610285
|
}
|
|
@@ -610207,8 +610296,8 @@ ${CONTENT_BG_SEQ}`);
|
|
|
610207
610296
|
0
|
|
610208
610297
|
);
|
|
610209
610298
|
const ageSummary = oldestAgeMs > 0 ? ` age=${formatPoolAge(oldestAgeMs)}` : "";
|
|
610210
|
-
const poolText = ` OLLAMA
|
|
610211
|
-
const compactText3 = ` OLLAMA
|
|
610299
|
+
const poolText = ` OLLAMA${poolColor(`${pool3.mode}:${poolDetail}`)}${c3.dim(pidSummary)}${c3.dim(ageSummary)}`;
|
|
610300
|
+
const compactText3 = ` OLLAMA${poolColor(pool3.mode === "constrained" ? "queue" : `${_StatusBar.digitBar(ready)}/${_StatusBar.digitBar(target)}`)}`;
|
|
610212
610301
|
hwExpStr += poolText;
|
|
610213
610302
|
hwCompStr += compactText3;
|
|
610214
610303
|
hwExpW += 8 + `${pool3.mode}:${poolDetail}`.length + pidSummary.length + ageSummary.length;
|
|
@@ -610310,7 +610399,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
610310
610399
|
const sec = sections[idx];
|
|
610311
610400
|
const content = isCompact[idx] ? sec.compact : sec.expanded;
|
|
610312
610401
|
const color = sec.btnColor ?? 183;
|
|
610313
|
-
result +=
|
|
610402
|
+
result += `${PANEL_BG_SEQ}\x1B[38;5;${color}m${content}\x1B[0m`;
|
|
610314
610403
|
}
|
|
610315
610404
|
return result.replace(/\x1B\[0m/g, `\x1B[0m${PANEL_BG_SEQ}`);
|
|
610316
610405
|
}
|
|
@@ -646438,8 +646527,8 @@ function thinkingBoxTop(width) {
|
|
|
646438
646527
|
function thinkingBoxRow(text2, width) {
|
|
646439
646528
|
const inner = Math.max(1, width - 4);
|
|
646440
646529
|
const plain = stripAnsi(text2);
|
|
646441
|
-
const truncated = plain
|
|
646442
|
-
const plainLen =
|
|
646530
|
+
const truncated = visibleLength(plain) > inner ? plain.slice(0, Math.max(1, inner - 1)) + "…" : text2;
|
|
646531
|
+
const plainLen = visibleLength(truncated);
|
|
646443
646532
|
const padding = " ".repeat(Math.max(0, inner - plainLen));
|
|
646444
646533
|
return `│ ${truncated}${padding} │`;
|
|
646445
646534
|
}
|
|
@@ -646793,10 +646882,10 @@ var init_stream_renderer = __esm({
|
|
|
646793
646882
|
rendered = this.highlightCode(cropped);
|
|
646794
646883
|
}
|
|
646795
646884
|
} else if (this.looksLikeJson(raw)) {
|
|
646796
|
-
const cropped = raw
|
|
646885
|
+
const cropped = visibleLength(raw) > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
|
|
646797
646886
|
rendered = this.highlightJson(cropped, false);
|
|
646798
646887
|
} else {
|
|
646799
|
-
if (raw
|
|
646888
|
+
if (visibleLength(raw) > maxW || this.lineStarted && this._cursorCol + visibleLength(raw) > maxW) {
|
|
646800
646889
|
emitWrapped(raw, (s2) => this.highlightMarkdown(s2), hasNewline);
|
|
646801
646890
|
return;
|
|
646802
646891
|
}
|
|
@@ -646805,7 +646894,7 @@ var init_stream_renderer = __esm({
|
|
|
646805
646894
|
break;
|
|
646806
646895
|
}
|
|
646807
646896
|
}
|
|
646808
|
-
if (kind === "content" && this.lineStarted && this._cursorCol + raw
|
|
646897
|
+
if (kind === "content" && this.lineStarted && this._cursorCol + visibleLength(raw) > maxW) {
|
|
646809
646898
|
emitWrapped(raw, (s2) => this.highlightMarkdown(s2), hasNewline);
|
|
646810
646899
|
return;
|
|
646811
646900
|
}
|
|
@@ -646878,9 +646967,9 @@ var init_stream_renderer = __esm({
|
|
|
646878
646967
|
const lastNl = text2.lastIndexOf("\n");
|
|
646879
646968
|
if (lastNl >= 0) {
|
|
646880
646969
|
const after = text2.slice(lastNl + 1);
|
|
646881
|
-
this._cursorCol =
|
|
646970
|
+
this._cursorCol = visibleLength(after);
|
|
646882
646971
|
} else {
|
|
646883
|
-
this._cursorCol +=
|
|
646972
|
+
this._cursorCol += visibleLength(text2);
|
|
646884
646973
|
}
|
|
646885
646974
|
if (this.onRenderedLine) {
|
|
646886
646975
|
const parts = text2.split("\n");
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.302",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.302",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED