@adecore/agents-react 0.46.3 → 0.47.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 (56) hide show
  1. package/dist/chat/index.d.ts +1 -0
  2. package/dist/chat/index.js +1 -0
  3. package/dist/chat/logic/scrubber.js +12 -0
  4. package/dist/chat/logic/timeline-copy.js +2 -0
  5. package/dist/chat/logic/timeline.d.ts +6 -1
  6. package/dist/chat/logic/timeline.js +36 -10
  7. package/dist/chat/ui/ChatActivity.d.ts +2 -1
  8. package/dist/chat/ui/ChatActivity.js +295 -61
  9. package/dist/chat/ui/Composer.d.ts +2 -1
  10. package/dist/chat/ui/Composer.js +492 -486
  11. package/dist/chat/ui/PromptEditor.js +4 -1
  12. package/dist/chat/ui/ReferenceChip.d.ts +2 -1
  13. package/dist/chat/ui/ReferenceChip.js +135 -100
  14. package/dist/chat/ui/composer/ComposerMenu.js +17 -11
  15. package/dist/chat/ui/composer/chips.d.ts +3 -0
  16. package/dist/chat/ui/composer/chips.js +14 -10
  17. package/dist/chat/ui/reference-icons.d.ts +3 -0
  18. package/dist/chat/ui/reference-icons.js +15 -2
  19. package/dist/chat/ui/rows/MessageRows.d.ts +6 -1
  20. package/dist/chat/ui/rows/MessageRows.js +166 -10
  21. package/dist/chat/ui/rows/RowContainer.js +21 -22
  22. package/dist/chat/ui/rows/Rows.js +37 -19
  23. package/dist/chat/ui/rows/WorkflowRow.d.ts +2 -1
  24. package/dist/chat/ui/rows/WorkflowRow.js +197 -191
  25. package/dist/chat/ui/rows/row-rhythm.d.ts +1 -0
  26. package/dist/chat/ui/rows/row-rhythm.js +12 -3
  27. package/dist/chat/workflow-list.d.ts +12 -0
  28. package/dist/chat/workflow-list.js +54 -0
  29. package/dist/host.d.ts +8 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/locales/en/agent-chat.d.ts +9 -0
  32. package/dist/locales/en/agent-chat.js +9 -0
  33. package/dist/locales/nl/agent-chat.d.ts +9 -0
  34. package/dist/locales/nl/agent-chat.js +9 -0
  35. package/package.json +8 -8
  36. package/src/chat/index.ts +1 -0
  37. package/src/chat/logic/scrubber.ts +5 -0
  38. package/src/chat/logic/timeline-copy.ts +2 -0
  39. package/src/chat/logic/timeline.ts +33 -2
  40. package/src/chat/ui/ChatActivity.tsx +52 -6
  41. package/src/chat/ui/Composer.tsx +19 -3
  42. package/src/chat/ui/PromptEditor.tsx +3 -1
  43. package/src/chat/ui/ReferenceChip.tsx +15 -5
  44. package/src/chat/ui/composer/ComposerMenu.tsx +4 -2
  45. package/src/chat/ui/composer/chips.ts +15 -9
  46. package/src/chat/ui/reference-icons.ts +13 -1
  47. package/src/chat/ui/rows/MessageRows.tsx +35 -0
  48. package/src/chat/ui/rows/RowContainer.tsx +2 -2
  49. package/src/chat/ui/rows/Rows.tsx +3 -0
  50. package/src/chat/ui/rows/WorkflowRow.tsx +9 -4
  51. package/src/chat/ui/rows/row-rhythm.ts +12 -3
  52. package/src/chat/workflow-list.ts +65 -0
  53. package/src/host.ts +15 -1
  54. package/src/index.ts +1 -0
  55. package/src/locales/en/agent-chat.ts +9 -0
  56. package/src/locales/nl/agent-chat.ts +9 -0
@@ -55,7 +55,7 @@ function sendLabelKey(busy, steerable, delivery) {
55
55
  return delivery === 'steer' ? 'composer.steerButton' : 'composer.queueWithSteerButton';
56
56
  }
