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