@locusgraph/loop 0.2.0 → 0.3.0

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.
Files changed (75) hide show
  1. package/dist/agent/pulse/gradient-label.js +12 -62
  2. package/dist/agent/pulse/marks/bars-mark.js +15 -37
  3. package/dist/agent/pulse/marks/glyph-mark.js +15 -54
  4. package/dist/agent/pulse/marks/locus-mark.js +12 -36
  5. package/dist/agent/pulse/marks/orb-mark.js +9 -19
  6. package/dist/agent/pulse/marks/spinner-mark.js +20 -29
  7. package/dist/agent/pulse/pulse.js +36 -123
  8. package/dist/agent/pulse/use-loop-animation.js +12 -33
  9. package/dist/agent/steps/step-icon.js +26 -96
  10. package/dist/agent/steps/steps.js +47 -210
  11. package/dist/agent/thinking/thinking.js +2 -2
  12. package/dist/agent/tool/json-block.js +11 -31
  13. package/dist/agent/tool/tool-status.js +12 -35
  14. package/dist/approval/inbox/inbox-row.js +76 -301
  15. package/dist/approval/inbox/inbox.js +39 -190
  16. package/dist/approval/inbox/virtual-inbox-list.js +26 -102
  17. package/dist/approval/memory/memory-review.js +36 -170
  18. package/dist/approval/memory/memory-row.js +50 -185
  19. package/dist/approval/plan/plan-review.js +73 -223
  20. package/dist/approval/plan/plan-step-row.js +76 -180
  21. package/dist/approval/plan/question-choices.js +44 -130
  22. package/dist/approval/plan/question.js +38 -154
  23. package/dist/approval/run/run-bar.js +39 -123
  24. package/dist/approval/shared/risk-badge.js +9 -24
  25. package/dist/approval/shared/use-focus-on-mount.js +5 -21
  26. package/dist/approval/spend/raise-cap-form.js +48 -221
  27. package/dist/approval/spend/spend-gate.js +40 -155
  28. package/dist/approval/spend/spend-meter.js +86 -313
  29. package/dist/approval/tool/approval.js +35 -194
  30. package/dist/approval/tool/args/args-editor.js +46 -204
  31. package/dist/approval/tool/args/args-field.js +55 -238
  32. package/dist/approval/tool/deny-form.js +36 -123
  33. package/dist/approval/tool/tool-inputs.js +24 -89
  34. package/dist/chat/chat/use-stick-to-bottom.js +60 -113
  35. package/dist/chat/chat/virtual-chat-items.js +34 -127
  36. package/dist/chat/composer/composer-actions.js +46 -129
  37. package/dist/chat/composer/use-auto-grow.js +8 -23
  38. package/dist/chat/files/files.js +66 -291
  39. package/dist/chat/reply/fenced-code.js +10 -32
  40. package/dist/chat/reply/markdown-components.js +2 -2
  41. package/dist/chat/reply/reply.js +24 -99
  42. package/dist/chat/turn/turn.js +46 -197
  43. package/dist/cost/context.js +65 -282
  44. package/dist/cost/cost-steps.js +42 -195
  45. package/dist/cost/cost.js +108 -497
  46. package/dist/cost/model-picker.js +42 -172
  47. package/dist/cost/shared/context-breakdown.js +65 -281
  48. package/dist/cost/shared/meter-marks.js +34 -92
  49. package/dist/cost/shared/model-option-row.js +35 -158
  50. package/dist/cost/shared/step-cost-row.js +37 -222
  51. package/dist/memory/cite.js +58 -179
  52. package/dist/memory/memorized.js +43 -195
  53. package/dist/memory/recall.js +68 -263
  54. package/dist/memory/shared/disclosure.d.ts +2 -2
  55. package/dist/memory/shared/disclosure.js +1 -1
  56. package/dist/memory/shared/source-mark.js +10 -38
  57. package/dist/memory/sources.js +52 -230
  58. package/dist/shared/decision-summary.js +35 -117
  59. package/dist/shared/panel-empty.js +15 -73
  60. package/dist/shared/panel.js +65 -239
  61. package/dist/shared/status-dot.js +10 -32
  62. package/dist/thread/actions/action-button.js +10 -53
  63. package/dist/thread/actions/branch-switcher.js +21 -95
  64. package/dist/thread/canvas/canvas.js +1 -1
  65. package/dist/thread/canvas/version-switcher.js +31 -126
  66. package/dist/thread/code/code.js +2 -2
  67. package/dist/thread/code/copy-code-button.js +24 -56
  68. package/dist/thread/history/history.js +1 -1
  69. package/dist/thread/history/row/history-row.js +18 -97
  70. package/dist/thread/history/row/thread-item-menu.js +19 -72
  71. package/dist/thread/history/row/thread-title-editor.js +29 -72
  72. package/dist/thread/history/virtual-history-list.js +46 -82
  73. package/dist/thread/starters/starters.js +27 -87
  74. package/dist/thread/use-copied.js +10 -38
  75. 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(t0) {
17
- const $ = _c(6);
18
- const {
19
- percent,
20
- status
21
- } = t0;
22
- let t1;
23
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
24
- t1 = /*#__PURE__*/_jsx("circle", {
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
- $[0] = t1;
33
- } else {
34
- t1 = $[0];
35
- }
36
- const t2 = ringCircumference * (1 - percent / 100);
37
- const t3 = ringStroke[status];
38
- let t4;
39
- if ($[1] !== t3) {
40
- t4 = cn("transition-[stroke-dashoffset] duration-300 motion-reduce:transition-none", t3);
41
- $[1] = t3;
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(t0) {
72
- const $ = _c(7);
73
- const {
74
- percent,
75
- status
76
- } = t0;
77
- const t1 = barFill[status];
78
- let t2;
79
- if ($[0] !== t1) {
80
- t2 = cn("absolute inset-y-0 left-0 transition-[width] duration-300 motion-reduce:transition-none", t1);
81
- $[0] = t1;
82
- $[1] = t2;
83
- } else {
84
- t2 = $[1];
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(t0) {
24
- const $ = _c(7);
25
- const {
26
- model
27
- } = t0;
22
+ function PriceColumn({
23
+ model
24
+ }) {
28
25
  const input = model.inputPerMillionMicroUsd;
29
26
  const output = model.outputPerMillionMicroUsd;
30
- let t1;
31
- if ($[0] !== input) {
32
- t1 = input !== undefined && /*#__PURE__*/_jsxs("span", {
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
- $[2] = output;
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(t0) {
65
- const $ = _c(29);
66
- const {
67
- model
68
- } = t0;
69
- let T0;
70
- let t1;
71
- let t2;
72
- let t3;
73
- let t4;
74
- let t5;
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: [t7, t8]
109
- });
110
- $[12] = t7;
111
- $[13] = t8;
112
- $[14] = t2;
113
- } else {
114
- t2 = $[14];
115
- }
116
- t3 = facts.length > 0 && /*#__PURE__*/_jsx("span", {
117
- className: "font-mono text-[11px] text-muted-foreground tabular-nums",
118
- children: facts.join(" \xB7 ")
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
- $[21] = t9;
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(t0) {
38
- const $ = _c(59);
39
- const {
40
- step,
41
- maxCost,
42
- totalCost
43
- } = t0;
36
+ export function StepCostRow({
37
+ step,
38
+ maxCost,
39
+ totalCost
40
+ }) {
44
41
  const cost = step.usage.costMicroUsd;
45
- let t1;
46
- let t2;
47
- let t3;
48
- let t4;
49
- let t5;
50
- let t6;
51
- let t7;
52
- let t8;
53
- let t9;
54
- if ($[0] !== cost || $[1] !== maxCost || $[2] !== step || $[3] !== totalCost) {
55
- const wasted = isWastedStep(step);
56
- let t10;
57
- if ($[13] !== cost || $[14] !== totalCost) {
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
- $[25] = mark;
117
- $[26] = t17;
118
- } else {
119
- t17 = $[26];
120
- }
121
- if ($[27] !== t16 || $[28] !== t17) {
122
- t7 = /*#__PURE__*/_jsxs("span", {
123
- className: "flex min-w-0 items-baseline gap-2",
124
- children: [t16, t17]
125
- });
126
- $[27] = t16;
127
- $[28] = t17;
128
- $[29] = t7;
129
- } else {
130
- t7 = $[29];
131
- }
132
- let t18;
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
  }