57
57
  export function Composer(t0) {
58
- const $ = _c(246);
58
+ const $ = _c(248);
59
59
  const {
60
60
  chatId,
61
61
  info,
@@ -63,11 +63,13 @@ export function Composer(t0) {
63
63
  answerPromptsElsewhere,
64
64
  disabled,
65
65
  readOnly: t1,
66
+ workflowPill: t2,
66
67
  providerFixed,
67
68
  onSend,
68
69
  onRetarget
69
70
  } = t0;
70
71
  const readOnly = t1 === undefined ? false : t1;
72
+ const workflowPill = t2 === undefined ? true : t2;
71
73
  const {
72
74
  t
73
75
  } = useTranslation("agent-chat");
@@ -75,15 +77,15 @@ export function Composer(t0) {
75
77
  const scope = useChatScope();
76
78
  const sendDelivery = useHostSendDelivery();
77
79
  const sendKey = useChatPreferences(_temp);
78
- let t2;
80
+ let t3;
79
81
  if ($[0] !== info.provider) {
80
- t2 = row => row.providers.find(entry => entry.kind === info.provider);
82
+ t3 = row => row.providers.find(entry => entry.kind === info.provider);
81
83
  $[0] = info.provider;
82
- $[1] = t2;
84
+ $[1] = t3;
83
85
  } else {
84
- t2 = $[1];
86
+ t3 = $[1];
85
87
  }
86
- const provider = useProviders(t2);
88
+ const provider = useProviders(t3);
87
89
  const capabilities = provider?.capabilities;
88
90
  const steerable = canSteer(capabilities);
89
91
  const writable = !disabled && !readOnly;
@@ -97,14 +99,14 @@ export function Composer(t0) {
97
99
  } = box;
98
100
  const notice = useNotice();
99
101
  const history = usePromptHistory(chatId, box.setText);
100
- const t3 = provider?.name;
101
- let t4;
102
- if ($[2] !== box || $[3] !== capabilities || $[4] !== chatId || $[5] !== info || $[6] !== t3) {
103
- t4 = {
102
+ const t4 = provider?.name;
103
+ let t5;
104
+ if ($[2] !== box || $[3] !== capabilities || $[4] !== chatId || $[5] !== info || $[6] !== t4) {
105
+ t5 = {
104
106
  chatId,
105
107
  info,
106
108
  capabilities,
107
- providerName: t3,
109
+ providerName: t4,
108
110
  draft: box,
109
111
  inputRef
110
112
  };
@@ -112,33 +114,33 @@ export function Composer(t0) {
112
114
  $[3] = capabilities;
113
115
  $[4] = chatId;
114
116
  $[5] = info;
115
- $[6] = t3;
116
- $[7] = t4;
117
+ $[6] = t4;
118
+ $[7] = t5;
117
119
  } else {
118
- t4 = $[7];
120
+ t5 = $[7];
119
121
  }
120
- const menus = useComposerMenus(t4);
121
- const t5 = provider?.name;
122
- let t6;
122
+ const menus = useComposerMenus(t5);
123
+ const t6 = provider?.name;
124
+ let t7;
123
125
  if ($[8] !== menus.referables.chatsOnly || $[9] !== menus.referables.items) {
124
- t6 = menus.referables.chatsOnly ? menus.referables.items.filter(_temp2) : menus.referables.items;
126
+ t7 = menus.referables.chatsOnly ? menus.referables.items.filter(_temp2) : menus.referables.items;
125
127
  $[8] = menus.referables.chatsOnly;
126
128
  $[9] = menus.referables.items;
127
- $[10] = t6;
129
+ $[10] = t7;
128
130
  } else {
129
- t6 = $[10];
131
+ t7 = $[10];
130
132
  }
131
- let t7;
132
- if ($[11] !== box || $[12] !== capabilities || $[13] !== menus.referenceChips || $[14] !== menus.skillNames || $[15] !== notice.setNotice || $[16] !== t5 || $[17] !== t6 || $[18] !== writable) {
133
- t7 = {
133
+ let t8;
134
+ if ($[11] !== box || $[12] !== capabilities || $[13] !== menus.referenceChips || $[14] !== menus.skillNames || $[15] !== notice.setNotice || $[16] !== t6 || $[17] !== t7 || $[18] !== writable) {
135
+ t8 = {
134
136
  capabilities,
135
- providerName: t5,
137
+ providerName: t6,
136
138
  writable,
137
139
  draft: box,
138
140
  inputRef,
139
141
  setNotice: notice.setNotice,
140
142
  skills: menus.skillNames,
141
- referables: t6,
143
+ referables: t7,
142
144
  referenceChips: menus.referenceChips
143
145
  };
144
146
  $[11] = box;
@@ -146,17 +148,17 @@ export function Composer(t0) {
146
148
  $[13] = menus.referenceChips;
147
149
  $[14] = menus.skillNames;
148
150
  $[15] = notice.setNotice;
149
- $[16] = t5;
150
- $[17] = t6;
151
+ $[16] = t6;
152
+ $[17] = t7;
151
153
  $[18] = writable;
152
- $[19] = t7;
154
+ $[19] = t8;
153
155
  } else {
154
- t7 = $[19];
156
+ t8 = $[19];
155
157
  }
156
- const files = useDraftFiles(t7);
157
- let t8;
158
+ const files = useDraftFiles(t8);
159
+ let t9;
158
160
  if ($[20] !== chatId || $[21] !== info || $[22] !== notice || $[23] !== onRetarget) {
159
- t8 = {
161
+ t9 = {
160
162
  chatId,
161
163
  info,
162
164
  notice,
@@ -166,26 +168,26 @@ export function Composer(t0) {
166
168
  $[21] = info;
167
169
  $[22] = notice;
168
170
  $[23] = onRetarget;
169
- $[24] = t8;
171
+ $[24] = t9;
170
172
  } else {
171
- t8 = $[24];
173
+ t9 = $[24];
172
174
  }
173
- const controls = useChatControls(t8);
174
- let t9;
175
+ const controls = useChatControls(t9);
176
+ let t10;
175
177
  if ($[25] !== info.selection || $[26] !== provider?.models) {
176
- t9 = provider?.models.find(entry_0 => entry_0.slug === info.selection.model);
178
+ t10 = provider?.models.find(entry_0 => entry_0.slug === info.selection.model);
177
179
  $[25] = info.selection;
178
180
  $[26] = provider?.models;
179
- $[27] = t9;
181
+ $[27] = t10;
180
182
  } else {
181
- t9 = $[27];
183
+ t10 = $[27];
182
184
  }
183
- let t10;
184
- if ($[28] !== chatId || $[29] !== controls || $[30] !== info || $[31] !== notice.setNotice || $[32] !== t9 || $[33] !== writable) {
185
- t10 = {
185
+ let t11;
186
+ if ($[28] !== chatId || $[29] !== controls || $[30] !== info || $[31] !== notice.setNotice || $[32] !== t10 || $[33] !== writable) {
187
+ t11 = {
186
188
  chatId,
187
189
  info,
188
- model: t9,
190
+ model: t10,
189
191
  writable,
190
192
  controls,
191
193
  setNotice: notice.setNotice
@@ -194,21 +196,21 @@ export function Composer(t0) {
194
196
  $[29] = controls;
195
197
  $[30] = info;
196
198
  $[31] = notice.setNotice;
197
- $[32] = t9;
199
+ $[32] = t10;
198
200
  $[33] = writable;
199
- $[34] = t10;
201
+ $[34] = t11;
200
202
  } else {
201
- t10 = $[34];
203
+ t11 = $[34];
202
204
  }
203
- useEffortStepper(t10);
205
+ useEffortStepper(t11);
204
206
  const guard = promptGuard(withQuote(draft.quote, draft.text));
205
207
  const continuable = useContinuableTurn(chatId, info);
206
208
  const [sentFor, setSentFor] = useState(null);
207
209
  const extraPrompts = useHostExtraPrompts(scope.id, chatId);
208
210
  const sendActions = useHostComposerSendActions(scope.id, chatId);
209
- let t11;
211
+ let t12;
210
212
  if ($[35] !== continuable || $[36] !== onSend) {
211
- t11 = (text, extras) => {
213
+ t12 = (text, extras) => {
212
214
  setSentFor(continuable);
213
215
  const sent = onSend(text, extras);
214
216
  Promise.resolve(sent).then(taken => {
@@ -223,9 +225,9 @@ export function Composer(t0) {
223
225
  };
224
226
  $[35] = continuable;
225
227
  $[36] = onSend;
226
- $[37] = t11;
228
+ $[37] = t12;
227
229
  } else {
228
- t11 = $[37];
230
+ t12 = $[37];
229
231
  }
230
232
  const {
231
233
  submit,
@@ -245,131 +247,133 @@ export function Composer(t0) {
245
247
  hold,
246
248
  inputRef,
247
249
  setNotice: notice.setNotice,
248
- onSend: t11
250
+ onSend: t12
249
251
  });
250
- let t12;
252
+ let t13;
251
253
  if ($[38] !== history) {
252
- t12 = () => {
254
+ t13 = () => {
253
255
  history.forget();
254
256
  inputRef.current?.focus();
255
257
  };
256
258
  $[38] = history;
257
- $[39] = t12;
259
+ $[39] = t13;
258
260
  } else {
259
- t12 = $[39];
261
+ t13 = $[39];
260
262
  }
261
- let t13;
262
- if ($[40] !== box || $[41] !== chatId || $[42] !== notice.setNotice || $[43] !== t12) {
263
- t13 = {
263
+ let t14;
264
+ if ($[40] !== box || $[41] !== chatId || $[42] !== notice.setNotice || $[43] !== t13) {
265
+ t14 = {
264
266
  chatId,
265
267
  draft: box,
266
268
  setNotice: notice.setNotice,
267
- onTaken: t12
269
+ onTaken: t13
268
270
  };
269
271
  $[40] = box;
270
272
  $[41] = chatId;
271
273
  $[42] = notice.setNotice;
272
- $[43] = t12;
273
- $[44] = t13;
274
+ $[43] = t13;
275
+ $[44] = t14;
274
276
  } else {
275
- t13 = $[44];
277
+ t14 = $[44];
276
278
  }
277
279
  const {
278
280
  takingBack,
279
281
  takeBack
280
- } = useTakeBack(t13);
282
+ } = useTakeBack(t14);
281
283
  const pending = usePendingRequests(chatId);
282
284
  const compactionOffer = useCompactionOffer(chatId, info, capabilities?.compaction);
283
- const t14 = capabilities?.mentions !== false;
284
- let t15;
285
- if ($[45] !== chatId || $[46] !== disabled || $[47] !== menus.hasSkills || $[48] !== readOnly || $[49] !== t14) {
286
- t15 = {
285
+ const t15 = capabilities?.mentions !== false;
286
+ let t16;
287
+ if ($[45] !== chatId || $[46] !== disabled || $[47] !== menus.hasSkills || $[48] !== readOnly || $[49] !== t15) {
288
+ t16 = {
287
289
  chatId,
288
290
  disabled,
289
291
  readOnly,
290
- mentionable: t14,
292
+ mentionable: t15,
291
293
  hasSkills: menus.hasSkills
292
294
  };
293
295
  $[45] = chatId;
294
296
  $[46] = disabled;
295
297
  $[47] = menus.hasSkills;
296
298
  $[48] = readOnly;
297
- $[49] = t14;
298
- $[50] = t15;
299
+ $[49] = t15;
300
+ $[50] = t16;
299
301
  } else {
300
- t15 = $[50];
302
+ t16 = $[50];
301
303
  }
302
- const placeholder = useHintedPlaceholder(t15);
303
- let t16;
304
- if ($[51] !== draft.mentions || $[52] !== draft.skills || $[53] !== menus.referenceChips) {
305
- t16 = chipDecorations({
304
+ const placeholder = useHintedPlaceholder(t16);
305
+ let t17;
306
+ if ($[51] !== draft.mentions || $[52] !== draft.skills || $[53] !== host.ReferenceIcon || $[54] !== menus.referenceChips) {
307
+ t17 = chipDecorations({
306
308
  mentions: draft.mentions,
307
309
  skills: draft.skills,
308
- references: menus.referenceChips
310
+ references: menus.referenceChips,
311
+ referenceIcon: host.ReferenceIcon
309
312
  });
310
313
  $[51] = draft.mentions;
311
314
  $[52] = draft.skills;
312
- $[53] = menus.referenceChips;
313
- $[54] = t16;
314
- } else {
315
- t16 = $[54];
316
- }
317
- let t17;
318
- if ($[55] !== t16) {
319
- t17 = [t16, LEAVE_DROPS_TO_THE_CARD];
320
- $[55] = t16;
321
- $[56] = t17;
315
+ $[53] = host.ReferenceIcon;
316
+ $[54] = menus.referenceChips;
317
+ $[55] = t17;
322
318
  } else {
323
- t17 = $[56];
319
+ t17 = $[55];
324
320
  }
325
- const editorExtensions = t17;
326
321
  let t18;
327
- if ($[57] !== chatId) {
328
- t18 = () => timelineAtEnd(chatId);
329
- $[57] = chatId;
330
- $[58] = t18;
322
+ if ($[56] !== t17) {
323
+ t18 = [t17, LEAVE_DROPS_TO_THE_CARD];
324
+ $[56] = t17;
325
+ $[57] = t18;
331
326
  } else {
332
- t18 = $[58];
327
+ t18 = $[57];
333
328
  }
334
- const atEnd = useSyncExternalStore(subscribeTimelineEnd, t18, _temp3);
329
+ const editorExtensions = t18;
335
330
  let t19;
336
- if ($[59] !== info.queue) {
337
- t19 = info.queue ?? [];
338
- $[59] = info.queue;
339
- $[60] = t19;
331
+ if ($[58] !== chatId) {
332
+ t19 = () => timelineAtEnd(chatId);
333
+ $[58] = chatId;
334
+ $[59] = t19;
340
335
  } else {
341
- t19 = $[60];
336
+ t19 = $[59];
342
337
  }
343
- const queue = t19;
338
+ const atEnd = useSyncExternalStore(subscribeTimelineEnd, t19, _temp3);
344
339
  let t20;
345
- if ($[61] !== draft) {
346
- t20 = isEmptyDraft(draft);
347
- $[61] = draft;
348
- $[62] = t20;
340
+ if ($[60] !== info.queue) {
341
+ t20 = info.queue ?? [];
342
+ $[60] = info.queue;
343
+ $[61] = t20;
349
344
  } else {
350
- t20 = $[62];
345
+ t20 = $[61];
351
346
  }
352
- const empty = t20;
347
+ const queue = t20;
353
348
  let t21;
349
+ if ($[62] !== draft) {
350
+ t21 = isEmptyDraft(draft);
351
+ $[62] = draft;
352
+ $[63] = t21;
353
+ } else {
354
+ t21 = $[63];
355
+ }
356
+ const empty = t21;
354
357
  let t22;
355
- if ($[63] !== focused) {
356
- t21 = () => {
358
+ let t23;
359
+ if ($[64] !== focused) {
360
+ t22 = () => {
357
361
  if (focused) {
358
362
  inputRef.current?.focus();
359
363
  }
360
364
  };
361
- t22 = [focused];
362
- $[63] = focused;
363
- $[64] = t21;
365
+ t23 = [focused];
366
+ $[64] = focused;
364
367
  $[65] = t22;
368
+ $[66] = t23;
365
369
  } else {
366
- t21 = $[64];
367
370
  t22 = $[65];
371
+ t23 = $[66];
368
372
  }
369
- useEffect(t21, t22);
370
- let t23;
371
- if ($[66] !== chatId || $[67] !== draft.text || $[68] !== files.noteKey || $[69] !== history || $[70] !== host || $[71] !== menus || $[72] !== sendKey || $[73] !== submit || $[74] !== toggleStash) {
372
- t23 = composerKeyHandler({
373
+ useEffect(t22, t23);
374
+ let t24;
375
+ if ($[67] !== chatId || $[68] !== draft.text || $[69] !== files.noteKey || $[70] !== history || $[71] !== host || $[72] !== menus || $[73] !== sendKey || $[74] !== submit || $[75] !== toggleStash) {
376
+ t24 = composerKeyHandler({
373
377
  chatId,
374
378
  host,
375
379
  sendKey,
@@ -380,40 +384,40 @@ export function Composer(t0) {
380
384
  toggleStash,
381
385
  submit
382
386
  });
383
- $[66] = chatId;
384
- $[67] = draft.text;
385
- $[68] = files.noteKey;
386
- $[69] = history;
387
- $[70] = host;
388
- $[71] = menus;
389
- $[72] = sendKey;
390
- $[73] = submit;
391
- $[74] = toggleStash;
392
- $[75] = t23;
393
- } else {
394
- t23 = $[75];
395
- }
396
- const onKeyDown = t23;
387
+ $[67] = chatId;
388
+ $[68] = draft.text;
389
+ $[69] = files.noteKey;
390
+ $[70] = history;
391
+ $[71] = host;
392
+ $[72] = menus;
393
+ $[73] = sendKey;
394
+ $[74] = submit;
395
+ $[75] = toggleStash;
396
+ $[76] = t24;
397
+ } else {
398
+ t24 = $[76];
399
+ }
400
+ const onKeyDown = t24;
397
401
  const pointSurface = _temp4;
398
- let t24;
399
- if ($[76] !== writable) {
400
- t24 = event_0 => {
402
+ let t25;
403
+ if ($[77] !== writable) {
404
+ t25 = event_0 => {
401
405
  if (!writable || event_0.button !== 0 || event_0.defaultPrevented || surfacePartOf(event_0.target, event_0.currentTarget) !== "surface") {
402
406
  return;
403
407
  }
404
408
  event_0.preventDefault();
405
409
  inputRef.current?.setCaret(Infinity);
406
410
  };
407
- $[76] = writable;
408
- $[77] = t24;
411
+ $[77] = writable;
412
+ $[78] = t25;
409
413
  } else {
410
- t24 = $[77];
414
+ t25 = $[78];
411
415
  }
412
- const pressSurface = t24;
413
- const t25 = "chat-composer-content pointer-events-none relative z-10 w-full";
414
- let t26;
415
- if ($[78] !== atEnd || $[79] !== chatId || $[80] !== readOnly || $[81] !== t) {
416
- t26 = !atEnd && !readOnly && /*#__PURE__*/_jsx("div", {
416
+ const pressSurface = t25;
417
+ const t26 = "chat-composer-content pointer-events-none relative z-10 w-full";
418
+ let t27;
419
+ if ($[79] !== atEnd || $[80] !== chatId || $[81] !== readOnly || $[82] !== t) {
420
+ t27 = !atEnd && !readOnly && /*#__PURE__*/_jsx("div", {
417
421
  className: "absolute inset-x-0 bottom-full mb-2 flex justify-center",
418
422
  children: /*#__PURE__*/_jsx(Tooltip, {
419
423
  label: t("composer.jumpToEnd"),
@@ -430,470 +434,464 @@ export function Composer(t0) {
430
434
  })
431
435
  })
432
436
  });
433
- $[78] = atEnd;
434
- $[79] = chatId;
435
- $[80] = readOnly;
436
- $[81] = t;
437
- $[82] = t26;
437
+ $[79] = atEnd;
438
+ $[80] = chatId;
439
+ $[81] = readOnly;
440
+ $[82] = t;
441
+ $[83] = t27;
438
442
  } else {
439
- t26 = $[82];
443
+ t27 = $[83];
440
444
  }
441
- let t27;
442
- if ($[83] !== chatId) {
443
- t27 = /*#__PURE__*/_jsx(ChatActivity, {
444
- chatId: chatId
445
+ let t28;
446
+ if ($[84] !== chatId || $[85] !== workflowPill) {
447
+ t28 = /*#__PURE__*/_jsx(ChatActivity, {
448
+ chatId: chatId,
449
+ workflows: workflowPill
445
450
  });
446
- $[83] = chatId;
447
- $[84] = t27;
451
+ $[84] = chatId;
452
+ $[85] = workflowPill;
453
+ $[86] = t28;
448
454
  } else {
449
- t27 = $[84];
455
+ t28 = $[86];
450
456
  }
451
- const t28 = files.dragging ? "border-accent bg-[color-mix(in_srgb,var(--accent-soft)_60%,var(--surface-raised))]" : "border-border bg-[color-mix(in_srgb,var(--surface-raised)_92%,transparent)]";
452
- let t29;
453
- if ($[85] !== t28) {
454
- t29 = clsx("@container/composer pointer-events-auto flex flex-col overflow-hidden rounded-2xl border shadow-float backdrop-blur-[14px] focus-ring-within", t28);
455
- $[85] = t28;
456
- $[86] = t29;
457
+ const t29 = files.dragging ? "border-accent bg-[color-mix(in_srgb,var(--accent-soft)_60%,var(--surface-raised))]" : "border-border bg-[color-mix(in_srgb,var(--surface-raised)_92%,transparent)]";
458
+ let t30;
459
+ if ($[87] !== t29) {
460
+ t30 = clsx("@container/composer pointer-events-auto flex flex-col overflow-hidden rounded-2xl border shadow-float backdrop-blur-[14px] focus-ring-within", t29);
461
+ $[87] = t29;
462
+ $[88] = t30;
457
463
  } else {
458
- t29 = $[86];
464
+ t30 = $[88];
459
465
  }
460
- const t30 = files.dropTarget;
461
- let t31;
462
- if ($[87] !== chatId || $[88] !== focused || $[89] !== host.ComposerHeaderSlot || $[90] !== scope.id || $[91] !== writable) {
463
- t31 = host.ComposerHeaderSlot && /*#__PURE__*/_jsx(host.ComposerHeaderSlot, {
466
+ const t31 = files.dropTarget;
467
+ let t32;
468
+ if ($[89] !== chatId || $[90] !== focused || $[91] !== host.ComposerHeaderSlot || $[92] !== scope.id || $[93] !== writable) {
469
+ t32 = host.ComposerHeaderSlot && /*#__PURE__*/_jsx(host.ComposerHeaderSlot, {
464
470
  scopeId: scope.id,
465
471
  chatId: chatId,
466
472
  disabled: !writable,
467
473
  focused: focused
468
474
  });
469
- $[87] = chatId;
470
- $[88] = focused;
471
- $[89] = host.ComposerHeaderSlot;
472
- $[90] = scope.id;
473
- $[91] = writable;
474
- $[92] = t31;
475
+ $[89] = chatId;
476
+ $[90] = focused;
477
+ $[91] = host.ComposerHeaderSlot;
478
+ $[92] = scope.id;
479
+ $[93] = writable;
480
+ $[94] = t32;
475
481
  } else {
476
- t31 = $[92];
482
+ t32 = $[94];
477
483
  }
478
484
  const T0 = PromptComposer;
479
- const t32 = !empty;
480
- const t33 = capabilities?.denyReason === true;
481
- let t34;
482
- if ($[93] === Symbol.for("react.memo_cache_sentinel")) {
483
- t34 = () => inputRef.current?.focus();
484
- $[93] = t34;
485
+ const t33 = !empty;
486
+ const t34 = capabilities?.denyReason === true;
487
+ let t35;
488
+ if ($[95] === Symbol.for("react.memo_cache_sentinel")) {
489
+ t35 = () => inputRef.current?.focus();
490
+ $[95] = t35;
485
491
  } else {
486
- t34 = $[93];
492
+ t35 = $[95];
487
493
  }
488
- const t35 = writable && "data-[text-cursor]:cursor-text";
489
- let t36;
490
- if ($[94] !== t35) {
491
- t36 = clsx(t35);
492
- $[94] = t35;
493
- $[95] = t36;
494
+ const t36 = writable && "data-[text-cursor]:cursor-text";
495
+ let t37;
496
+ if ($[96] !== t36) {
497
+ t37 = clsx(t36);
498
+ $[96] = t36;
499
+ $[97] = t37;
494
500
  } else {
495
- t36 = $[95];
501
+ t37 = $[97];
496
502
  }
497
- let t37;
498
- if ($[96] !== chatId || $[97] !== info) {
499
- t37 = /*#__PURE__*/_jsx(LimitDock, {
503
+ let t38;
504
+ if ($[98] !== chatId || $[99] !== info) {
505
+ t38 = /*#__PURE__*/_jsx(LimitDock, {
500
506
  chatId: chatId,
501
507
  info: info
502
508
  });
503
- $[96] = chatId;
504
- $[97] = info;
505
- $[98] = t37;
509
+ $[98] = chatId;
510
+ $[99] = info;
511
+ $[100] = t38;
506
512
  } else {
507
- t37 = $[98];
513
+ t38 = $[100];
508
514
  }
509
- const t38 = capabilities?.goals;
510
- let t39;
511
- if ($[99] !== chatId || $[100] !== info || $[101] !== t38) {
512
- t39 = /*#__PURE__*/_jsx(GoalDock, {
515
+ const t39 = capabilities?.goals;
516
+ let t40;
517
+ if ($[101] !== chatId || $[102] !== info || $[103] !== t39) {
518
+ t40 = /*#__PURE__*/_jsx(GoalDock, {
513
519
  chatId: chatId,
514
520
  info: info,
515
- goals: t38
521
+ goals: t39
516
522
  });
517
- $[99] = chatId;
518
- $[100] = info;
519
- $[101] = t38;
520
- $[102] = t39;
523
+ $[101] = chatId;
524
+ $[102] = info;
525
+ $[103] = t39;
526
+ $[104] = t40;
521
527
  } else {
522
- t39 = $[102];
528
+ t40 = $[104];
523
529
  }
524
- let t40;
525
- if ($[103] !== chatId || $[104] !== compactionOffer || $[105] !== controls.compact || $[106] !== scope) {
526
- t40 = compactionOffer && /*#__PURE__*/_jsx(ResumeCompactionDock, {
530
+ let t41;
531
+ if ($[105] !== chatId || $[106] !== compactionOffer || $[107] !== controls.compact || $[108] !== scope) {
532
+ t41 = compactionOffer && /*#__PURE__*/_jsx(ResumeCompactionDock, {
527
533
  tokens: compactionOffer.tokens,
528
534
  reason: compactionOffer.reason,
529
535
  onCompact: controls.compact,
530
536
  onDismiss: () => dismissResumeCompaction(scope, chatId, compactionOffer.turnId)
531
537
  });
532
- $[103] = chatId;
533
- $[104] = compactionOffer;
534
- $[105] = controls.compact;
535
- $[106] = scope;
536
- $[107] = t40;
538
+ $[105] = chatId;
539
+ $[106] = compactionOffer;
540
+ $[107] = controls.compact;
541
+ $[108] = scope;
542
+ $[109] = t41;
537
543
  } else {
538
- t40 = $[107];
544
+ t41 = $[109];
539
545
  }
540
- let t41;
541
- if ($[108] !== menus) {
542
- t41 = /*#__PURE__*/_jsx(ComposerMenu, {
546
+ let t42;
547
+ if ($[110] !== menus) {
548
+ t42 = /*#__PURE__*/_jsx(ComposerMenu, {
543
549
  menus: menus
544
550
  });
545
- $[108] = menus;
546
- $[109] = t41;
551
+ $[110] = menus;
552
+ $[111] = t42;
547
553
  } else {
548
- t41 = $[109];
554
+ t42 = $[111];
549
555
  }
550
- let t42;
551
- if ($[110] !== chatId || $[111] !== info.queuePaused || $[112] !== queue || $[113] !== takeBack || $[114] !== takingBack) {
552
- t42 = queue.length > 0 && /*#__PURE__*/_jsx(QueuedMessages, {
556
+ let t43;
557
+ if ($[112] !== chatId || $[113] !== info.queuePaused || $[114] !== queue || $[115] !== takeBack || $[116] !== takingBack) {
558
+ t43 = queue.length > 0 && /*#__PURE__*/_jsx(QueuedMessages, {
553
559
  chatId: chatId,
554
560
  queue: queue,
555
561
  paused: info.queuePaused === true,
556
562
  takingBack: takingBack !== null,
557
563
  onEdit: message => void takeBack(message)
558
564
  });
559
- $[110] = chatId;
560
- $[111] = info.queuePaused;
561
- $[112] = queue;
562
- $[113] = takeBack;
563
- $[114] = takingBack;
564
- $[115] = t42;
565
+ $[112] = chatId;
566
+ $[113] = info.queuePaused;
567
+ $[114] = queue;
568
+ $[115] = takeBack;
569
+ $[116] = takingBack;
570
+ $[117] = t43;
565
571
  } else {
566
- t42 = $[115];
572
+ t43 = $[117];
567
573
  }
568
- let t43;
569
- if ($[116] !== box.removeQuote || $[117] !== chatId || $[118] !== draft.quote || $[119] !== draft.quoteSource || $[120] !== notice || $[121] !== t) {
570
- t43 = draft.quote !== "" && /*#__PURE__*/_jsx(DraftQuote, {
574
+ let t44;
575
+ if ($[118] !== box.removeQuote || $[119] !== chatId || $[120] !== draft.quote || $[121] !== draft.quoteSource || $[122] !== notice || $[123] !== t) {
576
+ t44 = draft.quote !== "" && /*#__PURE__*/_jsx(DraftQuote, {
571
577
  chatId: chatId,
572
578
  quote: draft.quote,
573
579
  source: draft.quoteSource,
574
580
  onRemove: box.removeQuote,
575
581
  onSourceGone: () => notice.setNotice(t("rows.user.quoteGone"), "info")
576
582
  });
577
- $[116] = box.removeQuote;
578
- $[117] = chatId;
579
- $[118] = draft.quote;
580
- $[119] = draft.quoteSource;
581
- $[120] = notice;
582
- $[121] = t;
583
- $[122] = t43;
584
- } else {
585
- t43 = $[122];
586
- }
587
- let t44;
588
- if ($[123] !== box.removeAttachment || $[124] !== draft.attachments) {
589
- t44 = draft.attachments.length > 0 && /*#__PURE__*/_jsx(DraftAttachments, {
583
+ $[118] = box.removeQuote;
584
+ $[119] = chatId;
585
+ $[120] = draft.quote;
586
+ $[121] = draft.quoteSource;
587
+ $[122] = notice;
588
+ $[123] = t;
589
+ $[124] = t44;
590
+ } else {
591
+ t44 = $[124];
592
+ }
593
+ let t45;
594
+ if ($[125] !== box.removeAttachment || $[126] !== draft.attachments) {
595
+ t45 = draft.attachments.length > 0 && /*#__PURE__*/_jsx(DraftAttachments, {
590
596
  attachments: draft.attachments,
591
597
  onRemove: box.removeAttachment
592
598
  });
593
- $[123] = box.removeAttachment;
594
- $[124] = draft.attachments;
595
- $[125] = t44;
599
+ $[125] = box.removeAttachment;
600
+ $[126] = draft.attachments;
601
+ $[127] = t45;
596
602
  } else {
597
- t44 = $[125];
603
+ t45 = $[127];
598
604
  }
599
- const t45 = !writable;
600
- let t46;
601
- if ($[126] !== box || $[127] !== history || $[128] !== hold || $[129] !== menus) {
602
- t46 = (value, selection, state) => {
605
+ const t46 = !writable;
606
+ let t47;
607
+ if ($[128] !== box || $[129] !== history || $[130] !== hold || $[131] !== menus) {
608
+ t47 = (value, selection, state) => {
603
609
  hold.noteInput();
604
610
  box.setText(value);
605
611
  menus.setMenuIndex(0);
606
612
  menus.trackTriggers(value, selection, state);
607
613
  history.edited(value);
608
614
  };
609
- $[126] = box;
610
- $[127] = history;
611
- $[128] = hold;
612
- $[129] = menus;
613
- $[130] = t46;
615
+ $[128] = box;
616
+ $[129] = history;
617
+ $[130] = hold;
618
+ $[131] = menus;
619
+ $[132] = t47;
614
620
  } else {
615
- t46 = $[130];
621
+ t47 = $[132];
616
622
  }
617
- let t47;
618
- if ($[131] !== hold || $[132] !== menus) {
619
- t47 = () => {
623
+ let t48;
624
+ if ($[133] !== hold || $[134] !== menus) {
625
+ t48 = () => {
620
626
  menus.close();
621
627
  hold.release("blur");
622
628
  };
623
- $[131] = hold;
624
- $[132] = menus;
625
- $[133] = t47;
629
+ $[133] = hold;
630
+ $[134] = menus;
631
+ $[135] = t48;
626
632
  } else {
627
- t47 = $[133];
633
+ t48 = $[135];
628
634
  }
629
- let t48;
630
- if ($[134] !== dictationToolbar || $[135] !== draft.text || $[136] !== editorExtensions || $[137] !== files.onCopy || $[138] !== files.onPaste || $[139] !== focused || $[140] !== hold.setComposing || $[141] !== menus.inputAria || $[142] !== menus.trackTriggers || $[143] !== onKeyDown || $[144] !== placeholder || $[145] !== t45 || $[146] !== t46 || $[147] !== t47) {
631
- t48 = /*#__PURE__*/_jsx(ComposerInput, {
635
+ let t49;
636
+ if ($[136] !== dictationToolbar || $[137] !== draft.text || $[138] !== editorExtensions || $[139] !== files.onCopy || $[140] !== files.onPaste || $[141] !== focused || $[142] !== hold.setComposing || $[143] !== menus.inputAria || $[144] !== menus.trackTriggers || $[145] !== onKeyDown || $[146] !== placeholder || $[147] !== t46 || $[148] !== t47 || $[149] !== t48) {
637
+ t49 = /*#__PURE__*/_jsx(ComposerInput, {
632
638
  ref: inputRef,
633
639
  dictationToolbar: dictationToolbar,
634
640
  className: "composer-input select-text text-sm leading-normal text-text",
635
641
  value: draft.text,
636
642
  placeholder: placeholder,
637
- disabled: t45,
643
+ disabled: t46,
638
644
  tabbable: focused,
639
645
  extensions: editorExtensions,
640
646
  aria: menus.inputAria,
641
- onChange: t46,
647
+ onChange: t47,
642
648
  onSelectionChange: menus.trackTriggers,
643
- onBlur: t47,
649
+ onBlur: t48,
644
650
  onComposing: hold.setComposing,
645
651
  onKeyDown: onKeyDown,
646
652
  onPaste: files.onPaste,
647
653
  onCopy: files.onCopy
648
654
  });
649
- $[134] = dictationToolbar;
650
- $[135] = draft.text;
651
- $[136] = editorExtensions;
652
- $[137] = files.onCopy;
653
- $[138] = files.onPaste;
654
- $[139] = focused;
655
- $[140] = hold.setComposing;
656
- $[141] = menus.inputAria;
657
- $[142] = menus.trackTriggers;
658
- $[143] = onKeyDown;
659
- $[144] = placeholder;
660
- $[145] = t45;
661
- $[146] = t46;
662
- $[147] = t47;
663
- $[148] = t48;
664
- } else {
665
- t48 = $[148];
666
- }
667
- let t49;
668
- if ($[149] !== notice.notice || $[150] !== notice.tone) {
669
- t49 = notice.notice && /*#__PURE__*/_jsx("div", {
655
+ $[136] = dictationToolbar;
656
+ $[137] = draft.text;
657
+ $[138] = editorExtensions;
658
+ $[139] = files.onCopy;
659
+ $[140] = files.onPaste;
660
+ $[141] = focused;
661
+ $[142] = hold.setComposing;
662
+ $[143] = menus.inputAria;
663
+ $[144] = menus.trackTriggers;
664
+ $[145] = onKeyDown;
665
+ $[146] = placeholder;
666
+ $[147] = t46;
667
+ $[148] = t47;
668
+ $[149] = t48;
669
+ $[150] = t49;
670
+ } else {
671
+ t49 = $[150];
672
+ }
673
+ let t50;
674
+ if ($[151] !== notice.notice || $[152] !== notice.tone) {
675
+ t50 = notice.notice && /*#__PURE__*/_jsx("div", {
670
676
  className: clsx("px-5 pb-1 text-xs @max-md/composer:px-3.5", notice.tone === "error" ? "text-status-error" : "text-text-muted"),
671
677
  role: notice.tone === "error" ? "alert" : "status",
672
678
  children: notice.notice
673
679
  });
674
- $[149] = notice.notice;
675
- $[150] = notice.tone;
676
- $[151] = t49;
680
+ $[151] = notice.notice;
681
+ $[152] = notice.tone;
682
+ $[153] = t50;
677
683
  } else {
678
- t49 = $[151];
684
+ t50 = $[153];
679
685
  }
680
- const t50 = guard.visible && /*#__PURE__*/_jsxs("div", {
686
+ const t51 = guard.visible && /*#__PURE__*/_jsxs("div", {
681
687
  className: clsx("px-5 pb-1 text-right text-xs tabular-nums @max-md/composer:px-3.5", guard.tooLong ? "text-status-error" : "text-text-faint"),
682
688
  children: [formatNumber(guard.count), " / ", formatNumber(PROMPT_MAX_CHARS), guard.tooLong && ` ${t("composer.tooLong")}`]
683
689
  });
684
690
  const T1 = ComposerControls;
685
- const t51 = capabilities?.attachments !== false;
686
- const t52 = !busy || !empty;
687
- const t53 = empty || !writable || guard.tooLong;
688
- const t54 = t(sendLabelKey(busy, steerable, sendDelivery));
689
- let t55;
690
- if ($[152] !== draft.text || $[153] !== sendKey) {
691
- t55 = sendShortcut(sendKey, draft.text.includes("\n"));
692
- $[152] = draft.text;
693
- $[153] = sendKey;
694
- $[154] = t55;
695
- } else {
696
- t55 = $[154];
697
- }
691
+ const t52 = capabilities?.attachments !== false;
692
+ const t53 = !busy || !empty;
693
+ const t54 = empty || !writable || guard.tooLong;
694
+ const t55 = t(sendLabelKey(busy, steerable, sendDelivery));
698
695
  let t56;
699
- if ($[155] !== submit) {
700
- t56 = alternate => submit(alternate ? "alternate" : "default");
701
- $[155] = submit;
696
+ if ($[154] !== draft.text || $[155] !== sendKey) {
697
+ t56 = sendShortcut(sendKey, draft.text.includes("\n"));
698
+ $[154] = draft.text;
699
+ $[155] = sendKey;
702
700
  $[156] = t56;
703
701
  } else {
704
702
  t56 = $[156];
705
703
  }
706
- const t57 = continuable !== null && continuable !== sentFor && empty && writable && pending.length === 0 && extraPrompts.length === 0 ? continueTurn : null;
707
- const t58 = scope.id;
708
- let t59;
709
- if ($[157] !== draft.quote || $[158] !== draft.text) {
710
- t59 = withQuote(draft.quote, draft.text.trim());
711
- $[157] = draft.quote;
712
- $[158] = draft.text;
713
- $[159] = t59;
704
+ let t57;
705
+ if ($[157] !== submit) {
706
+ t57 = alternate => submit(alternate ? "alternate" : "default");
707
+ $[157] = submit;
708
+ $[158] = t57;
714
709
  } else {
715
- t59 = $[159];
710
+ t57 = $[158];
716
711
  }
712
+ const t58 = continuable !== null && continuable !== sentFor && empty && writable && pending.length === 0 && extraPrompts.length === 0 ? continueTurn : null;
713
+ const t59 = scope.id;
717
714
  let t60;
718
- if ($[160] !== chatId || $[161] !== info.provider || $[162] !== info.runtimeMode || $[163] !== info.selection || $[164] !== scope.id || $[165] !== t59) {
719
- t60 = {
720
- scopeId: t58,
715
+ if ($[159] !== draft.quote || $[160] !== draft.text) {
716
+ t60 = withQuote(draft.quote, draft.text.trim());
717
+ $[159] = draft.quote;
718
+ $[160] = draft.text;
719
+ $[161] = t60;
720
+ } else {
721
+ t60 = $[161];
722
+ }
723
+ let t61;
724
+ if ($[162] !== chatId || $[163] !== info.provider || $[164] !== info.runtimeMode || $[165] !== info.selection || $[166] !== scope.id || $[167] !== t60) {
725
+ t61 = {
726
+ scopeId: t59,
721
727
  chatId,
722
- text: t59,
728
+ text: t60,
723
729
  provider: info.provider,
724
730
  selection: info.selection,
725
731
  runtimeMode: info.runtimeMode
726
732
  };
727
- $[160] = chatId;
728
- $[161] = info.provider;
729
- $[162] = info.runtimeMode;
730
- $[163] = info.selection;
731
- $[164] = scope.id;
732
- $[165] = t59;
733
- $[166] = t60;
733
+ $[162] = chatId;
734
+ $[163] = info.provider;
735
+ $[164] = info.runtimeMode;
736
+ $[165] = info.selection;
737
+ $[166] = scope.id;
738
+ $[167] = t60;
739
+ $[168] = t61;
734
740
  } else {
735
- t60 = $[166];
741
+ t61 = $[168];
736
742
  }
737
- let t61;
738
- if ($[167] !== sendActions || $[168] !== t52 || $[169] !== t53 || $[170] !== t54 || $[171] !== t55 || $[172] !== t56 || $[173] !== t57 || $[174] !== t60) {
739
- t61 = {
740
- visible: t52,
741
- disabled: t53,
742
- label: t54,
743
- kbd: t55,
744
- onSend: t56,
745
- onContinue: t57,
743
+ let t62;
744
+ if ($[169] !== sendActions || $[170] !== t53 || $[171] !== t54 || $[172] !== t55 || $[173] !== t56 || $[174] !== t57 || $[175] !== t58 || $[176] !== t61) {
745
+ t62 = {
746
+ visible: t53,
747
+ disabled: t54,
748
+ label: t55,
749
+ kbd: t56,
750
+ onSend: t57,
751
+ onContinue: t58,
746
752
  actions: sendActions,
747
- draft: t60
753
+ draft: t61
748
754
  };
749
- $[167] = sendActions;
750
- $[168] = t52;
751
- $[169] = t53;
752
- $[170] = t54;
753
- $[171] = t55;
754
- $[172] = t56;
755
- $[173] = t57;
756
- $[174] = t60;
757
- $[175] = t61;
758
- } else {
759
- t61 = $[175];
755
+ $[169] = sendActions;
756
+ $[170] = t53;
757
+ $[171] = t54;
758
+ $[172] = t55;
759
+ $[173] = t56;
760
+ $[174] = t57;
761
+ $[175] = t58;
762
+ $[176] = t61;
763
+ $[177] = t62;
764
+ } else {
765
+ t62 = $[177];
760
766
  }
761
- let t62;
762
- if ($[176] !== files) {
763
- t62 = picked => {
767
+ let t63;
768
+ if ($[178] !== files) {
769
+ t63 = picked => {
764
770
  files.addFiles(picked);
765
771
  inputRef.current?.focus();
766
772
  };
767
- $[176] = files;
768
- $[177] = t62;
773
+ $[178] = files;
774
+ $[179] = t63;
769
775
  } else {
770
- t62 = $[177];
776
+ t63 = $[179];
771
777
  }
772
- let t63;
773
- if ($[178] !== writable) {
774
- t63 = added => {
778
+ let t64;
779
+ if ($[180] !== writable) {
780
+ t64 = added => {
775
781
  if (writable) {
776
782
  inputRef.current?.insert(added);
777
783
  }
778
784
  };
779
- $[178] = writable;
780
- $[179] = t63;
785
+ $[180] = writable;
786
+ $[181] = t64;
781
787
  } else {
782
- t63 = $[179];
788
+ t64 = $[181];
783
789
  }
784
- let t64;
785
- if ($[180] !== T1 || $[181] !== chatId || $[182] !== controls || $[183] !== info || $[184] !== providerFixed || $[185] !== restoreStashed || $[186] !== setDictationToolbar || $[187] !== t51 || $[188] !== t61 || $[189] !== t62 || $[190] !== t63 || $[191] !== writable) {
786
- t64 = /*#__PURE__*/_jsx(T1, {
790
+ let t65;
791
+ if ($[182] !== T1 || $[183] !== chatId || $[184] !== controls || $[185] !== info || $[186] !== providerFixed || $[187] !== restoreStashed || $[188] !== setDictationToolbar || $[189] !== t52 || $[190] !== t62 || $[191] !== t63 || $[192] !== t64 || $[193] !== writable) {
792
+ t65 = /*#__PURE__*/_jsx(T1, {
787
793
  chatId: chatId,
788
794
  info: info,
789
795
  providerFixed: providerFixed,
790
796
  writable: writable,
791
- attachable: t51,
797
+ attachable: t52,
792
798
  controls: controls,
793
- send: t61,
799
+ send: t62,
794
800
  dictationToolbar: setDictationToolbar,
795
- onFiles: t62,
801
+ onFiles: t63,
796
802
  onRestore: restoreStashed,
797
- insert: t63
803
+ insert: t64
798
804
  });
799
- $[180] = T1;
800
- $[181] = chatId;
801
- $[182] = controls;
802
- $[183] = info;
803
- $[184] = providerFixed;
804
- $[185] = restoreStashed;
805
- $[186] = setDictationToolbar;
806
- $[187] = t51;
807
- $[188] = t61;
808
- $[189] = t62;
809
- $[190] = t63;
810
- $[191] = writable;
805
+ $[182] = T1;
806
+ $[183] = chatId;
807
+ $[184] = controls;
808
+ $[185] = info;
809
+ $[186] = providerFixed;
810
+ $[187] = restoreStashed;
811
+ $[188] = setDictationToolbar;
812
+ $[189] = t52;
813
+ $[190] = t62;
814
+ $[191] = t63;
811
815
  $[192] = t64;
816
+ $[193] = writable;
817
+ $[194] = t65;
812
818
  } else {
813
- t64 = $[192];
819
+ t65 = $[194];
814
820
  }
815
- let t65;
816
- if ($[193] !== pointSurface || $[194] !== pressSurface || $[195] !== t36 || $[196] !== t37 || $[197] !== t39 || $[198] !== t40 || $[199] !== t41 || $[200] !== t42 || $[201] !== t43 || $[202] !== t44 || $[203] !== t48 || $[204] !== t49 || $[205] !== t50 || $[206] !== t64) {
817
- t65 = /*#__PURE__*/_jsxs("div", {
818
- className: t36,
821
+ let t66;
822
+ if ($[195] !== pointSurface || $[196] !== pressSurface || $[197] !== t37 || $[198] !== t38 || $[199] !== t40 || $[200] !== t41 || $[201] !== t42 || $[202] !== t43 || $[203] !== t44 || $[204] !== t45 || $[205] !== t49 || $[206] !== t50 || $[207] !== t51 || $[208] !== t65) {
823
+ t66 = /*#__PURE__*/_jsxs("div", {
824
+ className: t37,
819
825
  onPointerOver: pointSurface,
820
826
  onMouseDown: pressSurface,
821
- children: [t37, t39, t40, t41, t42, t43, t44, t48, t49, t50, t64]
827
+ children: [t38, t40, t41, t42, t43, t44, t45, t49, t50, t51, t65]
822
828
  });
823
- $[193] = pointSurface;
824
- $[194] = pressSurface;
825
- $[195] = t36;
826
- $[196] = t37;
827
- $[197] = t39;
828
- $[198] = t40;
829
- $[199] = t41;
830
- $[200] = t42;
831
- $[201] = t43;
832
- $[202] = t44;
833
- $[203] = t48;
834
- $[204] = t49;
835
- $[205] = t50;
836
- $[206] = t64;
837
- $[207] = t65;
838
- } else {
839
- t65 = $[207];
829
+ $[195] = pointSurface;
830
+ $[196] = pressSurface;
831
+ $[197] = t37;
832
+ $[198] = t38;
833
+ $[199] = t40;
834
+ $[200] = t41;
835
+ $[201] = t42;
836
+ $[202] = t43;
837
+ $[203] = t44;
838
+ $[204] = t45;
839
+ $[205] = t49;
840
+ $[206] = t50;
841
+ $[207] = t51;
842
+ $[208] = t65;
843
+ $[209] = t66;
844
+ } else {
845
+ t66 = $[209];
840
846
  }
841
- let t66;
842
- if ($[208] !== T0 || $[209] !== answerPromptsElsewhere || $[210] !== chatId || $[211] !== disabled || $[212] !== focused || $[213] !== hold || $[214] !== pending || $[215] !== t32 || $[216] !== t33 || $[217] !== t34 || $[218] !== t65) {
843
- t66 = /*#__PURE__*/_jsx(T0, {
847
+ let t67;
848
+ if ($[210] !== T0 || $[211] !== answerPromptsElsewhere || $[212] !== chatId || $[213] !== disabled || $[214] !== focused || $[215] !== hold || $[216] !== pending || $[217] !== t33 || $[218] !== t34 || $[219] !== t35 || $[220] !== t66) {
849
+ t67 = /*#__PURE__*/_jsx(T0, {
844
850
  chatId: chatId,
845
851
  pending: pending,
846
852
  focused: focused,
847
853
  onShowElsewhere: answerPromptsElsewhere,
848
854
  disabled: disabled,
849
- hasDraft: t32,
850
- denyReason: t33,
851
- onAllAnswered: t34,
855
+ hasDraft: t33,
856
+ denyReason: t34,
857
+ onAllAnswered: t35,
852
858
  hold: hold,
853
- children: t65
859
+ children: t66
854
860
  });
855
- $[208] = T0;
856
- $[209] = answerPromptsElsewhere;
857
- $[210] = chatId;
858
- $[211] = disabled;
859
- $[212] = focused;
860
- $[213] = hold;
861
- $[214] = pending;
862
- $[215] = t32;
863
- $[216] = t33;
864
- $[217] = t34;
865
- $[218] = t65;
866
- $[219] = t66;
867
- } else {
868
- t66 = $[219];
869
- }
870
- let t67;
871
- if ($[220] !== files.dropTarget || $[221] !== t29 || $[222] !== t31 || $[223] !== t66) {
872
- t67 = /*#__PURE__*/_jsxs("div", {
873
- className: t29,
874
- ...t30,
875
- children: [t31, t66]
861
+ $[210] = T0;
862
+ $[211] = answerPromptsElsewhere;
863
+ $[212] = chatId;
864
+ $[213] = disabled;
865
+ $[214] = focused;
866
+ $[215] = hold;
867
+ $[216] = pending;
868
+ $[217] = t33;
869
+ $[218] = t34;
870
+ $[219] = t35;
871
+ $[220] = t66;
872
+ $[221] = t67;
873
+ } else {
874
+ t67 = $[221];
875
+ }
876
+ let t68;
877
+ if ($[222] !== files.dropTarget || $[223] !== t30 || $[224] !== t32 || $[225] !== t67) {
878
+ t68 = /*#__PURE__*/_jsxs("div", {
879
+ className: t30,
880
+ ...t31,
881
+ children: [t32, t67]
876
882
  });
877
- $[220] = files.dropTarget;
878
- $[221] = t29;
879
- $[222] = t31;
880
- $[223] = t66;
881
- $[224] = t67;
883
+ $[222] = files.dropTarget;
884
+ $[223] = t30;
885
+ $[224] = t32;
886
+ $[225] = t67;
887
+ $[226] = t68;
882
888
  } else {
883
- t67 = $[224];
884
- }
885
- const t68 = controls.confirmClear;
886
- let t69;
887
- if ($[225] !== t) {
888
- t69 = t("composer.clear.title");
889
- $[225] = t;
890
- $[226] = t69;
891
- } else {
892
- t69 = $[226];
889
+ t68 = $[226];
893
890
  }
891
+ const t69 = controls.confirmClear;
894
892
  let t70;
895
893
  if ($[227] !== t) {
896
- t70 = t("composer.clear.description");
894
+ t70 = t("composer.clear.title");
897
895
  $[227] = t;
898
896
  $[228] = t70;
899
897
  } else {
@@ -901,7 +899,7 @@ export function Composer(t0) {
901
899
  }
902
900
  let t71;
903
901
  if ($[229] !== t) {
904
- t71 = t("composer.clear.confirm");
902
+ t71 = t("composer.clear.description");
905
903
  $[229] = t;
906
904
  $[230] = t71;
907
905
  } else {
@@ -909,50 +907,58 @@ export function Composer(t0) {
909
907
  }
910
908
  let t72;
911
909
  if ($[231] !== t) {
912
- t72 = t("composer.notice.clearFailed");
910
+ t72 = t("composer.clear.confirm");
913
911
  $[231] = t;
914
912
  $[232] = t72;
915
913
  } else {
916
914
  t72 = $[232];
917
915
  }
918
916
  let t73;
919
- if ($[233] !== controls.cancelClear || $[234] !== controls.confirmClear || $[235] !== controls.forceClearThread || $[236] !== t69 || $[237] !== t70 || $[238] !== t71 || $[239] !== t72) {
920
- t73 = /*#__PURE__*/_jsx(PromptDialog, {
921
- open: t68,
922
- title: t69,
923
- description: t70,
924
- confirmLabel: t71,
917
+ if ($[233] !== t) {
918
+ t73 = t("composer.notice.clearFailed");
919
+ $[233] = t;
920
+ $[234] = t73;
921
+ } else {
922
+ t73 = $[234];
923
+ }
924
+ let t74;
925
+ if ($[235] !== controls.cancelClear || $[236] !== controls.confirmClear || $[237] !== controls.forceClearThread || $[238] !== t70 || $[239] !== t71 || $[240] !== t72 || $[241] !== t73) {
926
+ t74 = /*#__PURE__*/_jsx(PromptDialog, {
927
+ open: t69,
928
+ title: t70,
929
+ description: t71,
930
+ confirmLabel: t72,
925
931
  danger: true,
926
- fallbackMessage: t72,
932
+ fallbackMessage: t73,
927
933
  onConfirm: controls.forceClearThread,
928
934
  onOpenChange: controls.cancelClear
929
935
  });
930
- $[233] = controls.cancelClear;
931
- $[234] = controls.confirmClear;
932
- $[235] = controls.forceClearThread;
933
- $[236] = t69;
934
- $[237] = t70;
935
- $[238] = t71;
936
- $[239] = t72;
937
- $[240] = t73;
938
- } else {
939
- t73 = $[240];
940
- }
941
- let t74;
942
- if ($[241] !== t26 || $[242] !== t27 || $[243] !== t67 || $[244] !== t73) {
943
- t74 = /*#__PURE__*/_jsxs("div", {
944
- className: t25,
945
- children: [t26, t27, t67, t73]
936
+ $[235] = controls.cancelClear;
937
+ $[236] = controls.confirmClear;
938
+ $[237] = controls.forceClearThread;
939
+ $[238] = t70;
940
+ $[239] = t71;
941
+ $[240] = t72;
942
+ $[241] = t73;
943
+ $[242] = t74;
944
+ } else {
945
+ t74 = $[242];
946
+ }
947
+ let t75;
948
+ if ($[243] !== t27 || $[244] !== t28 || $[245] !== t68 || $[246] !== t74) {
949
+ t75 = /*#__PURE__*/_jsxs("div", {
950
+ className: t26,
951
+ children: [t27, t28, t68, t74]
946
952
  });
947
- $[241] = t26;
948
- $[242] = t27;
949
- $[243] = t67;
950
- $[244] = t73;
951
- $[245] = t74;
953
+ $[243] = t27;
954
+ $[244] = t28;
955
+ $[245] = t68;
956
+ $[246] = t74;
957
+ $[247] = t75;
952
958
  } else {
953
- t74 = $[245];
959
+ t75 = $[247];
954
960
  }
955
- return t74;
961
+ return t75;
956
962
  }
957
963
  function _temp4(event) {
958
964
  event.currentTarget.toggleAttribute("data-text-cursor", surfacePartOf(event.target, event.currentTarget) !== "action");