@locusgraph/loop 0.3.1 → 0.4.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 (119) hide show
  1. package/dist/agent/index.d.ts +1 -1
  2. package/dist/agent/pulse/gradient-label.js +6 -5
  3. package/dist/agent/pulse/marks/bars-mark.js +1 -1
  4. package/dist/agent/pulse/marks/glyph-mark.js +2 -2
  5. package/dist/agent/pulse/marks/locus-mark.js +1 -1
  6. package/dist/agent/pulse/pulse.js +1 -1
  7. package/dist/agent/pulse/use-loop-animation.d.ts +0 -1
  8. package/dist/agent/pulse/use-loop-animation.js +1 -3
  9. package/dist/agent/steps/step-icon.js +20 -13
  10. package/dist/agent/steps/steps.js +39 -37
  11. package/dist/agent/thinking/thinking.js +65 -62
  12. package/dist/agent/tool/json-block.js +10 -7
  13. package/dist/agent/tool/tool-status.d.ts +2 -0
  14. package/dist/agent/tool/tool-status.js +16 -13
  15. package/dist/agent/tool/tool.d.ts +8 -1
  16. package/dist/agent/tool/tool.js +238 -119
  17. package/dist/approval/inbox/inbox-row.d.ts +3 -3
  18. package/dist/approval/inbox/inbox-row.js +135 -200
  19. package/dist/approval/inbox/inbox.d.ts +3 -3
  20. package/dist/approval/inbox/inbox.js +180 -139
  21. package/dist/approval/inbox/virtual-inbox-list.d.ts +3 -3
  22. package/dist/approval/inbox/virtual-inbox-list.js +20 -21
  23. package/dist/approval/memory/memory-review.js +155 -154
  24. package/dist/approval/memory/memory-row.js +86 -87
  25. package/dist/approval/plan/plan-review.js +110 -129
  26. package/dist/approval/plan/plan-step-row.js +7 -6
  27. package/dist/approval/plan/plan-steps.d.ts +1 -1
  28. package/dist/approval/plan/plan-steps.js +2 -2
  29. package/dist/approval/plan/question-choices.js +10 -7
  30. package/dist/approval/plan/question.js +116 -112
  31. package/dist/approval/run/run-bar.js +43 -40
  32. package/dist/approval/shared/approval-line.d.ts +27 -0
  33. package/dist/approval/shared/approval-line.js +85 -0
  34. package/dist/approval/shared/risk-badge.d.ts +3 -5
  35. package/dist/approval/shared/risk-badge.js +11 -19
  36. package/dist/approval/shared/time.d.ts +0 -1
  37. package/dist/approval/shared/time.js +0 -1
  38. package/dist/approval/shared/use-focus-when-settled.d.ts +2 -0
  39. package/dist/approval/shared/use-focus-when-settled.js +18 -0
  40. package/dist/approval/spend/raise-cap-form.d.ts +2 -2
  41. package/dist/approval/spend/raise-cap-form.js +134 -126
  42. package/dist/approval/spend/spend-gate.js +133 -156
  43. package/dist/approval/spend/spend-math.d.ts +1 -0
  44. package/dist/approval/spend/spend-math.js +5 -2
  45. package/dist/approval/spend/spend-meter.js +5 -5
  46. package/dist/approval/tool/approval.js +114 -214
  47. package/dist/approval/tool/args/args-editor.js +147 -156
  48. package/dist/approval/tool/args/args-field.js +197 -109
  49. package/dist/approval/tool/deny-form.js +59 -66
  50. package/dist/approval/tool/tool-inputs.js +38 -45
  51. package/dist/chat/chat/chat.js +5 -4
  52. package/dist/chat/chat/use-stick-to-bottom.js +1 -3
  53. package/dist/chat/composer/composer-actions.js +4 -1
  54. package/dist/chat/composer/composer.js +4 -3
  55. package/dist/chat/composer/use-auto-grow.js +14 -10
  56. package/dist/chat/files/files.js +12 -10
  57. package/dist/chat/reply/fenced-code.js +1 -1
  58. package/dist/chat/reply/markdown-components.js +9 -116
  59. package/dist/chat/reply/reply.js +2 -2
  60. package/dist/chat/turn/group-parts.d.ts +1 -0
  61. package/dist/chat/turn/group-parts.js +6 -3
  62. package/dist/chat/turn/turn.js +13 -4
  63. package/dist/cost/context.js +3 -3
  64. package/dist/cost/cost-steps.js +31 -30
  65. package/dist/cost/cost.js +39 -39
  66. package/dist/cost/model-picker.js +5 -4
  67. package/dist/cost/shared/context-breakdown.js +10 -11
  68. package/dist/cost/shared/model-option-row.js +4 -3
  69. package/dist/cost/shared/step-cost-row.js +11 -12
  70. package/dist/cost/shared/usage-totals.d.ts +1 -0
  71. package/dist/cost/shared/usage-totals.js +19 -1
  72. package/dist/memory/cite.js +55 -47
  73. package/dist/memory/memorized.js +123 -108
  74. package/dist/memory/recall.js +136 -146
  75. package/dist/memory/shared/host-label.d.ts +1 -1
  76. package/dist/memory/shared/host-label.js +2 -2
  77. package/dist/memory/shared/source-mark.js +1 -1
  78. package/dist/memory/sources.d.ts +2 -1
  79. package/dist/memory/sources.js +135 -100
  80. package/dist/shared/decision-summary.js +2 -1
  81. package/dist/shared/line.d.ts +10 -0
  82. package/dist/shared/line.js +11 -0
  83. package/dist/shared/live-status.d.ts +3 -0
  84. package/dist/shared/live-status.js +11 -0
  85. package/dist/shared/reduced-motion.d.ts +1 -0
  86. package/dist/shared/reduced-motion.js +3 -0
  87. package/dist/thread/actions/action-button.js +1 -1
  88. package/dist/thread/actions/actions.d.ts +3 -1
  89. package/dist/thread/actions/actions.js +100 -81
  90. package/dist/thread/actions/branch-switcher.js +67 -37
  91. package/dist/thread/canvas/canvas-meta.d.ts +9 -0
  92. package/dist/thread/canvas/canvas-meta.js +35 -0
  93. package/dist/thread/canvas/canvas.d.ts +1 -1
  94. package/dist/thread/canvas/canvas.js +64 -74
  95. package/dist/thread/canvas/version-switcher.d.ts +1 -0
  96. package/dist/thread/canvas/version-switcher.js +106 -87
  97. package/dist/thread/code/code.js +4 -6
  98. package/dist/thread/code/copy-code-button.d.ts +2 -1
  99. package/dist/thread/code/copy-code-button.js +56 -25
  100. package/dist/thread/history/history.d.ts +1 -1
  101. package/dist/thread/history/history.js +104 -104
  102. package/dist/thread/history/row/history-row.js +8 -5
  103. package/dist/thread/history/row/thread-item-menu.js +13 -4
  104. package/dist/thread/history/row/thread-title-editor.js +1 -1
  105. package/dist/thread/history/virtual-history-list.js +1 -2
  106. package/dist/thread/index.d.ts +1 -0
  107. package/dist/thread/index.js +1 -0
  108. package/dist/thread/starters/starters.js +5 -4
  109. package/package.json +6 -6
  110. package/dist/agent/shared/status-dot.d.ts +0 -1
  111. package/dist/agent/shared/status-dot.js +0 -1
  112. package/dist/approval/shared/decision-line.d.ts +0 -1
  113. package/dist/approval/shared/decision-line.js +0 -1
  114. package/dist/memory/shared/disclosure.d.ts +0 -6
  115. package/dist/memory/shared/disclosure.js +0 -6
  116. package/dist/shared/panel.d.ts +0 -19
  117. package/dist/shared/panel.js +0 -77
  118. package/dist/shared/status-dot.d.ts +0 -6
  119. package/dist/shared/status-dot.js +0 -20
