@cnwenf/occ 2.1.295 → 2.1.296
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/cli.js +88 -88
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.296","BINARY_NAME":"occ","BUILD_TIME":"2026-08-07T09:27:10.873Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -684604,51 +684604,57 @@ var init_logoV2Utils = __esm(() => {
|
|
|
684604
684604
|
});
|
|
684605
684605
|
|
|
684606
684606
|
// src/components/LogoV2/OccMark.tsx
|
|
684607
|
+
function chevronBeamX(spec, y4) {
|
|
684608
|
+
const centerY = (spec.gridHeight - 1) / 2;
|
|
684609
|
+
return (spec.gridWidth - 2) * (1 - Math.abs(y4 - centerY) / centerY);
|
|
684610
|
+
}
|
|
684611
|
+
function isChevronDotLit(spec, x6, y4) {
|
|
684612
|
+
if (x6 < 0 || x6 >= spec.gridWidth || y4 < 0 || y4 >= spec.gridHeight) {
|
|
684613
|
+
return false;
|
|
684614
|
+
}
|
|
684615
|
+
return Math.abs(x6 - chevronBeamX(spec, y4)) <= spec.beamRadius;
|
|
684616
|
+
}
|
|
684607
684617
|
function normalizeMark(lines2) {
|
|
684608
684618
|
const width = Math.max(...lines2.map(stringWidth));
|
|
684609
684619
|
return lines2.map((line) => line + " ".repeat(width - stringWidth(line)));
|
|
684610
684620
|
}
|
|
684621
|
+
function generateSignalChevron(spec) {
|
|
684622
|
+
const columns = Math.ceil(spec.gridWidth / 2);
|
|
684623
|
+
const rows = Math.ceil(spec.gridHeight / 4);
|
|
684624
|
+
const lines2 = [];
|
|
684625
|
+
for (let row = 0;row < rows; row++) {
|
|
684626
|
+
let line = "";
|
|
684627
|
+
for (let column = 0;column < columns; column++) {
|
|
684628
|
+
let bits2 = 0;
|
|
684629
|
+
for (let dotRow = 0;dotRow < 4; dotRow++) {
|
|
684630
|
+
const y4 = row * 4 + dotRow;
|
|
684631
|
+
if (isChevronDotLit(spec, column * 2, y4)) {
|
|
684632
|
+
bits2 |= BRAILLE_LEFT_BITS[dotRow];
|
|
684633
|
+
}
|
|
684634
|
+
if (isChevronDotLit(spec, column * 2 + 1, y4)) {
|
|
684635
|
+
bits2 |= BRAILLE_RIGHT_BITS[dotRow];
|
|
684636
|
+
}
|
|
684637
|
+
}
|
|
684638
|
+
line += bits2 === 0 ? " " : String.fromCodePoint(BRAILLE_BASE_CODE + bits2);
|
|
684639
|
+
}
|
|
684640
|
+
lines2.push(line.trimEnd());
|
|
684641
|
+
}
|
|
684642
|
+
return normalizeMark(lines2);
|
|
684643
|
+
}
|
|
684611
684644
|
function getOccMark(mode) {
|
|
684612
684645
|
return OCC_MARKS[mode];
|
|
684613
684646
|
}
|
|
684614
684647
|
function getOccMarkWidth(art) {
|
|
684615
684648
|
return Math.max(...art.map(stringWidth));
|
|
684616
684649
|
}
|
|
684617
|
-
function
|
|
684650
|
+
function chevronThemeFamily(themeName) {
|
|
684618
684651
|
return themeName.startsWith("light") ? "light" : "dark";
|
|
684619
684652
|
}
|
|
684620
|
-
function sampleGradient(stops, t4) {
|
|
684621
|
-
if (stops.length === 0)
|
|
684622
|
-
return [0, 0, 0];
|
|
684623
|
-
if (stops.length === 1)
|
|
684624
|
-
return stops[0];
|
|
684625
|
-
const clamped = Math.min(Math.max(t4, 0), 1);
|
|
684626
|
-
const scaled = clamped * (stops.length - 1);
|
|
684627
|
-
const index2 = Math.min(Math.floor(scaled), stops.length - 2);
|
|
684628
|
-
const local = scaled - index2;
|
|
684629
|
-
const from2 = stops[index2];
|
|
684630
|
-
const to = stops[index2 + 1];
|
|
684631
|
-
return [
|
|
684632
|
-
Math.round(from2[0] + (to[0] - from2[0]) * local),
|
|
684633
|
-
Math.round(from2[1] + (to[1] - from2[1]) * local),
|
|
684634
|
-
Math.round(from2[2] + (to[2] - from2[2]) * local)
|
|
684635
|
-
];
|
|
684636
|
-
}
|
|
684637
|
-
function markCellT(art, row, column) {
|
|
684638
|
-
const width = getOccMarkWidth(art);
|
|
684639
|
-
const horizontal = width > 1 ? column / (width - 1) : 0;
|
|
684640
|
-
const vertical = art.length > 1 ? row / (art.length - 1) : 0;
|
|
684641
|
-
return horizontal * 0.72 + vertical * 0.28;
|
|
684642
|
-
}
|
|
684643
684653
|
function rgbColor(rgb3) {
|
|
684644
684654
|
return `rgb(${rgb3[0]},${rgb3[1]},${rgb3[2]})`;
|
|
684645
684655
|
}
|
|
684646
|
-
function
|
|
684647
|
-
return
|
|
684648
|
-
Math.round(rgb3[0] + (255 - rgb3[0]) * amount),
|
|
684649
|
-
Math.round(rgb3[1] + (255 - rgb3[1]) * amount),
|
|
684650
|
-
Math.round(rgb3[2] + (255 - rgb3[2]) * amount)
|
|
684651
|
-
];
|
|
684656
|
+
function getMarkColorMode() {
|
|
684657
|
+
return source_default.level >= 2 ? "color" : "silhouette";
|
|
684652
684658
|
}
|
|
684653
684659
|
function isShimmerCell(art, row, column, progress) {
|
|
684654
684660
|
if (progress === null)
|
|
@@ -684661,7 +684667,8 @@ function isShimmerCell(art, row, column, progress) {
|
|
|
684661
684667
|
function MarkRow({
|
|
684662
684668
|
art,
|
|
684663
684669
|
row,
|
|
684664
|
-
|
|
684670
|
+
colorMode,
|
|
684671
|
+
tone,
|
|
684665
684672
|
progress
|
|
684666
684673
|
}) {
|
|
684667
684674
|
const line = art[row];
|
|
@@ -684683,10 +684690,16 @@ function MarkRow({
|
|
|
684683
684690
|
continue;
|
|
684684
684691
|
}
|
|
684685
684692
|
flushSpaces(`${row}-sp-${column}`);
|
|
684686
|
-
|
|
684693
|
+
if (colorMode === "silhouette") {
|
|
684694
|
+
nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
|
|
684695
|
+
bold: true,
|
|
684696
|
+
children: char
|
|
684697
|
+
}, `${row}-${column}`));
|
|
684698
|
+
continue;
|
|
684699
|
+
}
|
|
684687
684700
|
const shimmering = isShimmerCell(art, row, column, progress);
|
|
684688
684701
|
nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
|
|
684689
|
-
color: rgbColor(shimmering ?
|
|
684702
|
+
color: rgbColor(shimmering ? tone.peak : tone.base),
|
|
684690
684703
|
bold: true,
|
|
684691
684704
|
children: char
|
|
684692
684705
|
}, `${row}-${column}`));
|
|
@@ -684700,8 +684713,9 @@ function OccMark(props) {
|
|
|
684700
684713
|
const mode = props.mode ?? "compact";
|
|
684701
684714
|
const art = getOccMark(mode);
|
|
684702
684715
|
const [themeName] = useTheme();
|
|
684703
|
-
const
|
|
684704
|
-
const
|
|
684716
|
+
const tone = CHEVRON_TONES[chevronThemeFamily(themeName)];
|
|
684717
|
+
const colorMode = getMarkColorMode();
|
|
684718
|
+
const animate = colorMode === "color" && (props.animate ?? !(getInitialSettings().prefersReducedMotion ?? false));
|
|
684705
684719
|
const [done, setDone] = import_react146.useState(!animate);
|
|
684706
684720
|
const startTimeRef = import_react146.useRef(null);
|
|
684707
684721
|
const [ref, time3] = useAnimationFrame(done ? null : SHIMMER_FRAME_MS);
|
|
@@ -684723,57 +684737,42 @@ function OccMark(props) {
|
|
|
684723
684737
|
children: art.map((_4, row) => /* @__PURE__ */ jsx_runtime258.jsx(MarkRow, {
|
|
684724
684738
|
art,
|
|
684725
684739
|
row,
|
|
684726
|
-
|
|
684740
|
+
colorMode,
|
|
684741
|
+
tone,
|
|
684727
684742
|
progress
|
|
684728
684743
|
}, row))
|
|
684729
684744
|
});
|
|
684730
684745
|
}
|
|
684731
|
-
var import_react146, jsx_runtime258, OCC_MARKS,
|
|
684746
|
+
var import_react146, jsx_runtime258, CHEVRON_SPECS, BRAILLE_BASE_CODE = 10240, BRAILLE_LEFT_BITS, BRAILLE_RIGHT_BITS, OCC_MARKS, CHEVRON_TONES, SHIMMER_FRAME_MS = 84, SHIMMER_DURATION_MS = 1800, SHIMMER_BAND_WIDTH = 0.24;
|
|
684732
684747
|
var init_OccMark = __esm(() => {
|
|
684748
|
+
init_source();
|
|
684733
684749
|
init_ink2();
|
|
684734
684750
|
init_stringWidth();
|
|
684735
684751
|
init_settings2();
|
|
684736
684752
|
init_ThemeProvider();
|
|
684737
684753
|
import_react146 = __toESM(require_react(), 1);
|
|
684738
684754
|
jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
|
|
684755
|
+
CHEVRON_SPECS = {
|
|
684756
|
+
wide: { gridWidth: 30, gridHeight: 32, beamRadius: 2.1 },
|
|
684757
|
+
compact: { gridWidth: 26, gridHeight: 28, beamRadius: 1.1 },
|
|
684758
|
+
plain: { gridWidth: 20, gridHeight: 20, beamRadius: 3.1 }
|
|
684759
|
+
};
|
|
684760
|
+
BRAILLE_LEFT_BITS = [1, 2, 4, 64];
|
|
684761
|
+
BRAILLE_RIGHT_BITS = [8, 16, 32, 128];
|
|
684739
684762
|
OCC_MARKS = {
|
|
684740
|
-
wide:
|
|
684741
|
-
|
|
684742
|
-
|
|
684743
|
-
" \u259F\u2588\u2588\u2588\u2588\u259B",
|
|
684744
|
-
" \u259F\u2588\u2588\u2588\u2588\u259B",
|
|
684745
|
-
" \u259F\u2588\u2588\u2588\u2588\u259B",
|
|
684746
|
-
" \u259F\u2588\u2588\u2588\u2588\u259B",
|
|
684747
|
-
"\u259F\u2588\u2588\u2588\u2588\u259B"
|
|
684748
|
-
]),
|
|
684749
|
-
compact: normalizeMark([
|
|
684750
|
-
" \u2584\u2584",
|
|
684751
|
-
" \u259F\u2588\u2588\u2599",
|
|
684752
|
-
" \u259F\u2588\u2588\u2588\u2599",
|
|
684753
|
-
" \u259F\u2588\u2588\u2588\u259B",
|
|
684754
|
-
" \u259F\u2588\u2588\u2588\u259B",
|
|
684755
|
-
" \u259F\u2588\u2588\u2588\u259B",
|
|
684756
|
-
"\u259F\u2588\u2588\u2588\u259B"
|
|
684757
|
-
]),
|
|
684758
|
-
plain: normalizeMark([
|
|
684759
|
-
" \u2584\u2584",
|
|
684760
|
-
" \u259F\u2588\u2588\u2599",
|
|
684761
|
-
" \u259F\u2588\u2588\u259B",
|
|
684762
|
-
" \u259F\u2588\u2588\u259B",
|
|
684763
|
-
"\u259F\u2588\u2588\u259B"
|
|
684764
|
-
])
|
|
684763
|
+
wide: generateSignalChevron(CHEVRON_SPECS.wide),
|
|
684764
|
+
compact: generateSignalChevron(CHEVRON_SPECS.compact),
|
|
684765
|
+
plain: generateSignalChevron(CHEVRON_SPECS.plain)
|
|
684765
684766
|
};
|
|
684766
|
-
|
|
684767
|
-
dark:
|
|
684768
|
-
[
|
|
684769
|
-
[
|
|
684770
|
-
|
|
684771
|
-
|
|
684772
|
-
|
|
684773
|
-
[
|
|
684774
|
-
|
|
684775
|
-
[159, 18, 57]
|
|
684776
|
-
]
|
|
684767
|
+
CHEVRON_TONES = {
|
|
684768
|
+
dark: {
|
|
684769
|
+
base: [90, 90, 90],
|
|
684770
|
+
peak: [225, 225, 225]
|
|
684771
|
+
},
|
|
684772
|
+
light: {
|
|
684773
|
+
base: [64, 64, 64],
|
|
684774
|
+
peak: [117, 117, 117]
|
|
684775
|
+
}
|
|
684777
684776
|
};
|
|
684778
684777
|
});
|
|
684779
684778
|
|
|
@@ -685668,7 +685667,8 @@ function CondensedLogo() {
|
|
|
685668
685667
|
incrementOverageCreditUpsellSeenCount();
|
|
685669
685668
|
}
|
|
685670
685669
|
}, [showGuestPassesUpsell, showOverageCreditUpsell]);
|
|
685671
|
-
const plain = isScreenReaderEnabled()
|
|
685670
|
+
const plain = isScreenReaderEnabled();
|
|
685671
|
+
const dumbTerminal = process.env.TERM?.toLowerCase() === "dumb";
|
|
685672
685672
|
const upsell = showGuestPassesUpsell ? /* @__PURE__ */ jsx_runtime264.jsx(GuestPassesUpsell, {}) : showOverageCreditUpsell ? /* @__PURE__ */ jsx_runtime264.jsx(OverageCreditUpsell, {
|
|
685673
685673
|
maxWidth: Math.max(columns - 6, 20),
|
|
685674
685674
|
twoLine: true
|
|
@@ -685683,7 +685683,7 @@ function CondensedLogo() {
|
|
|
685683
685683
|
branch,
|
|
685684
685684
|
agentName,
|
|
685685
685685
|
tip,
|
|
685686
|
-
reducedMotion: reducedMotion || plain,
|
|
685686
|
+
reducedMotion: reducedMotion || plain || dumbTerminal,
|
|
685687
685687
|
plain,
|
|
685688
685688
|
children: upsell
|
|
685689
685689
|
})
|
|
@@ -690946,8 +690946,8 @@ function formatSnippet({
|
|
|
690946
690946
|
before,
|
|
690947
690947
|
match,
|
|
690948
690948
|
after
|
|
690949
|
-
},
|
|
690950
|
-
return source_default.dim(before) +
|
|
690949
|
+
}, highlightColor) {
|
|
690950
|
+
return source_default.dim(before) + highlightColor(match) + source_default.dim(after);
|
|
690951
690951
|
}
|
|
690952
690952
|
function extractSnippet(text2, query2, contextChars) {
|
|
690953
690953
|
const matchIndex = text2.toLowerCase().indexOf(query2.toLowerCase());
|
|
@@ -691036,7 +691036,7 @@ function LogSelector(t0) {
|
|
|
691036
691036
|
} else {
|
|
691037
691037
|
t5 = $4[4];
|
|
691038
691038
|
}
|
|
691039
|
-
const
|
|
691039
|
+
const highlightColor = t5;
|
|
691040
691040
|
const isAgenticSearchEnabled = false;
|
|
691041
691041
|
const [currentBranch, setCurrentBranch] = import_react163.default.useState(null);
|
|
691042
691042
|
const [branchFilterEnabled, setBranchFilterEnabled] = import_react163.default.useState(false);
|
|
@@ -691401,14 +691401,14 @@ function LogSelector(t0) {
|
|
|
691401
691401
|
break bb2;
|
|
691402
691402
|
}
|
|
691403
691403
|
let t302;
|
|
691404
|
-
if ($4[66] !== displayedLogs || $4[67] !==
|
|
691404
|
+
if ($4[66] !== displayedLogs || $4[67] !== highlightColor || $4[68] !== maxLabelWidth || $4[69] !== showAllProjects || $4[70] !== snippets) {
|
|
691405
691405
|
const sessionGroups = groupLogsBySessionId(displayedLogs);
|
|
691406
691406
|
t302 = Array.from(sessionGroups.entries()).map((t312) => {
|
|
691407
691407
|
const [sessionId, groupLogs] = t312;
|
|
691408
691408
|
const latestLog = groupLogs[0];
|
|
691409
691409
|
const indexInFiltered = displayedLogs.indexOf(latestLog);
|
|
691410
691410
|
const snippet_0 = snippets.get(latestLog);
|
|
691411
|
-
const snippetStr = snippet_0 ? formatSnippet(snippet_0,
|
|
691411
|
+
const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor) : null;
|
|
691412
691412
|
if (groupLogs.length === 1) {
|
|
691413
691413
|
const metadata = buildLogMetadata(latestLog, {
|
|
691414
691414
|
showProjectPath: showAllProjects
|
|
@@ -691429,7 +691429,7 @@ function LogSelector(t0) {
|
|
|
691429
691429
|
const children3 = groupLogs.slice(1).map((log_8, index2) => {
|
|
691430
691430
|
const childIndexInFiltered = displayedLogs.indexOf(log_8);
|
|
691431
691431
|
const childSnippet = snippets.get(log_8);
|
|
691432
|
-
const childSnippetStr = childSnippet ? formatSnippet(childSnippet,
|
|
691432
|
+
const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor) : null;
|
|
691433
691433
|
const childMetadata = buildLogMetadata(log_8, {
|
|
691434
691434
|
isChild: true,
|
|
691435
691435
|
showProjectPath: showAllProjects
|
|
@@ -691468,7 +691468,7 @@ function LogSelector(t0) {
|
|
|
691468
691468
|
};
|
|
691469
691469
|
});
|
|
691470
691470
|
$4[66] = displayedLogs;
|
|
691471
|
-
$4[67] =
|
|
691471
|
+
$4[67] = highlightColor;
|
|
691472
691472
|
$4[68] = maxLabelWidth;
|
|
691473
691473
|
$4[69] = showAllProjects;
|
|
691474
691474
|
$4[70] = snippets;
|
|
@@ -691493,9 +691493,9 @@ function LogSelector(t0) {
|
|
|
691493
691493
|
break bb3;
|
|
691494
691494
|
}
|
|
691495
691495
|
let t312;
|
|
691496
|
-
if ($4[73] !== displayedLogs || $4[74] !==
|
|
691496
|
+
if ($4[73] !== displayedLogs || $4[74] !== highlightColor || $4[75] !== maxLabelWidth || $4[76] !== showAllProjects || $4[77] !== snippets) {
|
|
691497
691497
|
let t323;
|
|
691498
|
-
if ($4[79] !==
|
|
691498
|
+
if ($4[79] !== highlightColor || $4[80] !== maxLabelWidth || $4[81] !== showAllProjects || $4[82] !== snippets) {
|
|
691499
691499
|
t323 = (log_9, index_0) => {
|
|
691500
691500
|
const rawSummary = getLogDisplayTitle(log_9);
|
|
691501
691501
|
const summaryWithSidechain = rawSummary + (log_9.isSidechain ? " (sidechain)" : "");
|
|
@@ -691503,7 +691503,7 @@ function LogSelector(t0) {
|
|
|
691503
691503
|
const baseDescription = formatLogMetadata(log_9);
|
|
691504
691504
|
const projectSuffix = showAllProjects && log_9.projectPath ? ` \xB7 ${log_9.projectPath}` : "";
|
|
691505
691505
|
const snippet_1 = snippets.get(log_9);
|
|
691506
|
-
const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1,
|
|
691506
|
+
const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor) : null;
|
|
691507
691507
|
return {
|
|
691508
691508
|
label: summary,
|
|
691509
691509
|
description: snippetStr_0 ? `${baseDescription}${projectSuffix}
|
|
@@ -691512,7 +691512,7 @@ function LogSelector(t0) {
|
|
|
691512
691512
|
value: index_0.toString()
|
|
691513
691513
|
};
|
|
691514
691514
|
};
|
|
691515
|
-
$4[79] =
|
|
691515
|
+
$4[79] = highlightColor;
|
|
691516
691516
|
$4[80] = maxLabelWidth;
|
|
691517
691517
|
$4[81] = showAllProjects;
|
|
691518
691518
|
$4[82] = snippets;
|
|
@@ -691522,7 +691522,7 @@ function LogSelector(t0) {
|
|
|
691522
691522
|
}
|
|
691523
691523
|
t312 = displayedLogs.map(t323);
|
|
691524
691524
|
$4[73] = displayedLogs;
|
|
691525
|
-
$4[74] =
|
|
691525
|
+
$4[74] = highlightColor;
|
|
691526
691526
|
$4[75] = maxLabelWidth;
|
|
691527
691527
|
$4[76] = showAllProjects;
|
|
691528
691528
|
$4[77] = snippets;
|