@aiwayds/dsh-opentui 0.28.0 → 0.28.1
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/CHANGELOG.md +15 -0
- package/README.md +27 -2
- package/bin/dsh-opentui.mjs +18 -2
- package/bin/lib/launcher.mjs +7 -0
- package/dist/client/index.js +283 -167
- package/dist/client/index.js.map +6 -6
- package/package.json +1 -1
- package/scripts/provision-inproc-profile.mjs +34 -1
- package/scripts/upgrade.mjs +484 -0
package/dist/client/index.js
CHANGED
|
@@ -32274,6 +32274,26 @@ var init_i18n = __esm(() => {
|
|
|
32274
32274
|
init_src2();
|
|
32275
32275
|
});
|
|
32276
32276
|
|
|
32277
|
+
// ../tui-base/src/theme/contrast.ts
|
|
32278
|
+
function relativeLuminance(color) {
|
|
32279
|
+
const [r, g, b] = color.toInts();
|
|
32280
|
+
const channel = (value) => {
|
|
32281
|
+
const c = value / 255;
|
|
32282
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
32283
|
+
};
|
|
32284
|
+
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
|
|
32285
|
+
}
|
|
32286
|
+
function contrastRatio(a, b) {
|
|
32287
|
+
const la = relativeLuminance(a);
|
|
32288
|
+
const lb = relativeLuminance(b);
|
|
32289
|
+
const hi = Math.max(la, lb);
|
|
32290
|
+
const lo = Math.min(la, lb);
|
|
32291
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
32292
|
+
}
|
|
32293
|
+
function ensureContrast(foreground, background, min = 4.5, fallback = foreground) {
|
|
32294
|
+
return contrastRatio(foreground, background) >= min ? foreground : fallback;
|
|
32295
|
+
}
|
|
32296
|
+
|
|
32277
32297
|
// ../tui-base/src/skin/semantic.ts
|
|
32278
32298
|
import { parseColor } from "@opentui/core";
|
|
32279
32299
|
function mixSkinColor(a, b, t) {
|
|
@@ -32317,6 +32337,25 @@ function currentRowColors(theme) {
|
|
|
32317
32337
|
textColor: theme?.text.action.primary.focused ?? SKIN_FALLBACK.accent
|
|
32318
32338
|
};
|
|
32319
32339
|
}
|
|
32340
|
+
function boostSkinContrast(color, background, min = 4.5) {
|
|
32341
|
+
const bg = parseColor(background);
|
|
32342
|
+
const pole = contrastRatio(bg, parseColor(SKIN_POLE_LIGHT)) >= contrastRatio(bg, parseColor(SKIN_POLE_DARK)) ? SKIN_POLE_LIGHT : SKIN_POLE_DARK;
|
|
32343
|
+
let candidate = mixSkinColor(color, pole, 0);
|
|
32344
|
+
for (let i = 0;i < 32 && contrastRatio(parseColor(candidate), bg) < min; i++) {
|
|
32345
|
+
candidate = mixSkinColor(candidate, pole, 0.08);
|
|
32346
|
+
}
|
|
32347
|
+
return candidate;
|
|
32348
|
+
}
|
|
32349
|
+
function dockTabStripColors(theme) {
|
|
32350
|
+
const selectedBg = theme?.background.action.primary.focused ?? SKIN_FALLBACK.tabSelectedBg;
|
|
32351
|
+
const selectedFg = theme?.text.action.primary.focused ?? SKIN_FALLBACK.tabSelectedFg;
|
|
32352
|
+
const unselectedBg = theme?.background.raised.base ?? SKIN_FALLBACK.tabUnselectedBg;
|
|
32353
|
+
const unselectedFg = boostSkinContrast(theme?.text.muted ?? SKIN_FALLBACK.tabUnselectedFg, unselectedBg);
|
|
32354
|
+
return {
|
|
32355
|
+
selected: { bg: selectedBg, fg: selectedFg },
|
|
32356
|
+
unselected: { bg: unselectedBg, fg: unselectedFg }
|
|
32357
|
+
};
|
|
32358
|
+
}
|
|
32320
32359
|
function skinCursor(config) {
|
|
32321
32360
|
return {
|
|
32322
32361
|
style: config?.style === "underline" ? "underline" : "line",
|
|
@@ -32349,13 +32388,17 @@ function composerLayout(input) {
|
|
|
32349
32388
|
const content = Math.max(1, input.textareaLines) + Math.max(0, input.footerRows) + Math.max(0, input.paletteRows);
|
|
32350
32389
|
return { height: content + borderRows, border };
|
|
32351
32390
|
}
|
|
32352
|
-
var SKIN_FALLBACK, UNFOCUSED_BORDER_MUTED_MIX = 0.5, COMPOSER_BORDER_ROWS = 2, COMPOSER_COMPACT_TERMINAL_ROWS = 30, SKIN_FOCUS_BLUR_DEBOUNCE_MS = 50;
|
|
32391
|
+
var SKIN_FALLBACK, UNFOCUSED_BORDER_MUTED_MIX = 0.5, SKIN_POLE_LIGHT = "#ffffff", SKIN_POLE_DARK = "#000000", COMPOSER_BORDER_ROWS = 2, COMPOSER_COMPACT_TERMINAL_ROWS = 30, SKIN_FOCUS_BLUR_DEBOUNCE_MS = 50;
|
|
32353
32392
|
var init_semantic = __esm(() => {
|
|
32354
32393
|
SKIN_FALLBACK = {
|
|
32355
32394
|
border: "#7aa2f7",
|
|
32356
32395
|
accent: "#7aa2f7",
|
|
32357
32396
|
warning: "#e0af68",
|
|
32358
|
-
success: "#9ece6a"
|
|
32397
|
+
success: "#9ece6a",
|
|
32398
|
+
tabSelectedBg: "#8599ff",
|
|
32399
|
+
tabSelectedFg: "#1e1e22",
|
|
32400
|
+
tabUnselectedBg: "#141419",
|
|
32401
|
+
tabUnselectedFg: "#8a8a8a"
|
|
32359
32402
|
};
|
|
32360
32403
|
});
|
|
32361
32404
|
|
|
@@ -37396,7 +37439,7 @@ function colorRgb(color) {
|
|
|
37396
37439
|
const n = m[1];
|
|
37397
37440
|
return [parseInt(n.slice(0, 2), 16), parseInt(n.slice(2, 4), 16), parseInt(n.slice(4, 6), 16)];
|
|
37398
37441
|
}
|
|
37399
|
-
function
|
|
37442
|
+
function relativeLuminance2(color) {
|
|
37400
37443
|
const [r, g, b] = colorRgb(color);
|
|
37401
37444
|
const channel = (v) => {
|
|
37402
37445
|
const c = v / 255;
|
|
@@ -37404,18 +37447,18 @@ function relativeLuminance(color) {
|
|
|
37404
37447
|
};
|
|
37405
37448
|
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
|
|
37406
37449
|
}
|
|
37407
|
-
function
|
|
37408
|
-
const la =
|
|
37409
|
-
const lb =
|
|
37450
|
+
function contrastRatio2(a, b) {
|
|
37451
|
+
const la = relativeLuminance2(a);
|
|
37452
|
+
const lb = relativeLuminance2(b);
|
|
37410
37453
|
const hi = Math.max(la, lb);
|
|
37411
37454
|
const lo = Math.min(la, lb);
|
|
37412
37455
|
return (hi + 0.05) / (lo + 0.05);
|
|
37413
37456
|
}
|
|
37414
37457
|
function autoContrast(bg) {
|
|
37415
|
-
const preferred =
|
|
37416
|
-
if (
|
|
37458
|
+
const preferred = contrastRatio2(bg, AUTO_FG_DARK) >= contrastRatio2(bg, AUTO_FG_LIGHT) ? AUTO_FG_DARK : AUTO_FG_LIGHT;
|
|
37459
|
+
if (contrastRatio2(bg, preferred) >= 4.5)
|
|
37417
37460
|
return preferred;
|
|
37418
|
-
return
|
|
37461
|
+
return contrastRatio2(bg, "#000000") >= contrastRatio2(bg, "#ffffff") ? "#000000" : "#ffffff";
|
|
37419
37462
|
}
|
|
37420
37463
|
function isExplicitEffort(word) {
|
|
37421
37464
|
return (word?.trim() ?? "").length > 0;
|
|
@@ -37599,7 +37642,7 @@ function lightnessForChroma(hue, chroma, target) {
|
|
|
37599
37642
|
for (let i = 0;i < 32; i++) {
|
|
37600
37643
|
const mid = (lo + hi) / 2;
|
|
37601
37644
|
const saturation = saturationForChroma(chroma, mid);
|
|
37602
|
-
if (
|
|
37645
|
+
if (relativeLuminance2(hslToHex(hue, saturation, mid)) < target)
|
|
37603
37646
|
lo = mid;
|
|
37604
37647
|
else
|
|
37605
37648
|
hi = mid;
|
|
@@ -38064,7 +38107,7 @@ function sessionFooterSegments(data) {
|
|
|
38064
38107
|
add(bridgeStatusSegment(data.bridgeStatus));
|
|
38065
38108
|
return applyPowerlineGradient(segs, theme);
|
|
38066
38109
|
}
|
|
38067
|
-
var POWERLINE_COLORS, AUTO_FG_DARK = "#1a1a2e", AUTO_FG_LIGHT = "#ffffff", DEFAULT_EFFORT = "high", POWERLINE_MIN_SEGMENT_DISTANCE = 80, POWERLINE_RAMP_FAMILIES, POWERLINE_RAMP_DEEP_LUMINANCE = 0.02, POWERLINE_RAMP_LIGHT_LUMINANCE = 0.55, POWERLINE_RAMP_HUE_STEPS, POWERLINE_RAMP_FALLBACK_HUES, EFFORT_ICONS;
|
|
38110
|
+
var POWERLINE_COLORS, POWERLINE_ARROW = "\uE0B0", AUTO_FG_DARK = "#1a1a2e", AUTO_FG_LIGHT = "#ffffff", DEFAULT_EFFORT = "high", POWERLINE_MIN_SEGMENT_DISTANCE = 80, POWERLINE_RAMP_FAMILIES, POWERLINE_RAMP_DEEP_LUMINANCE = 0.02, POWERLINE_RAMP_LIGHT_LUMINANCE = 0.55, POWERLINE_RAMP_HUE_STEPS, POWERLINE_RAMP_FALLBACK_HUES, EFFORT_ICONS;
|
|
38068
38111
|
var init_powerline = __esm(() => {
|
|
38069
38112
|
init_index_bun();
|
|
38070
38113
|
init_index_bun();
|
|
@@ -38706,44 +38749,128 @@ function todoTabLines(rows, innerWidth, cursor = 0) {
|
|
|
38706
38749
|
cursor
|
|
38707
38750
|
});
|
|
38708
38751
|
}
|
|
38709
|
-
function
|
|
38710
|
-
const
|
|
38711
|
-
const
|
|
38712
|
-
|
|
38713
|
-
|
|
38714
|
-
|
|
38715
|
-
|
|
38752
|
+
function dockTabTextLevels(mainLabel, todoLabel) {
|
|
38753
|
+
const m = dockTabDigit(mainLabel);
|
|
38754
|
+
const t = dockTabDigit(todoLabel);
|
|
38755
|
+
return [
|
|
38756
|
+
{
|
|
38757
|
+
main: ` ${DOCK_TAB_ICON.main} ${mainLabel} `,
|
|
38758
|
+
todo: ` ${DOCK_TAB_ICON.todo} ${todoLabel} `
|
|
38759
|
+
},
|
|
38760
|
+
{
|
|
38761
|
+
main: `${DOCK_TAB_ICON.main} ${mainLabel}`,
|
|
38762
|
+
todo: `${DOCK_TAB_ICON.todo} ${todoLabel}`
|
|
38763
|
+
},
|
|
38764
|
+
{
|
|
38765
|
+
main: ` ${DOCK_TAB_ICON.main}${m} `,
|
|
38766
|
+
todo: ` ${DOCK_TAB_ICON.todo}${t} `
|
|
38767
|
+
},
|
|
38768
|
+
{
|
|
38769
|
+
main: `${DOCK_TAB_ICON.main}${m}`,
|
|
38770
|
+
todo: `${DOCK_TAB_ICON.todo}${t}`
|
|
38771
|
+
},
|
|
38772
|
+
{
|
|
38773
|
+
main: m,
|
|
38774
|
+
todo: t
|
|
38775
|
+
}
|
|
38776
|
+
];
|
|
38777
|
+
}
|
|
38778
|
+
function activityDockTabLabels(_tab, mainLabel, todoLabel) {
|
|
38716
38779
|
return {
|
|
38717
|
-
|
|
38718
|
-
|
|
38719
|
-
between,
|
|
38720
|
-
tailGap,
|
|
38721
|
-
tail
|
|
38780
|
+
main: mainLabel,
|
|
38781
|
+
todo: todoLabel
|
|
38722
38782
|
};
|
|
38723
38783
|
}
|
|
38724
|
-
function
|
|
38725
|
-
|
|
38726
|
-
|
|
38727
|
-
|
|
38728
|
-
|
|
38729
|
-
|
|
38730
|
-
|
|
38784
|
+
function dockTabStripCells(texts, activeTab, colors) {
|
|
38785
|
+
const mainColor = activeTab === "main" ? colors.selected : colors.unselected;
|
|
38786
|
+
const todoColor = activeTab === "main" ? colors.unselected : colors.selected;
|
|
38787
|
+
return [{
|
|
38788
|
+
text: texts.main,
|
|
38789
|
+
fg: mainColor.fg,
|
|
38790
|
+
bg: mainColor.bg,
|
|
38791
|
+
tab: "main"
|
|
38792
|
+
}, {
|
|
38793
|
+
text: POWERLINE_ARROW,
|
|
38794
|
+
fg: mainColor.bg,
|
|
38795
|
+
bg: todoColor.bg
|
|
38796
|
+
}, {
|
|
38797
|
+
text: texts.todo,
|
|
38798
|
+
fg: todoColor.fg,
|
|
38799
|
+
bg: todoColor.bg,
|
|
38800
|
+
tab: "todo"
|
|
38801
|
+
}, {
|
|
38802
|
+
text: POWERLINE_ARROW,
|
|
38803
|
+
fg: todoColor.bg
|
|
38804
|
+
}];
|
|
38805
|
+
}
|
|
38806
|
+
function dockTabStripWidth(texts) {
|
|
38807
|
+
return stringWidth(texts.main) + 1 + stringWidth(texts.todo) + 1;
|
|
38808
|
+
}
|
|
38809
|
+
function dockTabStripLayout(opts) {
|
|
38810
|
+
const colors = dockTabStripColors(opts.theme);
|
|
38811
|
+
const limit = Math.max(0, Math.floor(opts.innerWidth));
|
|
38812
|
+
for (const texts of dockTabTextLevels(opts.mainLabel, opts.todoLabel)) {
|
|
38813
|
+
const width = dockTabStripWidth(texts);
|
|
38814
|
+
for (const p of DOCK_TAB_PADDING_STEPS) {
|
|
38815
|
+
if (width <= limit - p) {
|
|
38816
|
+
return {
|
|
38817
|
+
cells: dockTabStripCells(texts, opts.activeTab, colors),
|
|
38818
|
+
stripWidth: width,
|
|
38819
|
+
rightPadding: p
|
|
38820
|
+
};
|
|
38821
|
+
}
|
|
38822
|
+
}
|
|
38823
|
+
}
|
|
38824
|
+
return {
|
|
38825
|
+
cells: [],
|
|
38826
|
+
stripWidth: 0,
|
|
38827
|
+
rightPadding: DOCK_TAB_PADDING_STEPS[0]
|
|
38731
38828
|
};
|
|
38732
38829
|
}
|
|
38733
|
-
function dockTabAtPosition(x, y,
|
|
38734
|
-
|
|
38735
|
-
const relY = y - screenY;
|
|
38736
|
-
if (relY < 0 || relY > 1)
|
|
38830
|
+
function dockTabAtPosition(x, y, box, framed, strip) {
|
|
38831
|
+
if (strip.cells.length === 0)
|
|
38737
38832
|
return;
|
|
38738
|
-
const
|
|
38739
|
-
const
|
|
38740
|
-
const
|
|
38741
|
-
if (
|
|
38742
|
-
return
|
|
38743
|
-
|
|
38744
|
-
|
|
38833
|
+
const innerWidth = box.width - (framed ? 2 : 0);
|
|
38834
|
+
const stripLeft = box.screenX + (framed ? 1 : 0) + innerWidth - strip.rightPadding - strip.stripWidth;
|
|
38835
|
+
const row = framed ? box.screenY + box.height - 2 : box.screenY + box.height - 1;
|
|
38836
|
+
if (y !== row && !(framed && y === row + 1))
|
|
38837
|
+
return;
|
|
38838
|
+
let cursor = stripLeft;
|
|
38839
|
+
for (const cell of strip.cells) {
|
|
38840
|
+
const cellWidth = stringWidth(cell.text);
|
|
38841
|
+
if (x >= cursor && x < cursor + cellWidth)
|
|
38842
|
+
return cell.tab;
|
|
38843
|
+
cursor += cellWidth;
|
|
38844
|
+
}
|
|
38745
38845
|
return;
|
|
38746
38846
|
}
|
|
38847
|
+
function DockTabStripView(props) {
|
|
38848
|
+
return (() => {
|
|
38849
|
+
var _el$ = createElement("box");
|
|
38850
|
+
setProp(_el$, "flexShrink", 0);
|
|
38851
|
+
setProp(_el$, "flexDirection", "row");
|
|
38852
|
+
setProp(_el$, "width", "100%");
|
|
38853
|
+
setProp(_el$, "height", 1);
|
|
38854
|
+
setProp(_el$, "justifyContent", "flex-end");
|
|
38855
|
+
insert(_el$, createComponent2(For, {
|
|
38856
|
+
get each() {
|
|
38857
|
+
return props.strip.cells;
|
|
38858
|
+
},
|
|
38859
|
+
children: (cell) => (() => {
|
|
38860
|
+
var _el$2 = createElement("text");
|
|
38861
|
+
setProp(_el$2, "wrapMode", "none");
|
|
38862
|
+
insert(_el$2, () => cell.text);
|
|
38863
|
+
effect((_$p) => setProp(_el$2, "style", {
|
|
38864
|
+
fg: cell.fg,
|
|
38865
|
+
bg: cell.bg
|
|
38866
|
+
}, _$p));
|
|
38867
|
+
return _el$2;
|
|
38868
|
+
})()
|
|
38869
|
+
}));
|
|
38870
|
+
effect((_$p) => setProp(_el$, "paddingRight", props.strip.rightPadding, _$p));
|
|
38871
|
+
return _el$;
|
|
38872
|
+
})();
|
|
38873
|
+
}
|
|
38747
38874
|
function todoSetStartedAt(todos, now = Date.now()) {
|
|
38748
38875
|
const sig = todoSetSignature(todos);
|
|
38749
38876
|
const first = todoSetFirstSeen.get(sig);
|
|
@@ -38953,11 +39080,11 @@ function activityFrameMode(terminalRows, compactRows = COMPOSER_COMPACT_TERMINAL
|
|
|
38953
39080
|
}
|
|
38954
39081
|
function boostUntilContrast(color, background, min = 4.5) {
|
|
38955
39082
|
let candidate = typeof color === "string" ? color : mixPowerlineColor(color, "#000000", 0);
|
|
38956
|
-
const pole =
|
|
38957
|
-
for (let i = 0;i < 32 &&
|
|
39083
|
+
const pole = contrastRatio2(background, AUTO_POLE_LIGHT) >= contrastRatio2(background, AUTO_POLE_DARK) ? AUTO_POLE_LIGHT : AUTO_POLE_DARK;
|
|
39084
|
+
for (let i = 0;i < 32 && contrastRatio2(candidate, background) < min; i++) {
|
|
38958
39085
|
candidate = mixPowerlineColor(candidate, pole, 0.08);
|
|
38959
39086
|
}
|
|
38960
|
-
const contrast =
|
|
39087
|
+
const contrast = contrastRatio2(candidate, background);
|
|
38961
39088
|
return {
|
|
38962
39089
|
color: candidate,
|
|
38963
39090
|
contrast,
|
|
@@ -38968,7 +39095,7 @@ function dockAccentColor(theme, accent) {
|
|
|
38968
39095
|
const background = theme?.background?.base;
|
|
38969
39096
|
const validatedFallback = (bg) => {
|
|
38970
39097
|
const fallback = DOCK_ACCENT_FALLBACK[accent];
|
|
38971
|
-
const darkSurface =
|
|
39098
|
+
const darkSurface = relativeLuminance2(bg) < 0.5;
|
|
38972
39099
|
return boostUntilContrast(darkSurface ? fallback.dark : fallback.light, bg, DOCK_ACCENT_MIN_CONTRAST).color;
|
|
38973
39100
|
};
|
|
38974
39101
|
const hues = theme?.hue;
|
|
@@ -38981,7 +39108,7 @@ function dockAccentColor(theme, accent) {
|
|
|
38981
39108
|
continue;
|
|
38982
39109
|
if (background === undefined)
|
|
38983
39110
|
return candidates[0];
|
|
38984
|
-
const preferred = candidates.find((value) =>
|
|
39111
|
+
const preferred = candidates.find((value) => contrastRatio2(value, background) >= DOCK_ACCENT_MIN_CONTRAST);
|
|
38985
39112
|
if (preferred !== undefined)
|
|
38986
39113
|
return preferred;
|
|
38987
39114
|
return validatedFallback(background);
|
|
@@ -39182,9 +39309,15 @@ function WidgetsDock(props) {
|
|
|
39182
39309
|
});
|
|
39183
39310
|
const titleSlotWidth = () => dimensions().width - 4;
|
|
39184
39311
|
const tabLabels = () => activityDockTabLabels(activityDockTab(), t("overlay.widgets.tab.main"), t("overlay.widgets.tab.todo"));
|
|
39185
|
-
const
|
|
39312
|
+
const framedStrip = () => {
|
|
39186
39313
|
const labels = tabLabels();
|
|
39187
|
-
return
|
|
39314
|
+
return dockTabStripLayout({
|
|
39315
|
+
mainLabel: labels.main,
|
|
39316
|
+
todoLabel: labels.todo,
|
|
39317
|
+
activeTab: activityDockTab(),
|
|
39318
|
+
theme: theme ?? undefined,
|
|
39319
|
+
innerWidth: dimensions().width - 2
|
|
39320
|
+
});
|
|
39188
39321
|
};
|
|
39189
39322
|
const mergedTitleText = () => {
|
|
39190
39323
|
const {
|
|
@@ -39197,9 +39330,7 @@ function WidgetsDock(props) {
|
|
|
39197
39330
|
subagent: mergedRunningAgents(props.rows).length > 0
|
|
39198
39331
|
});
|
|
39199
39332
|
const suffix = mergedPositionSuffix(info);
|
|
39200
|
-
const
|
|
39201
|
-
const head = `${bar.mainLabel}${bar.between}${bar.todoLabel} `;
|
|
39202
|
-
const title = takeWidth(head + base, titleSlotWidth());
|
|
39333
|
+
const title = takeWidth(base, titleSlotWidth());
|
|
39203
39334
|
if (suffix === null)
|
|
39204
39335
|
return title;
|
|
39205
39336
|
const gap = titleSlotWidth() - stringWidth(title) - stringWidth(suffix);
|
|
@@ -39212,7 +39343,7 @@ function WidgetsDock(props) {
|
|
|
39212
39343
|
onActivityPanelMouseUp(event);
|
|
39213
39344
|
if (dockBox === undefined)
|
|
39214
39345
|
return;
|
|
39215
|
-
const tab = dockTabAtPosition(event.x, event.y, dockBox
|
|
39346
|
+
const tab = dockTabAtPosition(event.x, event.y, dockBox, true, framedStrip());
|
|
39216
39347
|
if (tab !== undefined)
|
|
39217
39348
|
onDockTabMouseUp(tab, event);
|
|
39218
39349
|
};
|
|
@@ -39275,20 +39406,16 @@ function WidgetsDock(props) {
|
|
|
39275
39406
|
const count = !animating || tweened >= target ? target : Math.min(target, tweened);
|
|
39276
39407
|
return lines.slice(0, count);
|
|
39277
39408
|
};
|
|
39278
|
-
const frameHeight = () =>
|
|
39279
|
-
const
|
|
39409
|
+
const frameHeight = () => 3 + tabContentLines().length;
|
|
39410
|
+
const compactStrip = () => {
|
|
39280
39411
|
const labels = tabLabels();
|
|
39281
|
-
return
|
|
39282
|
-
|
|
39283
|
-
|
|
39284
|
-
|
|
39285
|
-
|
|
39286
|
-
|
|
39287
|
-
|
|
39288
|
-
text: `${bar.mainLabel}${bar.between}${bar.todoLabel}`,
|
|
39289
|
-
tone: "muted"
|
|
39290
|
-
}]
|
|
39291
|
-
};
|
|
39412
|
+
return dockTabStripLayout({
|
|
39413
|
+
mainLabel: labels.main,
|
|
39414
|
+
todoLabel: labels.todo,
|
|
39415
|
+
activeTab: activityDockTab(),
|
|
39416
|
+
theme: theme ?? undefined,
|
|
39417
|
+
innerWidth: dimensions().width - 3
|
|
39418
|
+
});
|
|
39292
39419
|
};
|
|
39293
39420
|
const compactLower = () => mergedCompactLowerLines(props.rows);
|
|
39294
39421
|
const compactBrief = () => mergedCompactBriefLines(props.rows, Date.now(), width());
|
|
@@ -39300,7 +39427,7 @@ function WidgetsDock(props) {
|
|
|
39300
39427
|
onActivityPanelMouseUp(event);
|
|
39301
39428
|
if (compactDockBox === undefined)
|
|
39302
39429
|
return;
|
|
39303
|
-
const tab = dockTabAtPosition(event.x, event.y, compactDockBox
|
|
39430
|
+
const tab = dockTabAtPosition(event.x, event.y, compactDockBox, false, compactStrip());
|
|
39304
39431
|
if (tab !== undefined)
|
|
39305
39432
|
onDockTabMouseUp(tab, event);
|
|
39306
39433
|
};
|
|
@@ -39318,34 +39445,34 @@ function WidgetsDock(props) {
|
|
|
39318
39445
|
};
|
|
39319
39446
|
const attributes = line.italic === true ? TextAttributes5.ITALIC : undefined;
|
|
39320
39447
|
return (() => {
|
|
39321
|
-
var _el$ = createElement("text");
|
|
39322
|
-
setProp(_el
|
|
39323
|
-
setProp(_el
|
|
39324
|
-
insert(_el
|
|
39448
|
+
var _el$3 = createElement("text");
|
|
39449
|
+
setProp(_el$3, "attributes", attributes);
|
|
39450
|
+
setProp(_el$3, "wrapMode", "none");
|
|
39451
|
+
insert(_el$3, createComponent2(For, {
|
|
39325
39452
|
get each() {
|
|
39326
39453
|
return line.segments;
|
|
39327
39454
|
},
|
|
39328
39455
|
children: (segment) => {
|
|
39329
39456
|
const target = segment.accent !== undefined ? accentFg(segment.accent) : fgFor(segment.tone);
|
|
39330
39457
|
return (() => {
|
|
39331
|
-
var _el$
|
|
39332
|
-
insert(_el$
|
|
39333
|
-
effect((_$p) => setProp(_el$
|
|
39458
|
+
var _el$4 = createElement("span");
|
|
39459
|
+
insert(_el$4, () => segment.text);
|
|
39460
|
+
effect((_$p) => setProp(_el$4, "style", {
|
|
39334
39461
|
fg: skinDockLineFg(ctx, target, lineFade)
|
|
39335
39462
|
}, _$p));
|
|
39336
|
-
return _el$
|
|
39463
|
+
return _el$4;
|
|
39337
39464
|
})();
|
|
39338
39465
|
}
|
|
39339
39466
|
}));
|
|
39340
|
-
return _el
|
|
39467
|
+
return _el$3;
|
|
39341
39468
|
})();
|
|
39342
39469
|
};
|
|
39343
39470
|
return (() => {
|
|
39344
|
-
var _el$
|
|
39345
|
-
setProp(_el$
|
|
39346
|
-
setProp(_el$
|
|
39347
|
-
setProp(_el$
|
|
39348
|
-
insert(_el$
|
|
39471
|
+
var _el$5 = createElement("box");
|
|
39472
|
+
setProp(_el$5, "flexShrink", 0);
|
|
39473
|
+
setProp(_el$5, "flexDirection", "column");
|
|
39474
|
+
setProp(_el$5, "width", "100%");
|
|
39475
|
+
insert(_el$5, createComponent2(Show, {
|
|
39349
39476
|
get when() {
|
|
39350
39477
|
return activityFrameLatch.shown();
|
|
39351
39478
|
},
|
|
@@ -39377,62 +39504,66 @@ function WidgetsDock(props) {
|
|
|
39377
39504
|
},
|
|
39378
39505
|
get fallback() {
|
|
39379
39506
|
return (() => {
|
|
39380
|
-
var _el$
|
|
39507
|
+
var _el$7 = createElement("box");
|
|
39381
39508
|
use((el) => {
|
|
39382
39509
|
compactDockBox = el;
|
|
39383
|
-
}, _el$
|
|
39384
|
-
setProp(_el$
|
|
39385
|
-
setProp(_el$
|
|
39386
|
-
setProp(_el$
|
|
39387
|
-
setProp(_el$
|
|
39388
|
-
setProp(_el$
|
|
39389
|
-
insert(_el$
|
|
39390
|
-
get each() {
|
|
39391
|
-
return [compactTabBarLine()];
|
|
39392
|
-
},
|
|
39393
|
-
children: mergedLineView
|
|
39394
|
-
}), null);
|
|
39395
|
-
insert(_el$5, createComponent2(For, {
|
|
39510
|
+
}, _el$7);
|
|
39511
|
+
setProp(_el$7, "flexShrink", 0);
|
|
39512
|
+
setProp(_el$7, "flexDirection", "column");
|
|
39513
|
+
setProp(_el$7, "width", "100%");
|
|
39514
|
+
setProp(_el$7, "paddingLeft", 3);
|
|
39515
|
+
setProp(_el$7, "onMouseUp", onCompactTitleMouseUp);
|
|
39516
|
+
insert(_el$7, createComponent2(For, {
|
|
39396
39517
|
get each() {
|
|
39397
39518
|
return memo2(() => activityDockTab() === "main")() ? activityRuleLines(props.rows) : [];
|
|
39398
39519
|
},
|
|
39399
39520
|
children: lineView
|
|
39400
39521
|
}), null);
|
|
39401
|
-
insert(_el$
|
|
39522
|
+
insert(_el$7, createComponent2(For, {
|
|
39402
39523
|
get each() {
|
|
39403
39524
|
return compactContent();
|
|
39404
39525
|
},
|
|
39405
39526
|
children: mergedLineView
|
|
39406
39527
|
}), null);
|
|
39407
|
-
|
|
39408
|
-
|
|
39528
|
+
insert(_el$7, createComponent2(DockTabStripView, {
|
|
39529
|
+
get strip() {
|
|
39530
|
+
return compactStrip();
|
|
39531
|
+
}
|
|
39532
|
+
}), null);
|
|
39533
|
+
effect((_$p) => setProp(_el$7, "height", compactHeight(), _$p));
|
|
39534
|
+
return _el$7;
|
|
39409
39535
|
})();
|
|
39410
39536
|
},
|
|
39411
39537
|
get children() {
|
|
39412
|
-
var _el$
|
|
39538
|
+
var _el$6 = createElement("box");
|
|
39413
39539
|
use((el) => {
|
|
39414
39540
|
dockBox = el;
|
|
39415
|
-
}, _el$
|
|
39416
|
-
setProp(_el$
|
|
39417
|
-
setProp(_el$
|
|
39418
|
-
setProp(_el$
|
|
39419
|
-
setProp(_el$
|
|
39420
|
-
setProp(_el$
|
|
39421
|
-
setProp(_el$
|
|
39422
|
-
setProp(_el$
|
|
39423
|
-
insert(_el$
|
|
39541
|
+
}, _el$6);
|
|
39542
|
+
setProp(_el$6, "flexShrink", 0);
|
|
39543
|
+
setProp(_el$6, "flexDirection", "column");
|
|
39544
|
+
setProp(_el$6, "width", "100%");
|
|
39545
|
+
setProp(_el$6, "border", ["top", "bottom", "left", "right"]);
|
|
39546
|
+
setProp(_el$6, "titleAlignment", "left");
|
|
39547
|
+
setProp(_el$6, "onMouseScroll", onMergedWheel);
|
|
39548
|
+
setProp(_el$6, "onMouseUp", onDockTitleMouseUp);
|
|
39549
|
+
insert(_el$6, createComponent2(For, {
|
|
39424
39550
|
get each() {
|
|
39425
39551
|
return tabContentLines();
|
|
39426
39552
|
},
|
|
39427
39553
|
children: mergedLineView
|
|
39428
|
-
}));
|
|
39554
|
+
}), null);
|
|
39555
|
+
insert(_el$6, createComponent2(DockTabStripView, {
|
|
39556
|
+
get strip() {
|
|
39557
|
+
return framedStrip();
|
|
39558
|
+
}
|
|
39559
|
+
}), null);
|
|
39429
39560
|
effect((_p$) => {
|
|
39430
39561
|
var _v$ = frameHeight(), _v$2 = activityFrame().borderStyle, _v$3 = activityFrame().borderColor, _v$4 = mergedTitleText(), _v$5 = activityFrame().titleColor;
|
|
39431
|
-
_v$ !== _p$.e && (_p$.e = setProp(_el$
|
|
39432
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$
|
|
39433
|
-
_v$3 !== _p$.a && (_p$.a = setProp(_el$
|
|
39434
|
-
_v$4 !== _p$.o && (_p$.o = setProp(_el$
|
|
39435
|
-
_v$5 !== _p$.i && (_p$.i = setProp(_el$
|
|
39562
|
+
_v$ !== _p$.e && (_p$.e = setProp(_el$6, "height", _v$, _p$.e));
|
|
39563
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$6, "borderStyle", _v$2, _p$.t));
|
|
39564
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$6, "borderColor", _v$3, _p$.a));
|
|
39565
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$6, "title", _v$4, _p$.o));
|
|
39566
|
+
_v$5 !== _p$.i && (_p$.i = setProp(_el$6, "titleColor", _v$5, _p$.i));
|
|
39436
39567
|
return _p$;
|
|
39437
39568
|
}, {
|
|
39438
39569
|
e: undefined,
|
|
@@ -39441,12 +39572,12 @@ function WidgetsDock(props) {
|
|
|
39441
39572
|
o: undefined,
|
|
39442
39573
|
i: undefined
|
|
39443
39574
|
});
|
|
39444
|
-
return _el$
|
|
39575
|
+
return _el$6;
|
|
39445
39576
|
}
|
|
39446
39577
|
});
|
|
39447
39578
|
}
|
|
39448
39579
|
}));
|
|
39449
|
-
return _el$
|
|
39580
|
+
return _el$5;
|
|
39450
39581
|
})();
|
|
39451
39582
|
}
|
|
39452
39583
|
function FlatDock(props) {
|
|
@@ -39465,19 +39596,19 @@ function FlatDock(props) {
|
|
|
39465
39596
|
return lines.slice(0, count);
|
|
39466
39597
|
};
|
|
39467
39598
|
return (() => {
|
|
39468
|
-
var _el$
|
|
39469
|
-
setProp(_el$
|
|
39470
|
-
setProp(_el$
|
|
39471
|
-
setProp(_el$
|
|
39472
|
-
setProp(_el$
|
|
39473
|
-
insert(_el$
|
|
39599
|
+
var _el$8 = createElement("box");
|
|
39600
|
+
setProp(_el$8, "flexShrink", 0);
|
|
39601
|
+
setProp(_el$8, "flexDirection", "column");
|
|
39602
|
+
setProp(_el$8, "width", "100%");
|
|
39603
|
+
setProp(_el$8, "paddingLeft", 3);
|
|
39604
|
+
insert(_el$8, createComponent2(For, {
|
|
39474
39605
|
get each() {
|
|
39475
39606
|
return flatLines();
|
|
39476
39607
|
},
|
|
39477
39608
|
children: (line) => dockLineNode(line, props.width, props.skinCtx, props.fgFor, props.accentFg)
|
|
39478
39609
|
}));
|
|
39479
|
-
effect((_$p) => setProp(_el$
|
|
39480
|
-
return _el$
|
|
39610
|
+
effect((_$p) => setProp(_el$8, "height", flatLines().length, _$p));
|
|
39611
|
+
return _el$8;
|
|
39481
39612
|
})();
|
|
39482
39613
|
}
|
|
39483
39614
|
function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
@@ -39488,12 +39619,12 @@ function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
|
39488
39619
|
const markerAt = line.markerAt ?? 0;
|
|
39489
39620
|
if (marker === undefined || line.text.slice(markerAt, markerAt + marker.length) !== marker) {
|
|
39490
39621
|
return (() => {
|
|
39491
|
-
var _el$
|
|
39492
|
-
setProp(_el$
|
|
39493
|
-
setProp(_el$
|
|
39494
|
-
setProp(_el$
|
|
39495
|
-
insert(_el$
|
|
39496
|
-
return _el$
|
|
39622
|
+
var _el$9 = createElement("text");
|
|
39623
|
+
setProp(_el$9, "fg", bodyFg);
|
|
39624
|
+
setProp(_el$9, "attributes", attributes);
|
|
39625
|
+
setProp(_el$9, "wrapMode", "none");
|
|
39626
|
+
insert(_el$9, () => clipToWidth(line.text, width));
|
|
39627
|
+
return _el$9;
|
|
39497
39628
|
})();
|
|
39498
39629
|
}
|
|
39499
39630
|
const before = clipToWidth(line.text.slice(0, markerAt), width);
|
|
@@ -39502,21 +39633,21 @@ function dockLineNode(line, width, ctx, fgFor, accentFg) {
|
|
|
39502
39633
|
const after = clipToWidth(line.text.slice(markerAt + marker.length), Math.max(0, markerBudget - stringWidth(clippedMarker)));
|
|
39503
39634
|
const markerFg = skinDockLineFg(ctx, toneFg, line);
|
|
39504
39635
|
return (() => {
|
|
39505
|
-
var _el$
|
|
39506
|
-
insertNode(_el$
|
|
39507
|
-
setProp(_el$
|
|
39508
|
-
setProp(_el$
|
|
39509
|
-
setProp(_el$
|
|
39510
|
-
insert(_el$
|
|
39511
|
-
setProp(_el$
|
|
39636
|
+
var _el$0 = createElement("text"), _el$1 = createElement("span");
|
|
39637
|
+
insertNode(_el$0, _el$1);
|
|
39638
|
+
setProp(_el$0, "fg", bodyFg);
|
|
39639
|
+
setProp(_el$0, "attributes", attributes);
|
|
39640
|
+
setProp(_el$0, "wrapMode", "none");
|
|
39641
|
+
insert(_el$0, before, _el$1);
|
|
39642
|
+
setProp(_el$1, "style", {
|
|
39512
39643
|
fg: markerFg
|
|
39513
39644
|
});
|
|
39514
|
-
insert(_el$
|
|
39515
|
-
insert(_el$
|
|
39516
|
-
return _el$
|
|
39645
|
+
insert(_el$1, clippedMarker);
|
|
39646
|
+
insert(_el$0, after, null);
|
|
39647
|
+
return _el$0;
|
|
39517
39648
|
})();
|
|
39518
39649
|
}
|
|
39519
|
-
var SKIN_FADE_IN_MS = 400, SKIN_NOTICE_FADE_MS = 500, SKIN_PULSE_MS = 1200, SKIN_PULSE_CYCLES = 3, SKIN_PULSE_DIM = 0.45, SKIN_FAINT_MIX = 0.78, ACTIVITY_PANEL_GEARS, ACTIVITY_PANEL_ALL_LINES = 10, activityPanelGear, setActivityPanelGear, DOCK_HEIGHT_ANIM_MS = 200, dockHeightTween, setDockHeightTween, dockHeightSettled = undefined, dockFrameNow = 0, LINE_FIRST_SEEN_MAX = 512, lineFirstSeen, dockSpin, setDockSpin, mergedDockCursor, setMergedDockCursor, activityDockTab, setActivityDockTab, todoSetSignature = (todos) => todos.map((todo) => todo.content).sort().join("\x01"), todoSetFirstSeen, subagentBatchStartedAt, prevSubagentRunning = 0, TODO_TOOL_NAMES, AUTO_POLE_LIGHT = "#ffffff", AUTO_POLE_DARK = "#000000", DOCK_ACCENT_STEPS, DOCK_ACCENT_HUES, DOCK_ACCENT_MIN_CONTRAST = 4.5, DOCK_ACCENT_FALLBACK, ACTIVITY_FRAME_DEFER_MS = 60, activityFrameLatch, COMPACT_TREE_MAX_LINES = 8;
|
|
39650
|
+
var SKIN_FADE_IN_MS = 400, SKIN_NOTICE_FADE_MS = 500, SKIN_PULSE_MS = 1200, SKIN_PULSE_CYCLES = 3, SKIN_PULSE_DIM = 0.45, SKIN_FAINT_MIX = 0.78, ACTIVITY_PANEL_GEARS, ACTIVITY_PANEL_ALL_LINES = 10, activityPanelGear, setActivityPanelGear, DOCK_HEIGHT_ANIM_MS = 200, dockHeightTween, setDockHeightTween, dockHeightSettled = undefined, dockFrameNow = 0, LINE_FIRST_SEEN_MAX = 512, lineFirstSeen, dockSpin, setDockSpin, mergedDockCursor, setMergedDockCursor, activityDockTab, setActivityDockTab, DOCK_TAB_ICON, DOCK_TAB_PADDING_STEPS, dockTabDigit = (label) => label.match(/^\d+/)?.[0] ?? "", todoSetSignature = (todos) => todos.map((todo) => todo.content).sort().join("\x01"), todoSetFirstSeen, subagentBatchStartedAt, prevSubagentRunning = 0, TODO_TOOL_NAMES, AUTO_POLE_LIGHT = "#ffffff", AUTO_POLE_DARK = "#000000", DOCK_ACCENT_STEPS, DOCK_ACCENT_HUES, DOCK_ACCENT_MIN_CONTRAST = 4.5, DOCK_ACCENT_FALLBACK, ACTIVITY_FRAME_DEFER_MS = 60, activityFrameLatch, COMPACT_TREE_MAX_LINES = 8;
|
|
39520
39651
|
var init_widgets_dock = __esm(() => {
|
|
39521
39652
|
init_index_bun();
|
|
39522
39653
|
init_index_bun();
|
|
@@ -39550,6 +39681,11 @@ var init_widgets_dock = __esm(() => {
|
|
|
39550
39681
|
[dockSpin, setDockSpin] = createSignal(0);
|
|
39551
39682
|
[mergedDockCursor, setMergedDockCursor] = createSignal(0);
|
|
39552
39683
|
[activityDockTab, setActivityDockTab] = createSignal("main");
|
|
39684
|
+
DOCK_TAB_ICON = {
|
|
39685
|
+
main: "\uD83C\uDFE0",
|
|
39686
|
+
todo: "\uD83D\uDCCB"
|
|
39687
|
+
};
|
|
39688
|
+
DOCK_TAB_PADDING_STEPS = [2, 1, 0];
|
|
39553
39689
|
todoSetFirstSeen = new Map;
|
|
39554
39690
|
TODO_TOOL_NAMES = new Set(["todowrite", "todo_write"]);
|
|
39555
39691
|
DOCK_ACCENT_STEPS = {
|
|
@@ -48123,16 +48259,16 @@ function fadeColor(from, to, t) {
|
|
|
48123
48259
|
function srgbToLinear2(channel) {
|
|
48124
48260
|
return channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;
|
|
48125
48261
|
}
|
|
48126
|
-
function
|
|
48262
|
+
function relativeLuminance3(color) {
|
|
48127
48263
|
return 0.2126 * srgbToLinear2(color.r) + 0.7152 * srgbToLinear2(color.g) + 0.0722 * srgbToLinear2(color.b);
|
|
48128
48264
|
}
|
|
48129
|
-
function
|
|
48130
|
-
const la =
|
|
48131
|
-
const lb =
|
|
48265
|
+
function contrastRatio3(a, b) {
|
|
48266
|
+
const la = relativeLuminance3(a);
|
|
48267
|
+
const lb = relativeLuminance3(b);
|
|
48132
48268
|
return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
|
|
48133
48269
|
}
|
|
48134
48270
|
function withContrastFloor(fg, bg, fallback) {
|
|
48135
|
-
return
|
|
48271
|
+
return contrastRatio3(fg, bg) < MIN_CONTRAST ? fallback : fg;
|
|
48136
48272
|
}
|
|
48137
48273
|
function fadeTheme(theme, t) {
|
|
48138
48274
|
const progress = clamp012(t);
|
|
@@ -54905,7 +55041,7 @@ var init_subagents_viewer = __esm(() => {
|
|
|
54905
55041
|
import { TextAttributes as TextAttributes12 } from "@opentui/core";
|
|
54906
55042
|
function resolveVersion() {
|
|
54907
55043
|
try {
|
|
54908
|
-
return "0.28.
|
|
55044
|
+
return "0.28.1";
|
|
54909
55045
|
} catch {
|
|
54910
55046
|
return "dev";
|
|
54911
55047
|
}
|
|
@@ -56583,26 +56719,6 @@ function copyComposerSelection(source, clipboard, onError = () => {}) {
|
|
|
56583
56719
|
return true;
|
|
56584
56720
|
}
|
|
56585
56721
|
|
|
56586
|
-
// ../tui-base/src/theme/contrast.ts
|
|
56587
|
-
function relativeLuminance3(color) {
|
|
56588
|
-
const [r, g, b] = color.toInts();
|
|
56589
|
-
const channel = (value) => {
|
|
56590
|
-
const c = value / 255;
|
|
56591
|
-
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
|
56592
|
-
};
|
|
56593
|
-
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
|
|
56594
|
-
}
|
|
56595
|
-
function contrastRatio3(a, b) {
|
|
56596
|
-
const la = relativeLuminance3(a);
|
|
56597
|
-
const lb = relativeLuminance3(b);
|
|
56598
|
-
const hi = Math.max(la, lb);
|
|
56599
|
-
const lo = Math.min(la, lb);
|
|
56600
|
-
return (hi + 0.05) / (lo + 0.05);
|
|
56601
|
-
}
|
|
56602
|
-
function ensureContrast(foreground, background, min = 4.5, fallback = foreground) {
|
|
56603
|
-
return contrastRatio3(foreground, background) >= min ? foreground : fallback;
|
|
56604
|
-
}
|
|
56605
|
-
|
|
56606
56722
|
// ../tui-base/src/context/panel-kit-host.tsx
|
|
56607
56723
|
import { RGBA as RGBA15, TextAttributes as TextAttributes13 } from "@opentui/core";
|
|
56608
56724
|
function projectPanelTheme(theme) {
|
|
@@ -63569,5 +63685,5 @@ if (import.meta.main) {
|
|
|
63569
63685
|
main();
|
|
63570
63686
|
}
|
|
63571
63687
|
|
|
63572
|
-
//# debugId=
|
|
63688
|
+
//# debugId=9C3AA1DB8B7B933364756E2164756E21
|
|
63573
63689
|
//# sourceMappingURL=index.js.map
|