@@ -1,14 +1,17 @@
1
1
  "use client";
2
2
 
3
3
  import { c as _c } from "react/compiler-runtime";
4
- import { Checkbox, Input, Label, NativeSelect, NativeSelectOption } from "@locusgraph/components";
5
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { Checkbox, cn } from "@locusgraph/components";
5
+ import { CaretDown as ChevronDownIcon } from "@phosphor-icons/react/ssr";
6
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
7
+ const valueWellClass = "flex h-control min-w-0 flex-1 items-center gap-2 bg-muted px-3 transition-shadow focus-within:ring-1 focus-within:ring-ring has-[[aria-invalid=true]]:ring-1 has-[[aria-invalid=true]]:ring-destructive motion-reduce:transition-none";
8
+ const bareControlClass = "h-full min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-faint";
6
9
  function describedBy(id, field, error) {
7
10
  const ids = [field.description && `${id}-hint`, error && `${id}-error`].filter(Boolean);
8
11
  return ids.length > 0 ? ids.join(" ") : undefined;
9
12
  }
10
13
  function FieldControl(t0) {
11
- const $ = _c(38);
14
+ const $ = _c(42);
12
15
  const {
13
16
  id,
14
17
  field,
@@ -77,194 +80,279 @@ function FieldControl(t0) {
77
80
  const text = typeof draft === "string" ? draft : "";
78
81
  if (field.type === "select") {
79
82
  let t6;
80
- if ($[16] !== onChange) {
81
- t6 = event => onChange(event.target.value);
82
- $[16] = onChange;
83
- $[17] = t6;
83
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
84
+ t6 = cn(bareControlClass, "appearance-none has-[option[value='']:checked]:text-faint");
85
+ $[16] = t6;
84
86
  } else {
85
- t6 = $[17];
87
+ t6 = $[16];
86
88
  }
87
89
  let t7;
88
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
89
- t7 = /*#__PURE__*/_jsx(NativeSelectOption, {
90
- value: "",
91
- children: "Choose\u2026"
92
- });
90
+ if ($[17] !== onChange) {
91
+ t7 = event => onChange(event.target.value);
92
+ $[17] = onChange;
93
93
  $[18] = t7;
94
94
  } else {
95
95
  t7 = $[18];
96
96
  }
97
97
  let t8;
98
- if ($[19] !== field.options) {
99
- t8 = field.options ?? [];
100
- $[19] = field.options;
101
- $[20] = t8;
98
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
99
+ t8 = /*#__PURE__*/_jsx("option", {
100
+ value: "",
101
+ children: "Choose\u2026"
102
+ });
103
+ $[19] = t8;
102
104
  } else {
103
- t8 = $[20];
105
+ t8 = $[19];
104
106
  }
105
107
  let t9;
106
- if ($[21] !== t8) {
107
- t9 = t8.map(_temp);
108
- $[21] = t8;
109
- $[22] = t9;
108
+ if ($[20] !== field.options) {
109
+ t9 = field.options ?? [];
110
+ $[20] = field.options;
111
+ $[21] = t9;
110
112
  } else {
111
- t9 = $[22];
113
+ t9 = $[21];
112
114
  }
113
115
  let t10;
114
- if ($[23] !== shared || $[24] !== t6 || $[25] !== t9 || $[26] !== text) {
115
- t10 = /*#__PURE__*/_jsxs(NativeSelect, {
116
+ if ($[22] !== t9) {
117
+ t10 = t9.map(_temp);
118
+ $[22] = t9;
119
+ $[23] = t10;
120
+ } else {
121
+ t10 = $[23];
122
+ }
123
+ let t11;
124
+ if ($[24] !== shared || $[25] !== t10 || $[26] !== t7 || $[27] !== text) {
125
+ t11 = /*#__PURE__*/_jsxs("select", {
116
126
  ...shared,
117
127
  value: text,
118
- onChange: t6,
119
- children: [t7, t9]
128
+ className: t6,
129
+ onChange: t7,
130
+ children: [t8, t10]
131
+ });
132
+ $[24] = shared;
133
+ $[25] = t10;
134
+ $[26] = t7;
135
+ $[27] = text;
136
+ $[28] = t11;
137
+ } else {
138
+ t11 = $[28];
139
+ }
140
+ let t12;
141
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
142
+ t12 = /*#__PURE__*/_jsx(ChevronDownIcon, {
143
+ weight: "bold",
144
+ "aria-hidden": true,
145
+ className: "pointer-events-none size-3.5 shrink-0 text-faint"
146
+ });
147
+ $[29] = t12;
148
+ } else {
149
+ t12 = $[29];
150
+ }
151
+ let t13;
152
+ if ($[30] !== t11) {
153
+ t13 = /*#__PURE__*/_jsxs(_Fragment, {
154
+ children: [t11, t12]
120
155
  });
121
- $[23] = shared;
122
- $[24] = t6;
123
- $[25] = t9;
124
- $[26] = text;
125
- $[27] = t10;
156
+ $[30] = t11;
157
+ $[31] = t13;
126
158
  } else {
127
- t10 = $[27];
159
+ t13 = $[31];
128
160
  }
129
- return t10;
161
+ return t13;
130
162
  }
131
163
  const t6 = field.type === "number" ? "number" : "text";
132
164
  const t7 = field.type === "number" ? "decimal" : undefined;
133
165
  let t8;
134
- if ($[28] !== onChange) {
166
+ if ($[32] !== onChange) {
135
167
  t8 = event_0 => onChange(event_0.target.value);
136
- $[28] = onChange;
137
- $[29] = t8;
168
+ $[32] = onChange;
169
+ $[33] = t8;
138
170
  } else {
139
- t8 = $[29];
171
+ t8 = $[33];
140
172
  }
141
173
  let t9;
142
- if ($[30] !== field.max || $[31] !== field.min || $[32] !== shared || $[33] !== t6 || $[34] !== t7 || $[35] !== t8 || $[36] !== text) {
143
- t9 = /*#__PURE__*/_jsx(Input, {
174
+ if ($[34] !== field.max || $[35] !== field.min || $[36] !== shared || $[37] !== t6 || $[38] !== t7 || $[39] !== t8 || $[40] !== text) {
175
+ t9 = /*#__PURE__*/_jsx("input", {
144
176
  ...shared,
145
177
  type: t6,
146
178
  inputMode: t7,
147
179
  min: field.min,
148
180
  max: field.max,
149
181
  value: text,
182
+ className: bareControlClass,
150
183
  onChange: t8
151
184
  });
152
- $[30] = field.max;
153
- $[31] = field.min;
154
- $[32] = shared;
155
- $[33] = t6;
156
- $[34] = t7;
157
- $[35] = t8;
158
- $[36] = text;
159
- $[37] = t9;
185
+ $[34] = field.max;
186
+ $[35] = field.min;
187
+ $[36] = shared;
188
+ $[37] = t6;
189
+ $[38] = t7;
190
+ $[39] = t8;
191
+ $[40] = text;
192
+ $[41] = t9;
160
193
  } else {
161
- t9 = $[37];
194
+ t9 = $[41];
162
195
  }
163
196
  return t9;
164
197
  }
165
198
  function _temp(option) {
166
- return /*#__PURE__*/_jsx(NativeSelectOption, {
199
+ return /*#__PURE__*/_jsx("option", {
167
200
  value: option.value,
168
201
  children: option.label
169
202
  }, option.value);
170
203
  }
204
+ function FieldValue(props) {
205
+ const $ = _c(4);
206
+ if (props.field.type === "boolean") {
207
+ let t0;
208
+ if ($[0] !== props) {
209
+ t0 = /*#__PURE__*/_jsx("div", {
210
+ className: "flex h-control flex-1 items-center px-3",
211
+ children: /*#__PURE__*/_jsx(FieldControl, {
212
+ ...props
213
+ })
214
+ });
215
+ $[0] = props;
216
+ $[1] = t0;
217
+ } else {
218
+ t0 = $[1];
219
+ }
220
+ return t0;
221
+ }
222
+ let t0;
223
+ if ($[2] !== props) {
224
+ t0 = /*#__PURE__*/_jsx("div", {
225
+ className: valueWellClass,
226
+ children: /*#__PURE__*/_jsx(FieldControl, {
227
+ ...props
228
+ })
229
+ });
230
+ $[2] = props;
231
+ $[3] = t0;
232
+ } else {
233
+ t0 = $[3];
234
+ }
235
+ return t0;
236
+ }
171
237
  export function ArgsField(props) {
172
- const $ = _c(23);
238
+ const $ = _c(27);
173
239
  const {
174
240
  id,
175
241
  field,
176
242
  error
177
243
  } = props;
178
- const inline = field.type === "boolean";
179
- const t0 = inline ? "flex flex-row-reverse items-center justify-end gap-2" : "contents";
244
+ const optional = !field.required && field.type !== "boolean";
245
+ let t0;
246
+ if ($[0] !== field.label) {
247
+ t0 = /*#__PURE__*/_jsx("span", {
248
+ className: "truncate",
249
+ children: field.label
250
+ });
251
+ $[0] = field.label;
252
+ $[1] = t0;
253
+ } else {
254
+ t0 = $[1];
255
+ }
180
256
  let t1;
181
- if ($[0] !== field.required) {
182
- t1 = field.required && /*#__PURE__*/_jsx("span", {
183
- className: "text-xs font-normal text-muted-foreground",
184
- children: "required"
257
+ if ($[2] !== optional) {
258
+ t1 = optional && /*#__PURE__*/_jsx("span", {
259
+ className: "text-xs text-faint",
260
+ children: "Optional"
185
261
  });
186
- $[0] = field.required;
187
- $[1] = t1;
262
+ $[2] = optional;
263
+ $[3] = t1;
188
264
  } else {
189
- t1 = $[1];
265
+ t1 = $[3];
190
266
  }
191
267
  let t2;
192
- if ($[2] !== field.label || $[3] !== id || $[4] !== t1) {
193
- t2 = /*#__PURE__*/_jsxs(Label, {
194
- htmlFor: id,
195
- children: [field.label, t1]
268
+ if ($[4] !== field.required) {
269
+ t2 = field.required && /*#__PURE__*/_jsx("span", {
270
+ className: "sr-only",
271
+ children: " (required)"
196
272
  });
197
- $[2] = field.label;
198
- $[3] = id;
199
- $[4] = t1;
273
+ $[4] = field.required;
200
274
  $[5] = t2;
201
275
  } else {
202
276
  t2 = $[5];
203
277
  }
204
278
  let t3;
205
- if ($[6] !== props) {
206
- t3 = /*#__PURE__*/_jsx(FieldControl, {
207
- ...props
279
+ if ($[6] !== id || $[7] !== t0 || $[8] !== t1 || $[9] !== t2) {
280
+ t3 = /*#__PURE__*/_jsxs("label", {
281
+ htmlFor: id,
282
+ className: "flex w-32 shrink-0 cursor-pointer flex-col text-muted-foreground",
283
+ children: [t0, t1, t2]
208
284
  });
209
- $[6] = props;
210
- $[7] = t3;
285
+ $[6] = id;
286
+ $[7] = t0;
287
+ $[8] = t1;
288
+ $[9] = t2;
289
+ $[10] = t3;
211
290
  } else {
212
- t3 = $[7];
291
+ t3 = $[10];
213
292
  }
214
293
  let t4;
215
- if ($[8] !== t0 || $[9] !== t2 || $[10] !== t3) {
216
- t4 = /*#__PURE__*/_jsxs("div", {
217
- className: t0,
218
- children: [t2, t3]
294
+ if ($[11] !== props) {
295
+ t4 = /*#__PURE__*/_jsx(FieldValue, {
296
+ ...props
219
297
  });
220
- $[8] = t0;
221
- $[9] = t2;
222
- $[10] = t3;
223
- $[11] = t4;
298
+ $[11] = props;
299
+ $[12] = t4;
224
300
  } else {
225
- t4 = $[11];
301
+ t4 = $[12];
226
302
  }
227
303
  let t5;
228
- if ($[12] !== field.description || $[13] !== id) {
229
- t5 = field.description && /*#__PURE__*/_jsx("p", {
304
+ if ($[13] !== t3 || $[14] !== t4) {
305
+ t5 = /*#__PURE__*/_jsxs("div", {
306
+ className: "flex min-w-0 items-center gap-4 text-sm",
307
+ children: [t3, t4]
308
+ });
309
+ $[13] = t3;
310
+ $[14] = t4;
311
+ $[15] = t5;
312
+ } else {
313
+ t5 = $[15];
314
+ }
315
+ let t6;
316
+ if ($[16] !== field.description || $[17] !== id) {
317
+ t6 = field.description && /*#__PURE__*/_jsx("p", {
230
318
  id: `${id}-hint`,
231
- className: "text-xs text-muted-foreground",
319
+ className: "pl-39 text-xs text-faint",
232
320
  children: field.description
233
321
  });
234
- $[12] = field.description;
235
- $[13] = id;
236
- $[14] = t5;
322
+ $[16] = field.description;
323
+ $[17] = id;
324
+ $[18] = t6;
237
325
  } else {
238
- t5 = $[14];
326
+ t6 = $[18];
239
327
  }
240
- let t6;
241
- if ($[15] !== error || $[16] !== id) {
242
- t6 = error && /*#__PURE__*/_jsx("p", {
328
+ let t7;
329
+ if ($[19] !== error || $[20] !== id) {
330
+ t7 = error && /*#__PURE__*/_jsx("p", {
243
331
  id: `${id}-error`,
244
- className: "text-xs text-destructive",
332
+ className: "pl-39 text-xs text-destructive",
245
333
  children: error
246
334
  });
247
- $[15] = error;
248
- $[16] = id;
249
- $[17] = t6;
335
+ $[19] = error;
336
+ $[20] = id;
337
+ $[21] = t7;
250
338
  } else {
251
- t6 = $[17];
339
+ t7 = $[21];
252
340
  }
253
- let t7;
254
- if ($[18] !== field.type || $[19] !== t4 || $[20] !== t5 || $[21] !== t6) {
255
- t7 = /*#__PURE__*/_jsxs("div", {
341
+ let t8;
342
+ if ($[22] !== field.type || $[23] !== t5 || $[24] !== t6 || $[25] !== t7) {
343
+ t8 = /*#__PURE__*/_jsxs("div", {
256
344
  "data-slot": "args-field",
257
345
  "data-type": field.type,
258
- className: "flex flex-col gap-1.5 [&_[data-slot=native-select-wrapper]]:w-full",
259
- children: [t4, t5, t6]
346
+ className: "flex flex-col gap-1",
347
+ children: [t5, t6, t7]
260
348
  });
261
- $[18] = field.type;
262
- $[19] = t4;
263
- $[20] = t5;
264
- $[21] = t6;
265
- $[22] = t7;
349
+ $[22] = field.type;
350
+ $[23] = t5;
351
+ $[24] = t6;
352
+ $[25] = t7;
353
+ $[26] = t8;
266
354
  } else {
267
- t7 = $[22];
355
+ t8 = $[26];
268
356
  }
269
- return t7;
357
+ return t8;
270
358
  }
@@ -3,11 +3,10 @@
3
3
  import { c as _c } from "react/compiler-runtime";
4
4
  import { Button, Label, Textarea } from "@locusgraph/components";
5
5
  import { useId, useState } from "react";
6
- import { PanelBody, PanelFooter } from "../../shared/panel.js";
7
6
  import { useFocusOnMount } from "../shared/use-focus-on-mount.js";
8
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
8
  export function DenyForm(t0) {
10
- const $ = _c(24);
9
+ const $ = _c(21);
11
10
  const {
12
11
  onDeny,
13
12
  onBack
@@ -37,101 +36,95 @@ export function DenyForm(t0) {
37
36
  t2 = $[4];
38
37
  }
39
38
  let t3;
40
- if ($[5] !== reasonId) {
41
- t3 = /*#__PURE__*/_jsx(Label, {
42
- htmlFor: reasonId,
43
- className: "text-xs font-normal text-muted-foreground",
44
- children: "Reason for the agent (optional)"
39
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
40
+ t3 = /*#__PURE__*/_jsx("span", {
41
+ className: "text-xs text-faint",
42
+ children: "Optional"
45
43
  });
46
- $[5] = reasonId;
47
- $[6] = t3;
44
+ $[5] = t3;
48
45
  } else {
49
- t3 = $[6];
46
+ t3 = $[5];
50
47
  }
51
48
  let t4;
52
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
53
- t4 = event_0 => setReason(event_0.target.value);
49
+ if ($[6] !== reasonId) {
50
+ t4 = /*#__PURE__*/_jsxs(Label, {
51
+ htmlFor: reasonId,
52
+ className: "text-sm font-normal text-muted-foreground",
53
+ children: ["Why deny? ", t3]
54
+ });
55
+ $[6] = reasonId;
54
56
  $[7] = t4;
55
57
  } else {
56
58
  t4 = $[7];
57
59
  }
58
60
  let t5;
59
- if ($[8] !== reason || $[9] !== reasonId || $[10] !== reasonRef) {
60
- t5 = /*#__PURE__*/_jsx(Textarea, {
61
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
62
+ t5 = event_0 => setReason(event_0.target.value);
63
+ $[8] = t5;
64
+ } else {
65
+ t5 = $[8];
66
+ }
67
+ let t6;
68
+ if ($[9] !== reason || $[10] !== reasonId || $[11] !== reasonRef) {
69
+ t6 = /*#__PURE__*/_jsx(Textarea, {
61
70
  id: reasonId,
62
71
  ref: reasonRef,
63
72
  value: reason,
73
+ className: "border-transparent bg-muted shadow-none placeholder:text-faint dark:bg-muted",
64
74
  placeholder: "Tell the agent what to do instead",
65
- onChange: t4
66
- });
67
- $[8] = reason;
68
- $[9] = reasonId;
69
- $[10] = reasonRef;
70
- $[11] = t5;
71
- } else {
72
- t5 = $[11];
73
- }
74
- let t6;
75
- if ($[12] !== t3 || $[13] !== t5) {
76
- t6 = /*#__PURE__*/_jsxs(PanelBody, {
77
- className: "gap-2 pt-0",
78
- children: [t3, t5]
75
+ onChange: t5
79
76
  });
80
- $[12] = t3;
81
- $[13] = t5;
82
- $[14] = t6;
77
+ $[9] = reason;
78
+ $[10] = reasonId;
79
+ $[11] = reasonRef;
80
+ $[12] = t6;
83
81
  } else {
84
- t6 = $[14];
82
+ t6 = $[12];
85
83
  }
86
84
  let t7;
87
- if ($[15] !== onBack) {
85
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
88
86
  t7 = /*#__PURE__*/_jsx(Button, {
89
- type: "button",
90
- variant: "ghost",
91
- size: "sm",
92
- onClick: onBack,
93
- children: "Back"
94
- });
95
- $[15] = onBack;
96
- $[16] = t7;
97
- } else {
98
- t7 = $[16];
99
- }
100
- let t8;
101
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
102
- t8 = /*#__PURE__*/_jsx(Button, {
103
87
  type: "submit",
104
88
  variant: "destructive",
105
89
  size: "sm",
106
90
  children: "Send denial"
107
91
  });
108
- $[17] = t8;
92
+ $[13] = t7;
109
93
  } else {
110
- t8 = $[17];
94
+ t7 = $[13];
111
95
  }
112
- let t9;
113
- if ($[18] !== t7) {
114
- t9 = /*#__PURE__*/_jsxs(PanelFooter, {
115
- children: [t7, t8]
96
+ let t8;
97
+ if ($[14] !== onBack) {
98
+ t8 = /*#__PURE__*/_jsxs("div", {
99
+ className: "flex flex-wrap gap-2",
100
+ children: [t7, /*#__PURE__*/_jsx(Button, {
101
+ type: "button",
102
+ variant: "ghost",
103
+ size: "sm",
104
+ onClick: onBack,
105
+ children: "Back"
106
+ })]
116
107
  });
117
- $[18] = t7;
118
- $[19] = t9;
108
+ $[14] = onBack;
109
+ $[15] = t8;
119
110
  } else {
120
- t9 = $[19];
111
+ t8 = $[15];
121
112
  }
122
- let t10;
123
- if ($[20] !== t2 || $[21] !== t6 || $[22] !== t9) {
124
- t10 = /*#__PURE__*/_jsxs("form", {
113
+ let t9;
114
+ if ($[16] !== t2 || $[17] !== t4 || $[18] !== t6 || $[19] !== t8) {
115
+ t9 = /*#__PURE__*/_jsxs("form", {
125
116
  "data-slot": "deny-form",
117
+ className: "flex flex-col gap-2 pt-1",
126
118
  onSubmit: t2,
127
- children: [t6, t9]
119
+ children: [t4, t6, t8]
128
120
  });
129
- $[20] = t2;
130
- $[21] = t6;
131
- $[22] = t9;
132
- $[23] = t10;
121
+ $[16] = t2;
122
+ $[17] = t4;
123
+ $[18] = t6;
124
+ $[19] = t8;
125
+ $[20] = t9;
133
126
  } else {
134
- t10 = $[23];
127
+ t9 = $[20];
135
128
  }
136
- return t10;
129
+ return t9;
137
130
  }