@locusgraph/loop 0.2.0 → 0.2.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/dist/agent/pulse/gradient-label.js +12 -62
- package/dist/agent/pulse/marks/bars-mark.js +15 -37
- package/dist/agent/pulse/marks/glyph-mark.js +15 -54
- package/dist/agent/pulse/marks/locus-mark.js +12 -36
- package/dist/agent/pulse/marks/orb-mark.js +9 -19
- package/dist/agent/pulse/marks/spinner-mark.js +20 -29
- package/dist/agent/pulse/pulse.js +36 -123
- package/dist/agent/pulse/use-loop-animation.js +12 -33
- package/dist/agent/steps/step-icon.js +26 -96
- package/dist/agent/steps/steps.js +47 -210
- package/dist/agent/tool/json-block.js +11 -31
- package/dist/agent/tool/tool-status.js +12 -35
- package/dist/approval/inbox/inbox-row.js +76 -301
- package/dist/approval/inbox/inbox.js +39 -190
- package/dist/approval/inbox/virtual-inbox-list.js +26 -102
- package/dist/approval/memory/memory-review.js +36 -170
- package/dist/approval/memory/memory-row.js +50 -185
- package/dist/approval/plan/plan-review.js +73 -223
- package/dist/approval/plan/plan-step-row.js +76 -180
- package/dist/approval/plan/question-choices.js +44 -130
- package/dist/approval/plan/question.js +38 -154
- package/dist/approval/run/run-bar.js +39 -123
- package/dist/approval/shared/risk-badge.js +9 -24
- package/dist/approval/shared/use-focus-on-mount.js +5 -21
- package/dist/approval/spend/raise-cap-form.js +48 -221
- package/dist/approval/spend/spend-gate.js +40 -155
- package/dist/approval/spend/spend-meter.js +85 -312
- package/dist/approval/tool/approval.js +35 -194
- package/dist/approval/tool/args/args-editor.js +46 -204
- package/dist/approval/tool/args/args-field.js +55 -238
- package/dist/approval/tool/deny-form.js +36 -123
- package/dist/approval/tool/tool-inputs.js +23 -88
- package/dist/chat/chat/use-stick-to-bottom.js +60 -113
- package/dist/chat/chat/virtual-chat-items.js +34 -127
- package/dist/chat/composer/composer-actions.js +46 -129
- package/dist/chat/composer/use-auto-grow.js +8 -23
- package/dist/chat/files/files.js +66 -291
- package/dist/chat/reply/fenced-code.js +10 -32
- package/dist/chat/reply/reply.js +24 -99
- package/dist/chat/turn/turn.js +46 -197
- package/dist/cost/context.js +65 -282
- package/dist/cost/cost-steps.js +42 -195
- package/dist/cost/cost.js +108 -497
- package/dist/cost/model-picker.js +42 -172
- package/dist/cost/shared/context-breakdown.js +64 -280
- package/dist/cost/shared/meter-marks.js +34 -92
- package/dist/cost/shared/model-option-row.js +35 -158
- package/dist/cost/shared/step-cost-row.js +37 -222
- package/dist/memory/cite.js +58 -179
- package/dist/memory/memorized.js +42 -194
- package/dist/memory/recall.js +68 -263
- package/dist/memory/shared/source-mark.js +10 -38
- package/dist/memory/sources.js +52 -230
- package/dist/shared/decision-summary.js +35 -117
- package/dist/shared/panel-empty.js +15 -73
- package/dist/shared/panel.js +65 -239
- package/dist/shared/status-dot.js +10 -32
- package/dist/thread/actions/action-button.js +10 -53
- package/dist/thread/actions/branch-switcher.js +21 -95
- package/dist/thread/canvas/version-switcher.js +31 -126
- package/dist/thread/code/copy-code-button.js +24 -56
- package/dist/thread/history/row/history-row.js +18 -97
- package/dist/thread/history/row/thread-item-menu.js +19 -72
- package/dist/thread/history/row/thread-title-editor.js +29 -72
- package/dist/thread/history/virtual-history-list.js +46 -82
- package/dist/thread/starters/starters.js +27 -87
- package/dist/thread/use-copied.js +10 -38
- package/package.json +3 -3
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "@locusgraph/components";
|
|
3
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
3
|
const ringRadius = 7;
|
|
@@ -13,102 +12,45 @@ const barFill = {
|
|
|
13
12
|
near: "bg-warn",
|
|
14
13
|
full: "bg-destructive"
|
|
15
14
|
};
|
|
16
|
-
export function MeterRing(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
export function MeterRing({
|
|
16
|
+
percent,
|
|
17
|
+
status
|
|
18
|
+
}) {
|
|
19
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
20
|
+
viewBox: "0 0 18 18",
|
|
21
|
+
"aria-hidden": true,
|
|
22
|
+
className: "size-3.5 shrink-0 -rotate-90",
|
|
23
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
25
24
|
cx: "9",
|
|
26
25
|
cy: "9",
|
|
27
26
|
r: ringRadius,
|
|
28
27
|
fill: "none",
|
|
29
28
|
strokeWidth: "2.5",
|
|
30
29
|
className: "stroke-muted-foreground/20"
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
$[2] = t4;
|
|
43
|
-
} else {
|
|
44
|
-
t4 = $[2];
|
|
45
|
-
}
|
|
46
|
-
let t5;
|
|
47
|
-
if ($[3] !== t2 || $[4] !== t4) {
|
|
48
|
-
t5 = /*#__PURE__*/_jsxs("svg", {
|
|
49
|
-
viewBox: "0 0 18 18",
|
|
50
|
-
"aria-hidden": true,
|
|
51
|
-
className: "size-3.5 shrink-0 -rotate-90",
|
|
52
|
-
children: [t1, /*#__PURE__*/_jsx("circle", {
|
|
53
|
-
cx: "9",
|
|
54
|
-
cy: "9",
|
|
55
|
-
r: ringRadius,
|
|
56
|
-
fill: "none",
|
|
57
|
-
strokeWidth: "2.5",
|
|
58
|
-
strokeDasharray: ringCircumference,
|
|
59
|
-
strokeDashoffset: t2,
|
|
60
|
-
className: t4
|
|
61
|
-
})]
|
|
62
|
-
});
|
|
63
|
-
$[3] = t2;
|
|
64
|
-
$[4] = t4;
|
|
65
|
-
$[5] = t5;
|
|
66
|
-
} else {
|
|
67
|
-
t5 = $[5];
|
|
68
|
-
}
|
|
69
|
-
return t5;
|
|
30
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
31
|
+
cx: "9",
|
|
32
|
+
cy: "9",
|
|
33
|
+
r: ringRadius,
|
|
34
|
+
fill: "none",
|
|
35
|
+
strokeWidth: "2.5",
|
|
36
|
+
strokeDasharray: ringCircumference,
|
|
37
|
+
strokeDashoffset: ringCircumference * (1 - percent / 100),
|
|
38
|
+
className: cn("transition-[stroke-dashoffset] duration-300 motion-reduce:transition-none", ringStroke[status])
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
70
41
|
}
|
|
71
|
-
export function MeterBar(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
const t3 = `${percent}%`;
|
|
87
|
-
let t4;
|
|
88
|
-
if ($[2] !== t3) {
|
|
89
|
-
t4 = {
|
|
90
|
-
width: t3
|
|
91
|
-
};
|
|
92
|
-
$[2] = t3;
|
|
93
|
-
$[3] = t4;
|
|
94
|
-
} else {
|
|
95
|
-
t4 = $[3];
|
|
96
|
-
}
|
|
97
|
-
let t5;
|
|
98
|
-
if ($[4] !== t2 || $[5] !== t4) {
|
|
99
|
-
t5 = /*#__PURE__*/_jsx("span", {
|
|
100
|
-
"aria-hidden": true,
|
|
101
|
-
className: "relative block h-1 w-full overflow-hidden bg-muted-foreground/20",
|
|
102
|
-
children: /*#__PURE__*/_jsx("span", {
|
|
103
|
-
className: t2,
|
|
104
|
-
style: t4
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
$[4] = t2;
|
|
108
|
-
$[5] = t4;
|
|
109
|
-
$[6] = t5;
|
|
110
|
-
} else {
|
|
111
|
-
t5 = $[6];
|
|
112
|
-
}
|
|
113
|
-
return t5;
|
|
42
|
+
export function MeterBar({
|
|
43
|
+
percent,
|
|
44
|
+
status
|
|
45
|
+
}) {
|
|
46
|
+
return /*#__PURE__*/_jsx("span", {
|
|
47
|
+
"aria-hidden": true,
|
|
48
|
+
className: "relative block h-1 w-full overflow-hidden bg-muted-foreground/20",
|
|
49
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
50
|
+
className: cn("absolute inset-y-0 left-0 transition-[width] duration-300 motion-reduce:transition-none", barFill[status]),
|
|
51
|
+
style: {
|
|
52
|
+
width: `${percent}%`
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
});
|
|
114
56
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { Checkmark as CheckIcon } from "@carbon/icons-react";
|
|
3
2
|
import { DropdownMenuRadioItem } from "@locusgraph/components";
|
|
4
3
|
import { formatMicroUsd } from "@locusgraph/utils";
|
|
@@ -20,170 +19,48 @@ export function modelPriceLabel(model) {
|
|
|
20
19
|
function modelFacts(model) {
|
|
21
20
|
return [model.speed && speedLabel[model.speed], model.contextTokens !== undefined && `${formatTokensShort(model.contextTokens)} context`].filter(fact => typeof fact === "string");
|
|
22
21
|
}
|
|
23
|
-
function PriceColumn(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
model
|
|
27
|
-
} = t0;
|
|
22
|
+
function PriceColumn({
|
|
23
|
+
model
|
|
24
|
+
}) {
|
|
28
25
|
const input = model.inputPerMillionMicroUsd;
|
|
29
26
|
const output = model.outputPerMillionMicroUsd;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
return /*#__PURE__*/_jsxs("span", {
|
|
28
|
+
className: "flex flex-col items-end font-mono text-[11px] text-muted-foreground tabular-nums",
|
|
29
|
+
children: [input !== undefined && /*#__PURE__*/_jsxs("span", {
|
|
33
30
|
children: [formatMicroUsd(input), " in"]
|
|
34
|
-
})
|
|
35
|
-
$[0] = input;
|
|
36
|
-
$[1] = t1;
|
|
37
|
-
} else {
|
|
38
|
-
t1 = $[1];
|
|
39
|
-
}
|
|
40
|
-
let t2;
|
|
41
|
-
if ($[2] !== output) {
|
|
42
|
-
t2 = output !== undefined && /*#__PURE__*/_jsxs("span", {
|
|
31
|
+
}), output !== undefined && /*#__PURE__*/_jsxs("span", {
|
|
43
32
|
children: [formatMicroUsd(output), " out"]
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
$[3] = t2;
|
|
47
|
-
} else {
|
|
48
|
-
t2 = $[3];
|
|
49
|
-
}
|
|
50
|
-
let t3;
|
|
51
|
-
if ($[4] !== t1 || $[5] !== t2) {
|
|
52
|
-
t3 = /*#__PURE__*/_jsxs("span", {
|
|
53
|
-
className: "flex flex-col items-end font-mono text-[11px] text-muted-foreground tabular-nums",
|
|
54
|
-
children: [t1, t2]
|
|
55
|
-
});
|
|
56
|
-
$[4] = t1;
|
|
57
|
-
$[5] = t2;
|
|
58
|
-
$[6] = t3;
|
|
59
|
-
} else {
|
|
60
|
-
t3 = $[6];
|
|
61
|
-
}
|
|
62
|
-
return t3;
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
63
35
|
}
|
|
64
|
-
export function ModelOptionRow(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let t6;
|
|
76
|
-
if ($[0] !== model) {
|
|
77
|
-
const facts = modelFacts(model);
|
|
78
|
-
T0 = DropdownMenuRadioItem;
|
|
79
|
-
t4 = model.id;
|
|
80
|
-
t5 = "model-picker-item";
|
|
81
|
-
t6 = "group grid grid-cols-[1fr_auto_1rem] items-center gap-x-3 rounded-none px-3 py-2.5 transition-colors duration-150 focus:bg-accent/50 data-[state=checked]:bg-accent motion-reduce:transition-none [&>span:first-child]:hidden";
|
|
82
|
-
t1 = "flex min-w-0 flex-col gap-0.5";
|
|
83
|
-
let t7;
|
|
84
|
-
if ($[8] !== model.name) {
|
|
85
|
-
t7 = /*#__PURE__*/_jsx("span", {
|
|
86
|
-
className: "truncate font-medium",
|
|
87
|
-
children: model.name
|
|
88
|
-
});
|
|
89
|
-
$[8] = model.name;
|
|
90
|
-
$[9] = t7;
|
|
91
|
-
} else {
|
|
92
|
-
t7 = $[9];
|
|
93
|
-
}
|
|
94
|
-
let t8;
|
|
95
|
-
if ($[10] !== model.provider) {
|
|
96
|
-
t8 = /*#__PURE__*/_jsx("span", {
|
|
97
|
-
className: "truncate text-xs text-muted-foreground",
|
|
98
|
-
children: model.provider
|
|
99
|
-
});
|
|
100
|
-
$[10] = model.provider;
|
|
101
|
-
$[11] = t8;
|
|
102
|
-
} else {
|
|
103
|
-
t8 = $[11];
|
|
104
|
-
}
|
|
105
|
-
if ($[12] !== t7 || $[13] !== t8) {
|
|
106
|
-
t2 = /*#__PURE__*/_jsxs("span", {
|
|
36
|
+
export function ModelOptionRow({
|
|
37
|
+
model
|
|
38
|
+
}) {
|
|
39
|
+
const facts = modelFacts(model);
|
|
40
|
+
return /*#__PURE__*/_jsxs(DropdownMenuRadioItem, {
|
|
41
|
+
value: model.id,
|
|
42
|
+
"data-slot": "model-picker-item",
|
|
43
|
+
className: "group grid grid-cols-[1fr_auto_1rem] items-center gap-x-3 rounded-none px-3 py-2.5 transition-colors duration-150 focus:bg-accent/50 data-[state=checked]:bg-accent motion-reduce:transition-none [&>span:first-child]:hidden",
|
|
44
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
45
|
+
className: "flex min-w-0 flex-col gap-0.5",
|
|
46
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
107
47
|
className: "flex items-baseline gap-2",
|
|
108
|
-
children: [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
120
|
-
$[0] = model;
|
|
121
|
-
$[1] = T0;
|
|
122
|
-
$[2] = t1;
|
|
123
|
-
$[3] = t2;
|
|
124
|
-
$[4] = t3;
|
|
125
|
-
$[5] = t4;
|
|
126
|
-
$[6] = t5;
|
|
127
|
-
$[7] = t6;
|
|
128
|
-
} else {
|
|
129
|
-
T0 = $[1];
|
|
130
|
-
t1 = $[2];
|
|
131
|
-
t2 = $[3];
|
|
132
|
-
t3 = $[4];
|
|
133
|
-
t4 = $[5];
|
|
134
|
-
t5 = $[6];
|
|
135
|
-
t6 = $[7];
|
|
136
|
-
}
|
|
137
|
-
let t7;
|
|
138
|
-
if ($[15] !== t1 || $[16] !== t2 || $[17] !== t3) {
|
|
139
|
-
t7 = /*#__PURE__*/_jsxs("span", {
|
|
140
|
-
className: t1,
|
|
141
|
-
children: [t2, t3]
|
|
142
|
-
});
|
|
143
|
-
$[15] = t1;
|
|
144
|
-
$[16] = t2;
|
|
145
|
-
$[17] = t3;
|
|
146
|
-
$[18] = t7;
|
|
147
|
-
} else {
|
|
148
|
-
t7 = $[18];
|
|
149
|
-
}
|
|
150
|
-
let t8;
|
|
151
|
-
if ($[19] !== model) {
|
|
152
|
-
t8 = /*#__PURE__*/_jsx(PriceColumn, {
|
|
48
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
49
|
+
className: "truncate font-medium",
|
|
50
|
+
children: model.name
|
|
51
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
52
|
+
className: "truncate text-xs text-muted-foreground",
|
|
53
|
+
children: model.provider
|
|
54
|
+
})]
|
|
55
|
+
}), facts.length > 0 && /*#__PURE__*/_jsx("span", {
|
|
56
|
+
className: "font-mono text-[11px] text-muted-foreground tabular-nums",
|
|
57
|
+
children: facts.join(" · ")
|
|
58
|
+
})]
|
|
59
|
+
}), /*#__PURE__*/_jsx(PriceColumn, {
|
|
153
60
|
model: model
|
|
154
|
-
})
|
|
155
|
-
$[19] = model;
|
|
156
|
-
$[20] = t8;
|
|
157
|
-
} else {
|
|
158
|
-
t8 = $[20];
|
|
159
|
-
}
|
|
160
|
-
let t9;
|
|
161
|
-
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
162
|
-
t9 = /*#__PURE__*/_jsx(CheckIcon, {
|
|
61
|
+
}), /*#__PURE__*/_jsx(CheckIcon, {
|
|
163
62
|
"aria-hidden": true,
|
|
164
63
|
className: "size-4 text-foreground opacity-0 group-data-[state=checked]:opacity-100"
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
} else {
|
|
168
|
-
t9 = $[21];
|
|
169
|
-
}
|
|
170
|
-
let t10;
|
|
171
|
-
if ($[22] !== T0 || $[23] !== t4 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8) {
|
|
172
|
-
t10 = /*#__PURE__*/_jsxs(T0, {
|
|
173
|
-
value: t4,
|
|
174
|
-
"data-slot": t5,
|
|
175
|
-
className: t6,
|
|
176
|
-
children: [t7, t8, t9]
|
|
177
|
-
});
|
|
178
|
-
$[22] = T0;
|
|
179
|
-
$[23] = t4;
|
|
180
|
-
$[24] = t5;
|
|
181
|
-
$[25] = t6;
|
|
182
|
-
$[26] = t7;
|
|
183
|
-
$[27] = t8;
|
|
184
|
-
$[28] = t10;
|
|
185
|
-
} else {
|
|
186
|
-
t10 = $[28];
|
|
187
|
-
}
|
|
188
|
-
return t10;
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
189
66
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as _c } from "react/compiler-runtime";
|
|
2
1
|
import { cn } from "@locusgraph/components";
|
|
3
2
|
import { formatMicroUsd } from "@locusgraph/utils";
|
|
4
3
|
import { formatDuration } from "./usage-totals.js";
|
|
@@ -34,229 +33,45 @@ function barWidth(cost, maxCost) {
|
|
|
34
33
|
if (maxCost <= 0) return 0;
|
|
35
34
|
return Math.max(cost / maxCost * 100, cost > 0 ? 2 : 0);
|
|
36
35
|
}
|
|
37
|
-
export function StepCostRow(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
totalCost
|
|
43
|
-
} = t0;
|
|
36
|
+
export function StepCostRow({
|
|
37
|
+
step,
|
|
38
|
+
maxCost,
|
|
39
|
+
totalCost
|
|
40
|
+
}) {
|
|
44
41
|
const cost = step.usage.costMicroUsd;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
t10 = totalCost > 0 ? Math.round(cost / totalCost * 100) : 0;
|
|
59
|
-
$[13] = cost;
|
|
60
|
-
$[14] = totalCost;
|
|
61
|
-
$[15] = t10;
|
|
62
|
-
} else {
|
|
63
|
-
t10 = $[15];
|
|
64
|
-
}
|
|
65
|
-
const share = t10;
|
|
66
|
-
const mark = wasted ? statusMark.failed : statusMark[step.status];
|
|
67
|
-
t2 = "step-cost-row";
|
|
68
|
-
t3 = step.status;
|
|
69
|
-
t4 = wasted || undefined;
|
|
70
|
-
const t11 = step.title;
|
|
71
|
-
let t12;
|
|
72
|
-
if ($[16] !== cost) {
|
|
73
|
-
t12 = formatMicroUsd(cost);
|
|
74
|
-
$[16] = cost;
|
|
75
|
-
$[17] = t12;
|
|
76
|
-
} else {
|
|
77
|
-
t12 = $[17];
|
|
78
|
-
}
|
|
79
|
-
let t13;
|
|
80
|
-
if ($[18] !== mark) {
|
|
81
|
-
t13 = mark ? `, ${mark.text.toLowerCase()}` : "";
|
|
82
|
-
$[18] = mark;
|
|
83
|
-
$[19] = t13;
|
|
84
|
-
} else {
|
|
85
|
-
t13 = $[19];
|
|
86
|
-
}
|
|
87
|
-
t5 = `${t11}: ${t12}, ${share}% of run${t13}`;
|
|
88
|
-
t6 = "grid grid-cols-[minmax(0,11rem)_1fr_3.5rem_4.5rem] items-center gap-x-4 gap-y-1.5 px-5 py-2.5 text-sm tabular-nums max-sm:grid-cols-[1fr_auto_auto]";
|
|
89
|
-
const t14 = step.status === "skipped" && "text-muted-foreground";
|
|
90
|
-
let t15;
|
|
91
|
-
if ($[20] !== t14) {
|
|
92
|
-
t15 = cn("truncate", t14);
|
|
93
|
-
$[20] = t14;
|
|
94
|
-
$[21] = t15;
|
|
95
|
-
} else {
|
|
96
|
-
t15 = $[21];
|
|
97
|
-
}
|
|
98
|
-
let t16;
|
|
99
|
-
if ($[22] !== step.title || $[23] !== t15) {
|
|
100
|
-
t16 = /*#__PURE__*/_jsx("span", {
|
|
101
|
-
className: t15,
|
|
42
|
+
const wasted = isWastedStep(step);
|
|
43
|
+
const share = totalCost > 0 ? Math.round(cost / totalCost * 100) : 0;
|
|
44
|
+
const mark = wasted ? statusMark.failed : statusMark[step.status];
|
|
45
|
+
return /*#__PURE__*/_jsxs("li", {
|
|
46
|
+
"data-slot": "step-cost-row",
|
|
47
|
+
"data-status": step.status,
|
|
48
|
+
"data-wasted": wasted || undefined,
|
|
49
|
+
"aria-label": `${step.title}: ${formatMicroUsd(cost)}, ${share}% of run${mark ? `, ${mark.text.toLowerCase()}` : ""}`,
|
|
50
|
+
className: "grid grid-cols-[minmax(0,11rem)_1fr_3.5rem_4.5rem] items-center gap-x-4 gap-y-1.5 px-5 py-2.5 text-sm tabular-nums max-sm:grid-cols-[1fr_auto_auto]",
|
|
51
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
52
|
+
className: "flex min-w-0 items-baseline gap-2",
|
|
53
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
54
|
+
className: cn("truncate", step.status === "skipped" && "text-muted-foreground"),
|
|
102
55
|
children: step.title
|
|
103
|
-
})
|
|
104
|
-
$[22] = step.title;
|
|
105
|
-
$[23] = t15;
|
|
106
|
-
$[24] = t16;
|
|
107
|
-
} else {
|
|
108
|
-
t16 = $[24];
|
|
109
|
-
}
|
|
110
|
-
let t17;
|
|
111
|
-
if ($[25] !== mark) {
|
|
112
|
-
t17 = mark && /*#__PURE__*/_jsx("span", {
|
|
56
|
+
}), mark && /*#__PURE__*/_jsx("span", {
|
|
113
57
|
className: cn("shrink-0 font-mono text-[11px] tracking-wide uppercase", mark.className),
|
|
114
58
|
children: mark.text
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if ($[30] !== step) {
|
|
134
|
-
t18 = cn("absolute inset-y-0 left-0 transition-[width] duration-300 motion-reduce:transition-none", barTone(step));
|
|
135
|
-
$[30] = step;
|
|
136
|
-
$[31] = t18;
|
|
137
|
-
} else {
|
|
138
|
-
t18 = $[31];
|
|
139
|
-
}
|
|
140
|
-
let t19;
|
|
141
|
-
if ($[32] !== cost || $[33] !== maxCost) {
|
|
142
|
-
t19 = barWidth(cost, maxCost);
|
|
143
|
-
$[32] = cost;
|
|
144
|
-
$[33] = maxCost;
|
|
145
|
-
$[34] = t19;
|
|
146
|
-
} else {
|
|
147
|
-
t19 = $[34];
|
|
148
|
-
}
|
|
149
|
-
const t20 = `${t19}%`;
|
|
150
|
-
let t21;
|
|
151
|
-
if ($[35] !== t20) {
|
|
152
|
-
t21 = {
|
|
153
|
-
width: t20
|
|
154
|
-
};
|
|
155
|
-
$[35] = t20;
|
|
156
|
-
$[36] = t21;
|
|
157
|
-
} else {
|
|
158
|
-
t21 = $[36];
|
|
159
|
-
}
|
|
160
|
-
if ($[37] !== t18 || $[38] !== t21) {
|
|
161
|
-
t8 = /*#__PURE__*/_jsx("span", {
|
|
162
|
-
"aria-hidden": true,
|
|
163
|
-
className: "relative h-1.5 w-full bg-muted-foreground/10 max-sm:col-span-3 max-sm:row-start-2",
|
|
164
|
-
children: /*#__PURE__*/_jsx("span", {
|
|
165
|
-
className: t18,
|
|
166
|
-
style: t21
|
|
167
|
-
})
|
|
168
|
-
});
|
|
169
|
-
$[37] = t18;
|
|
170
|
-
$[38] = t21;
|
|
171
|
-
$[39] = t8;
|
|
172
|
-
} else {
|
|
173
|
-
t8 = $[39];
|
|
174
|
-
}
|
|
175
|
-
let t22;
|
|
176
|
-
if ($[40] !== step.durationMs) {
|
|
177
|
-
t22 = step.durationMs !== undefined ? formatDuration(step.durationMs) : "";
|
|
178
|
-
$[40] = step.durationMs;
|
|
179
|
-
$[41] = t22;
|
|
180
|
-
} else {
|
|
181
|
-
t22 = $[41];
|
|
182
|
-
}
|
|
183
|
-
if ($[42] !== t22) {
|
|
184
|
-
t9 = /*#__PURE__*/_jsx("span", {
|
|
185
|
-
className: "text-right font-mono text-[11px] text-muted-foreground",
|
|
186
|
-
children: t22
|
|
187
|
-
});
|
|
188
|
-
$[42] = t22;
|
|
189
|
-
$[43] = t9;
|
|
190
|
-
} else {
|
|
191
|
-
t9 = $[43];
|
|
192
|
-
}
|
|
193
|
-
t1 = cn("text-right font-mono text-xs", wasted && "text-destructive");
|
|
194
|
-
$[0] = cost;
|
|
195
|
-
$[1] = maxCost;
|
|
196
|
-
$[2] = step;
|
|
197
|
-
$[3] = totalCost;
|
|
198
|
-
$[4] = t1;
|
|
199
|
-
$[5] = t2;
|
|
200
|
-
$[6] = t3;
|
|
201
|
-
$[7] = t4;
|
|
202
|
-
$[8] = t5;
|
|
203
|
-
$[9] = t6;
|
|
204
|
-
$[10] = t7;
|
|
205
|
-
$[11] = t8;
|
|
206
|
-
$[12] = t9;
|
|
207
|
-
} else {
|
|
208
|
-
t1 = $[4];
|
|
209
|
-
t2 = $[5];
|
|
210
|
-
t3 = $[6];
|
|
211
|
-
t4 = $[7];
|
|
212
|
-
t5 = $[8];
|
|
213
|
-
t6 = $[9];
|
|
214
|
-
t7 = $[10];
|
|
215
|
-
t8 = $[11];
|
|
216
|
-
t9 = $[12];
|
|
217
|
-
}
|
|
218
|
-
let t10;
|
|
219
|
-
if ($[44] !== cost) {
|
|
220
|
-
t10 = formatMicroUsd(cost);
|
|
221
|
-
$[44] = cost;
|
|
222
|
-
$[45] = t10;
|
|
223
|
-
} else {
|
|
224
|
-
t10 = $[45];
|
|
225
|
-
}
|
|
226
|
-
let t11;
|
|
227
|
-
if ($[46] !== t1 || $[47] !== t10) {
|
|
228
|
-
t11 = /*#__PURE__*/_jsx("span", {
|
|
229
|
-
className: t1,
|
|
230
|
-
children: t10
|
|
231
|
-
});
|
|
232
|
-
$[46] = t1;
|
|
233
|
-
$[47] = t10;
|
|
234
|
-
$[48] = t11;
|
|
235
|
-
} else {
|
|
236
|
-
t11 = $[48];
|
|
237
|
-
}
|
|
238
|
-
let t12;
|
|
239
|
-
if ($[49] !== t11 || $[50] !== t2 || $[51] !== t3 || $[52] !== t4 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9) {
|
|
240
|
-
t12 = /*#__PURE__*/_jsxs("li", {
|
|
241
|
-
"data-slot": t2,
|
|
242
|
-
"data-status": t3,
|
|
243
|
-
"data-wasted": t4,
|
|
244
|
-
"aria-label": t5,
|
|
245
|
-
className: t6,
|
|
246
|
-
children: [t7, t8, t9, t11]
|
|
247
|
-
});
|
|
248
|
-
$[49] = t11;
|
|
249
|
-
$[50] = t2;
|
|
250
|
-
$[51] = t3;
|
|
251
|
-
$[52] = t4;
|
|
252
|
-
$[53] = t5;
|
|
253
|
-
$[54] = t6;
|
|
254
|
-
$[55] = t7;
|
|
255
|
-
$[56] = t8;
|
|
256
|
-
$[57] = t9;
|
|
257
|
-
$[58] = t12;
|
|
258
|
-
} else {
|
|
259
|
-
t12 = $[58];
|
|
260
|
-
}
|
|
261
|
-
return t12;
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
61
|
+
"aria-hidden": true,
|
|
62
|
+
className: "relative h-1.5 w-full bg-muted-foreground/10 max-sm:col-span-3 max-sm:row-start-2",
|
|
63
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
64
|
+
className: cn("absolute inset-y-0 left-0 transition-[width] duration-300 motion-reduce:transition-none", barTone(step)),
|
|
65
|
+
style: {
|
|
66
|
+
width: `${barWidth(cost, maxCost)}%`
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
70
|
+
className: "text-right font-mono text-[11px] text-muted-foreground",
|
|
71
|
+
children: step.durationMs !== undefined ? formatDuration(step.durationMs) : ""
|
|
72
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
73
|
+
className: cn("text-right font-mono text-xs", wasted && "text-destructive"),
|
|
74
|
+
children: formatMicroUsd(cost)
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
262
77
|
}
|