pi-fabric 0.134.1 → 0.134.2
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/chunks/{chunk-TKZR4J6J.js → chunk-AP5QMWFD.js} +15 -15
- package/dist/chunks/chunk-AP5QMWFD.js.map +7 -0
- package/dist/chunks/{chunk-FK73YJKV.js → chunk-DWM63MAJ.js} +21 -9
- package/dist/chunks/chunk-DWM63MAJ.js.map +7 -0
- package/dist/chunks/{chunk-DGERP4VL.js → chunk-MBL3DY4Z.js} +8 -7
- package/dist/chunks/chunk-MBL3DY4Z.js.map +7 -0
- package/dist/durable-extension.js +1 -1
- package/dist/durable-extension.js.map +1 -1
- package/dist/extension-bootstrap.js +2 -2
- package/dist/index.js +2 -2
- package/dist/ui/conversation-chrome.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation-latest.d.ts.map +1 -1
- package/dist/ui/conversation.js +14 -15
- package/dist/ui/conversation.js.map +3 -3
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -1
- package/dist/ui/dashboard.js +36 -37
- package/dist/ui/dashboard.js.map +3 -3
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/row-balance.d.ts +1 -1
- package/dist/ui/row-balance.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +7 -6
- package/dist/ui/shell-tasks.js.map +2 -2
- package/dist/ui/truncate.d.ts +3 -0
- package/dist/ui/truncate.d.ts.map +1 -0
- package/dist/ui/widget.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-DGERP4VL.js.map +0 -7
- package/dist/chunks/chunk-FK73YJKV.js.map +0 -7
- package/dist/chunks/chunk-TKZR4J6J.js.map +0 -7
|
@@ -51,8 +51,9 @@ import {
|
|
|
51
51
|
formatCost,
|
|
52
52
|
formatDuration,
|
|
53
53
|
formatTokens,
|
|
54
|
-
safeText
|
|
55
|
-
|
|
54
|
+
safeText,
|
|
55
|
+
truncateStyledText
|
|
56
|
+
} from "./chunk-DWM63MAJ.js";
|
|
56
57
|
import {
|
|
57
58
|
repairFabricGuestCode
|
|
58
59
|
} from "./chunk-VXZZJ44D.js";
|
|
@@ -1956,7 +1957,6 @@ var FabricRepeatGuard = class {
|
|
|
1956
1957
|
};
|
|
1957
1958
|
|
|
1958
1959
|
// src/ui/row-balance.ts
|
|
1959
|
-
import { truncateToWidth as truncateToWidth2 } from "@earendil-works/pi-tui";
|
|
1960
1960
|
var HiddenRowBorrowingComponent = class {
|
|
1961
1961
|
constructor(baseLimit, maxLimit, renderLimit, balance) {
|
|
1962
1962
|
this.baseLimit = baseLimit;
|
|
@@ -1988,7 +1988,7 @@ var HiddenRowBorrowingComponent = class {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
this.#cachedWidth = width;
|
|
1990
1990
|
this.#cachedDeficit = deficit;
|
|
1991
|
-
this.#cachedRows = best.map((row) =>
|
|
1991
|
+
this.#cachedRows = best.map((row) => truncateStyledText(row, Math.max(1, width)));
|
|
1992
1992
|
return this.#cachedRows;
|
|
1993
1993
|
}
|
|
1994
1994
|
invalidate() {
|
|
@@ -4183,7 +4183,7 @@ var createDashboardSnapshot = (state, events, context, activityRuns, cache, immu
|
|
|
4183
4183
|
};
|
|
4184
4184
|
|
|
4185
4185
|
// src/ui/widget.ts
|
|
4186
|
-
import { matchesKey,
|
|
4186
|
+
import { matchesKey, visibleWidth as visibleWidth2 } from "@earendil-works/pi-tui";
|
|
4187
4187
|
|
|
4188
4188
|
// src/ui/retention.ts
|
|
4189
4189
|
var WIDGET_FINISHED_RETENTION_MS = 3e4;
|
|
@@ -4275,10 +4275,10 @@ var fitLine = (theme, width, lead, flexible, detail, hints) => {
|
|
|
4275
4275
|
while (details > 0 && visibleWidth2(compose(flex, details, hintCount)) > width) details--;
|
|
4276
4276
|
if (flex && visibleWidth2(compose(flex, details, hintCount)) > width) {
|
|
4277
4277
|
const room = width - visibleWidth2(compose(void 0, details, hintCount)) - visibleWidth2(flexible.gap);
|
|
4278
|
-
flex = room >= 6 ?
|
|
4278
|
+
flex = room >= 6 ? truncateStyledText(flex, room, "\u2026") : void 0;
|
|
4279
4279
|
}
|
|
4280
4280
|
while (hintCount > 0 && visibleWidth2(compose(flex, details, hintCount)) > width) hintCount--;
|
|
4281
|
-
return
|
|
4281
|
+
return truncateStyledText(compose(flex, details, hintCount), width, "\u2026");
|
|
4282
4282
|
};
|
|
4283
4283
|
var treeOrder = (agents) => {
|
|
4284
4284
|
const ids = new Set(agents.map((agent) => agent.id));
|
|
@@ -4551,9 +4551,9 @@ var FabricWidget = class {
|
|
|
4551
4551
|
const label = labels.find((label2) => fits(label2, identityWidth)) ?? labels.find((label2) => fits(label2, Math.min(identityWidth, 8)));
|
|
4552
4552
|
const headerWidth = label && width >= visibleWidth2(label) + 2 ? width - visibleWidth2(label) - 1 : width;
|
|
4553
4553
|
const header = headerWidth === width ? lines[0] ?? "" : this.#content(snapshot, width, headerWidth).lines[0] ?? "";
|
|
4554
|
-
const boundedHeader = label ? this.#withRightLabel(header, label, width) :
|
|
4555
|
-
const visibleLines = [boundedHeader, ...lines.slice(start, start + capacity).map((line) =>
|
|
4556
|
-
if (viewport.hasCue) visibleLines.push(
|
|
4554
|
+
const boundedHeader = label ? this.#withRightLabel(header, label, width) : truncateStyledText(header, width);
|
|
4555
|
+
const visibleLines = [boundedHeader, ...lines.slice(start, start + capacity).map((line) => truncateStyledText(line, width))];
|
|
4556
|
+
if (viewport.hasCue) visibleLines.push(truncateStyledText(this.theme.fg("dim", `\u2193 ${below} more`), width));
|
|
4557
4557
|
this.#rows = rows.filter((row) => row.line === 0 || row.line >= start && row.line < start + capacity).map((row) => ({ ...row, line: row.line === 0 ? 0 : row.line - start + 1 }));
|
|
4558
4558
|
if (rows.length === 0 && this.interaction?.collapseIdle?.()) return [];
|
|
4559
4559
|
this.#spacerRows = spacer;
|
|
@@ -4705,15 +4705,15 @@ var FabricWidget = class {
|
|
|
4705
4705
|
}
|
|
4706
4706
|
#withRightLabel(line, label, width) {
|
|
4707
4707
|
const labelWidth = visibleWidth2(label);
|
|
4708
|
-
if (width < labelWidth + 2) return
|
|
4709
|
-
const left =
|
|
4708
|
+
if (width < labelWidth + 2) return truncateStyledText(line, width);
|
|
4709
|
+
const left = truncateStyledText(line, width - labelWidth - 1, "");
|
|
4710
4710
|
return `${left}${" ".repeat(width - visibleWidth2(left) - labelWidth)}${this.theme.fg("dim", label)}`;
|
|
4711
4711
|
}
|
|
4712
4712
|
};
|
|
4713
4713
|
|
|
4714
4714
|
// src/ui/footer-dock.ts
|
|
4715
4715
|
import { stripVTControlCharacters } from "node:util";
|
|
4716
|
-
import { sliceByColumn, truncateToWidth as
|
|
4716
|
+
import { sliceByColumn, truncateToWidth as truncateToWidth2, visibleWidth as visibleWidth3 } from "@earendil-works/pi-tui";
|
|
4717
4717
|
var childrenOf = (node) => {
|
|
4718
4718
|
const children = node?.children;
|
|
4719
4719
|
return Array.isArray(children) ? children : [];
|
|
@@ -4738,7 +4738,7 @@ var withBorderBadge = (lines, label) => {
|
|
|
4738
4738
|
const plain = stripVTControlCharacters(line);
|
|
4739
4739
|
if (badgeWidth + 6 > width || !/^─+$/.test(plain.slice(-(badgeWidth + 4)))) return lines;
|
|
4740
4740
|
const next = [...lines];
|
|
4741
|
-
next[index] =
|
|
4741
|
+
next[index] = truncateToWidth2(line, width - badgeWidth - 2, "") + badge + sliceByColumn(line, width - 2, 2);
|
|
4742
4742
|
return next;
|
|
4743
4743
|
};
|
|
4744
4744
|
var FooterDock = class {
|
|
@@ -7073,4 +7073,4 @@ export {
|
|
|
7073
7073
|
FABRIC_MANAGED_HOST_VERSION,
|
|
7074
7074
|
createFabricExtension
|
|
7075
7075
|
};
|
|
7076
|
-
//# sourceMappingURL=chunk-
|
|
7076
|
+
//# sourceMappingURL=chunk-AP5QMWFD.js.map
|