omnius 1.0.301 → 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 +149 -50
- 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
|
}
|
|
@@ -609579,17 +609665,30 @@ ${CONTENT_BG_SEQ}`);
|
|
|
609579
609665
|
const ranges = [];
|
|
609580
609666
|
let start2 = 0;
|
|
609581
609667
|
let available = width;
|
|
609668
|
+
let col = 0;
|
|
609582
609669
|
while (start2 < visible.length) {
|
|
609583
|
-
|
|
609670
|
+
let remainingVisible = 0;
|
|
609671
|
+
for (const ch of visible.slice(start2)) {
|
|
609672
|
+
remainingVisible += charWidth2(ch);
|
|
609673
|
+
}
|
|
609674
|
+
if (remainingVisible <= available) {
|
|
609584
609675
|
ranges.push({ start: start2, end: visible.length });
|
|
609585
609676
|
break;
|
|
609586
609677
|
}
|
|
609587
|
-
|
|
609588
|
-
let
|
|
609589
|
-
|
|
609590
|
-
|
|
609591
|
-
|
|
609592
|
-
|
|
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 });
|
|
609593
609692
|
start2 = breakAt;
|
|
609594
609693
|
while (start2 < visible.length && /\s/.test(visible[start2] ?? "")) start2++;
|
|
609595
609694
|
available = Math.max(8, width - continuationIndent);
|
|
@@ -609615,7 +609714,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
609615
609714
|
}
|
|
609616
609715
|
}
|
|
609617
609716
|
if (visible >= target) return i2;
|
|
609618
|
-
visible
|
|
609717
|
+
visible += charWidth2(line[i2]);
|
|
609619
609718
|
}
|
|
609620
609719
|
return line.length;
|
|
609621
609720
|
}
|
|
@@ -646428,8 +646527,8 @@ function thinkingBoxTop(width) {
|
|
|
646428
646527
|
function thinkingBoxRow(text2, width) {
|
|
646429
646528
|
const inner = Math.max(1, width - 4);
|
|
646430
646529
|
const plain = stripAnsi(text2);
|
|
646431
|
-
const truncated = plain
|
|
646432
|
-
const plainLen =
|
|
646530
|
+
const truncated = visibleLength(plain) > inner ? plain.slice(0, Math.max(1, inner - 1)) + "…" : text2;
|
|
646531
|
+
const plainLen = visibleLength(truncated);
|
|
646433
646532
|
const padding = " ".repeat(Math.max(0, inner - plainLen));
|
|
646434
646533
|
return `│ ${truncated}${padding} │`;
|
|
646435
646534
|
}
|
|
@@ -646783,10 +646882,10 @@ var init_stream_renderer = __esm({
|
|
|
646783
646882
|
rendered = this.highlightCode(cropped);
|
|
646784
646883
|
}
|
|
646785
646884
|
} else if (this.looksLikeJson(raw)) {
|
|
646786
|
-
const cropped = raw
|
|
646885
|
+
const cropped = visibleLength(raw) > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
|
|
646787
646886
|
rendered = this.highlightJson(cropped, false);
|
|
646788
646887
|
} else {
|
|
646789
|
-
if (raw
|
|
646888
|
+
if (visibleLength(raw) > maxW || this.lineStarted && this._cursorCol + visibleLength(raw) > maxW) {
|
|
646790
646889
|
emitWrapped(raw, (s2) => this.highlightMarkdown(s2), hasNewline);
|
|
646791
646890
|
return;
|
|
646792
646891
|
}
|
|
@@ -646795,7 +646894,7 @@ var init_stream_renderer = __esm({
|
|
|
646795
646894
|
break;
|
|
646796
646895
|
}
|
|
646797
646896
|
}
|
|
646798
|
-
if (kind === "content" && this.lineStarted && this._cursorCol + raw
|
|
646897
|
+
if (kind === "content" && this.lineStarted && this._cursorCol + visibleLength(raw) > maxW) {
|
|
646799
646898
|
emitWrapped(raw, (s2) => this.highlightMarkdown(s2), hasNewline);
|
|
646800
646899
|
return;
|
|
646801
646900
|
}
|
|
@@ -646868,9 +646967,9 @@ var init_stream_renderer = __esm({
|
|
|
646868
646967
|
const lastNl = text2.lastIndexOf("\n");
|
|
646869
646968
|
if (lastNl >= 0) {
|
|
646870
646969
|
const after = text2.slice(lastNl + 1);
|
|
646871
|
-
this._cursorCol =
|
|
646970
|
+
this._cursorCol = visibleLength(after);
|
|
646872
646971
|
} else {
|
|
646873
|
-
this._cursorCol +=
|
|
646972
|
+
this._cursorCol += visibleLength(text2);
|
|
646874
646973
|
}
|
|
646875
646974
|
if (this.onRenderedLine) {
|
|
646876
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