@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.
- package/dist/chat/chat-client.d.ts +1 -0
- package/dist/chat/chat-client.js +2 -1
- package/dist/chat/chat-references.d.ts +16 -1
- package/dist/chat/chat-references.js +29 -3
- package/dist/chat/drafts.d.ts +2 -0
- package/dist/chat/drafts.js +21 -5
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/logic/visual-height.d.ts +1 -0
- package/dist/chat/logic/visual-height.js +1 -1
- package/dist/chat/mentions.d.ts +31 -14
- package/dist/chat/mentions.js +186 -41
- package/dist/chat/stash.d.ts +1 -0
- package/dist/chat/stash.js +4 -2
- package/dist/chat/ui/Composer.js +438 -429
- package/dist/chat/ui/ComposerInput.d.ts +1 -0
- package/dist/chat/ui/ComposerInput.js +2 -0
- package/dist/chat/ui/HostMenuItems.d.ts +4 -0
- package/dist/chat/ui/HostMenuItems.js +15 -0
- package/dist/chat/ui/Markdown.d.ts +3 -1
- package/dist/chat/ui/Markdown.js +194 -120
- package/dist/chat/ui/MessageActions.js +70 -66
- package/dist/chat/ui/ReferenceChip.d.ts +15 -0
- package/dist/chat/ui/ReferenceChip.js +255 -0
- package/dist/chat/ui/Timeline.js +52 -29
- package/dist/chat/ui/TimelineMenu.js +84 -78
- package/dist/chat/ui/VisualFrame.d.ts +8 -0
- package/dist/chat/ui/VisualFrame.js +217 -115
- package/dist/chat/ui/chip-clipboard.d.ts +9 -0
- package/dist/chat/ui/chip-clipboard.js +105 -0
- package/dist/chat/ui/chips.d.ts +5 -0
- package/dist/chat/ui/chips.js +15 -1
- package/dist/chat/ui/composer/ComposerMenu.js +140 -79
- package/dist/chat/ui/composer/DraftParts.d.ts +0 -4
- package/dist/chat/ui/composer/DraftParts.js +0 -41
- package/dist/chat/ui/composer/chip-paste.d.ts +15 -0
- package/dist/chat/ui/composer/chip-paste.js +104 -0
- package/dist/chat/ui/composer/chips.d.ts +5 -0
- package/dist/chat/ui/composer/chips.js +59 -9
- package/dist/chat/ui/composer/key-handler.js +9 -0
- package/dist/chat/ui/composer/use-composer-draft.d.ts +0 -1
- package/dist/chat/ui/composer/use-composer-draft.js +2 -10
- package/dist/chat/ui/composer/use-composer-menus.d.ts +12 -2
- package/dist/chat/ui/composer/use-composer-menus.js +192 -149
- package/dist/chat/ui/composer/use-composer-submit.js +17 -12
- package/dist/chat/ui/composer/use-draft-files.d.ts +7 -1
- package/dist/chat/ui/composer/use-draft-files.js +90 -58
- package/dist/chat/ui/composer/use-take-back.js +2 -1
- package/dist/chat/ui/index.d.ts +1 -1
- package/dist/chat/ui/index.js +1 -1
- package/dist/chat/ui/reference-icons.d.ts +3 -0
- package/dist/chat/ui/reference-icons.js +15 -0
- package/dist/chat/ui/reference-lookup.d.ts +7 -0
- package/dist/chat/ui/reference-lookup.js +6 -0
- package/dist/chat/ui/rehype-chips.d.ts +8 -1
- package/dist/chat/ui/rehype-chips.js +35 -11
- package/dist/chat/ui/rows/GeneratedImageRow.js +8 -4
- package/dist/chat/ui/rows/MessageRows.js +218 -158
- package/dist/chat/ui/rows/VisualRow.js +184 -142
- package/dist/chat/ui/rows/row-rhythm.js +6 -4
- package/dist/chat/ui/thread-references.d.ts +4 -0
- package/dist/chat/ui/thread-references.js +78 -0
- package/dist/host-hooks.d.ts +2 -0
- package/dist/host-hooks.js +7 -0
- package/dist/host.d.ts +14 -1
- package/dist/index.d.ts +1 -1
- package/dist/locales/en/agent-chat.d.ts +20 -3
- package/dist/locales/en/agent-chat.js +24 -7
- package/dist/locales/nl/agent-chat.d.ts +20 -3
- package/dist/locales/nl/agent-chat.js +24 -7
- package/package.json +8 -8
- package/src/chat/chat-client.ts +4 -1
- package/src/chat/chat-references.ts +44 -3
- package/src/chat/drafts.ts +24 -6
- package/src/chat/index.ts +1 -1
- package/src/chat/logic/visual-height.ts +1 -1
- package/src/chat/mentions.ts +202 -36
- package/src/chat/stash.ts +6 -2
- package/src/chat/ui/Composer.tsx +14 -4
- package/src/chat/ui/ComposerInput.tsx +4 -0
- package/src/chat/ui/HostMenuItems.tsx +11 -0
- package/src/chat/ui/Markdown.tsx +57 -25
- package/src/chat/ui/MessageActions.tsx +5 -2
- package/src/chat/ui/ReferenceChip.tsx +74 -0
- package/src/chat/ui/Timeline.tsx +24 -2
- package/src/chat/ui/TimelineMenu.tsx +7 -3
- package/src/chat/ui/VisualFrame.tsx +68 -21
- package/src/chat/ui/chip-clipboard.ts +115 -0
- package/src/chat/ui/chips.ts +20 -1
- package/src/chat/ui/composer/ComposerMenu.tsx +53 -37
- package/src/chat/ui/composer/DraftParts.tsx +0 -12
- package/src/chat/ui/composer/chip-paste.ts +122 -0
- package/src/chat/ui/composer/chips.ts +60 -10
- package/src/chat/ui/composer/key-handler.ts +9 -0
- package/src/chat/ui/composer/use-composer-draft.ts +1 -7
- package/src/chat/ui/composer/use-composer-menus.ts +68 -29
- package/src/chat/ui/composer/use-composer-submit.ts +13 -6
- package/src/chat/ui/composer/use-draft-files.ts +39 -5
- package/src/chat/ui/composer/use-take-back.ts +2 -1
- package/src/chat/ui/index.ts +1 -1
- package/src/chat/ui/reference-icons.ts +17 -0
- package/src/chat/ui/reference-lookup.ts +13 -0
- package/src/chat/ui/rehype-chips.ts +38 -13
- package/src/chat/ui/rows/GeneratedImageRow.tsx +9 -4
- package/src/chat/ui/rows/MessageRows.tsx +88 -64
- package/src/chat/ui/rows/VisualRow.tsx +5 -1
- package/src/chat/ui/rows/row-rhythm.ts +6 -4
- package/src/chat/ui/thread-references.ts +47 -0
- package/src/host-hooks.ts +9 -0
- package/src/host.ts +24 -1
- package/src/index.ts +1 -0
- package/src/locales/en/agent-chat.ts +24 -7
- package/src/locales/nl/agent-chat.ts +24 -7
- package/dist/chat/ui/ChatReferenceChip.d.ts +0 -4
- package/dist/chat/ui/ChatReferenceChip.js +0 -110
- package/src/chat/ui/ChatReferenceChip.tsx +0 -26
package/dist/chat/ui/Composer.js
CHANGED
|
@@ -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,
|
|
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(
|
|
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] !==
|
|
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
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
165
|
+
$[20] = chatId;
|
|
166
|
+
$[21] = info;
|
|
167
|
+
$[22] = notice;
|
|
168
|
+
$[23] = onRetarget;
|
|
169
|
+
$[24] = t8;
|
|
155
170
|
} else {
|
|
156
|
-
|
|
171
|
+
t8 = $[24];
|
|
157
172
|
}
|
|
158
|
-
const controls = useChatControls(
|
|
159
|
-
let
|
|
160
|
-
if ($[
|
|
161
|
-
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
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
|
-
|
|
181
|
+
t9 = $[27];
|
|
167
182
|
}
|
|
168
|
-
let
|
|
169
|
-
if ($[
|
|
170
|
-
|
|
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:
|
|
188
|
+
model: t9,
|
|
174
189
|
writable,
|
|
175
190
|
controls,
|
|
176
191
|
setNotice: notice.setNotice
|
|
177
192
|
};
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
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
|
-
|
|
201
|
+
t10 = $[34];
|
|
187
202
|
}
|
|
188
|
-
useEffortStepper(
|
|
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
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
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
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
223
|
+
$[35] = continuable;
|
|
224
|
+
$[36] = onSend;
|
|
225
|
+
$[37] = t11;
|
|
211
226
|
} else {
|
|
212
|
-
|
|
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:
|
|
247
|
+
onSend: t11
|
|
233
248
|
});
|
|
234
|
-
let
|
|
235
|
-
if ($[
|
|
236
|
-
|
|
249
|
+
let t12;
|
|
250
|
+
if ($[38] !== history) {
|
|
251
|
+
t12 = () => {
|
|
237
252
|
history.forget();
|
|
238
253
|
inputRef.current?.focus();
|
|
239
254
|
};
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
255
|
+
$[38] = history;
|
|
256
|
+
$[39] = t12;
|
|
242
257
|
} else {
|
|
243
|
-
|
|
258
|
+
t12 = $[39];
|
|
244
259
|
}
|
|
245
|
-
let
|
|
246
|
-
if ($[
|
|
247
|
-
|
|
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:
|
|
266
|
+
onTaken: t12
|
|
252
267
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
268
|
+
$[40] = box;
|
|
269
|
+
$[41] = chatId;
|
|
270
|
+
$[42] = notice.setNotice;
|
|
271
|
+
$[43] = t12;
|
|
272
|
+
$[44] = t13;
|
|
258
273
|
} else {
|
|
259
|
-
|
|
274
|
+
t13 = $[44];
|
|
260
275
|
}
|
|
261
276
|
const {
|
|
262
277
|
takingBack,
|
|
263
278
|
takeBack
|
|
264
|
-
} = useTakeBack(
|
|
279
|
+
} = useTakeBack(t13);
|
|
265
280
|
const pending = usePendingRequests(chatId);
|
|
266
281
|
const compactionOffer = useCompactionOffer(chatId, info, capabilities?.compaction);
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
if ($[
|
|
270
|
-
|
|
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:
|
|
289
|
+
mentionable: t14,
|
|
275
290
|
hasSkills: menus.hasSkills
|
|
276
291
|
};
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
292
|
+
$[45] = chatId;
|
|
293
|
+
$[46] = disabled;
|
|
294
|
+
$[47] = menus.hasSkills;
|
|
295
|
+
$[48] = readOnly;
|
|
296
|
+
$[49] = t14;
|
|
297
|
+
$[50] = t15;
|
|
283
298
|
} else {
|
|
284
|
-
|
|
299
|
+
t15 = $[50];
|
|
285
300
|
}
|
|
286
|
-
const placeholder = useHintedPlaceholder(
|
|
287
|
-
let
|
|
288
|
-
if ($[
|
|
289
|
-
|
|
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
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
309
|
+
$[51] = draft.mentions;
|
|
310
|
+
$[52] = draft.skills;
|
|
311
|
+
$[53] = menus.referenceChips;
|
|
312
|
+
$[54] = t16;
|
|
296
313
|
} else {
|
|
297
|
-
|
|
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 ($[
|
|
310
|
-
t17 =
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
317
|
+
if ($[55] !== t16) {
|
|
318
|
+
t17 = [t16, LEAVE_DROPS_TO_THE_CARD];
|
|
319
|
+
$[55] = t16;
|
|
320
|
+
$[56] = t17;
|
|
313
321
|
} else {
|
|
314
|
-
t17 = $[
|
|
322
|
+
t17 = $[56];
|
|
315
323
|
}
|
|
316
|
-
const
|
|
324
|
+
const editorExtensions = t17;
|
|
317
325
|
let t18;
|
|
318
|
-
if ($[
|
|
319
|
-
t18 =
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
326
|
+
if ($[57] !== chatId) {
|
|
327
|
+
t18 = () => timelineAtEnd(chatId);
|
|
328
|
+
$[57] = chatId;
|
|
329
|
+
$[58] = t18;
|
|
322
330
|
} else {
|
|
323
|
-
t18 = $[
|
|
331
|
+
t18 = $[58];
|
|
324
332
|
}
|
|
325
|
-
const
|
|
333
|
+
const atEnd = useSyncExternalStore(subscribeTimelineEnd, t18, _temp3);
|
|
326
334
|
let t19;
|
|
327
|
-
if ($[
|
|
328
|
-
t19 =
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
335
|
+
if ($[59] !== info.queue) {
|
|
336
|
+
t19 = info.queue ?? [];
|
|
337
|
+
$[59] = info.queue;
|
|
338
|
+
$[60] = t19;
|
|
331
339
|
} else {
|
|
332
|
-
t19 = $[
|
|
340
|
+
t19 = $[60];
|
|
333
341
|
}
|
|
334
|
-
const
|
|
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
|
-
|
|
338
|
-
|
|
353
|
+
let t22;
|
|
354
|
+
if ($[63] !== focused) {
|
|
355
|
+
t21 = () => {
|
|
339
356
|
if (focused) {
|
|
340
357
|
inputRef.current?.focus();
|
|
341
358
|
}
|
|
342
359
|
};
|
|
343
|
-
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
360
|
+
t22 = [focused];
|
|
361
|
+
$[63] = focused;
|
|
362
|
+
$[64] = t21;
|
|
363
|
+
$[65] = t22;
|
|
347
364
|
} else {
|
|
348
|
-
|
|
349
|
-
|
|
365
|
+
t21 = $[64];
|
|
366
|
+
t22 = $[65];
|
|
350
367
|
}
|
|
351
|
-
useEffect(
|
|
352
|
-
let
|
|
353
|
-
if ($[
|
|
354
|
-
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
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
|
-
|
|
375
|
+
t23 = $[67];
|
|
359
376
|
}
|
|
360
|
-
let
|
|
361
|
-
if ($[
|
|
362
|
-
|
|
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:
|
|
388
|
+
setText: t23,
|
|
372
389
|
submit
|
|
373
390
|
});
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else {
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
const onKeyDown =
|
|
389
|
-
const pointSurface =
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
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
|
-
$[
|
|
400
|
-
$[
|
|
416
|
+
$[79] = writable;
|
|
417
|
+
$[80] = t25;
|
|
401
418
|
} else {
|
|
402
|
-
|
|
419
|
+
t25 = $[80];
|
|
403
420
|
}
|
|
404
|
-
const pressSurface =
|
|
405
|
-
const
|
|
406
|
-
let
|
|
407
|
-
if ($[
|
|
408
|
-
|
|
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
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
442
|
+
$[81] = atEnd;
|
|
443
|
+
$[82] = chatId;
|
|
444
|
+
$[83] = readOnly;
|
|
445
|
+
$[84] = t;
|
|
446
|
+
$[85] = t27;
|
|
430
447
|
} else {
|
|
431
|
-
|
|
448
|
+
t27 = $[85];
|
|
432
449
|
}
|
|
433
|
-
let
|
|
434
|
-
if ($[
|
|
435
|
-
|
|
450
|
+
let t28;
|
|
451
|
+
if ($[86] !== chatId) {
|
|
452
|
+
t28 = /*#__PURE__*/_jsx(ChatActivity, {
|
|
436
453
|
chatId: chatId
|
|
437
454
|
});
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
455
|
+
$[86] = chatId;
|
|
456
|
+
$[87] = t28;
|
|
440
457
|
} else {
|
|
441
|
-
|
|
458
|
+
t28 = $[87];
|
|
442
459
|
}
|
|
443
|
-
const
|
|
444
|
-
let
|
|
445
|
-
if ($[
|
|
446
|
-
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
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
|
-
|
|
467
|
+
t30 = $[89];
|
|
451
468
|
}
|
|
452
|
-
const
|
|
469
|
+
const t31 = files.dropTarget;
|
|
453
470
|
const T0 = PromptComposer;
|
|
454
|
-
const
|
|
455
|
-
const
|
|
456
|
-
let
|
|
457
|
-
if ($[
|
|
458
|
-
|
|
459
|
-
$[
|
|
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
|
-
|
|
478
|
+
t34 = $[90];
|
|
462
479
|
}
|
|
463
|
-
const
|
|
464
|
-
let
|
|
465
|
-
if ($[
|
|
466
|
-
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
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
|
-
|
|
487
|
+
t36 = $[92];
|
|
471
488
|
}
|
|
472
|
-
let
|
|
473
|
-
if ($[
|
|
474
|
-
|
|
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
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
495
|
+
$[93] = chatId;
|
|
496
|
+
$[94] = info;
|
|
497
|
+
$[95] = t37;
|
|
481
498
|
} else {
|
|
482
|
-
|
|
499
|
+
t37 = $[95];
|
|
483
500
|
}
|
|
484
|
-
const
|
|
485
|
-
let
|
|
486
|
-
if ($[
|
|
487
|
-
|
|
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:
|
|
507
|
+
goals: t38
|
|
491
508
|
});
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
509
|
+
$[96] = chatId;
|
|
510
|
+
$[97] = info;
|
|
511
|
+
$[98] = t38;
|
|
512
|
+
$[99] = t39;
|
|
496
513
|
} else {
|
|
497
|
-
|
|
514
|
+
t39 = $[99];
|
|
498
515
|
}
|
|
499
|
-
let
|
|
500
|
-
if ($[
|
|
501
|
-
|
|
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
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
524
|
+
$[100] = chatId;
|
|
525
|
+
$[101] = compactionOffer;
|
|
526
|
+
$[102] = controls.compact;
|
|
527
|
+
$[103] = scope;
|
|
528
|
+
$[104] = t40;
|
|
512
529
|
} else {
|
|
513
|
-
|
|
530
|
+
t40 = $[104];
|
|
514
531
|
}
|
|
515
|
-
let
|
|
516
|
-
if ($[
|
|
517
|
-
|
|
532
|
+
let t41;
|
|
533
|
+
if ($[105] !== menus) {
|
|
534
|
+
t41 = /*#__PURE__*/_jsx(ComposerMenu, {
|
|
518
535
|
menus: menus
|
|
519
536
|
});
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
537
|
+
$[105] = menus;
|
|
538
|
+
$[106] = t41;
|
|
522
539
|
} else {
|
|
523
|
-
|
|
540
|
+
t41 = $[106];
|
|
524
541
|
}
|
|
525
|
-
let
|
|
526
|
-
if ($[
|
|
527
|
-
|
|
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
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
551
|
+
$[107] = chatId;
|
|
552
|
+
$[108] = info.queuePaused;
|
|
553
|
+
$[109] = queue;
|
|
554
|
+
$[110] = takeBack;
|
|
555
|
+
$[111] = takingBack;
|
|
556
|
+
$[112] = t42;
|
|
540
557
|
} else {
|
|
541
|
-
|
|
558
|
+
t42 = $[112];
|
|
542
559
|
}
|
|
543
|
-
let
|
|
544
|
-
if ($[
|
|
545
|
-
|
|
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
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
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 = $[
|
|
577
|
+
t43 = $[119];
|
|
573
578
|
}
|
|
574
579
|
let t44;
|
|
575
|
-
if ($[
|
|
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
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
585
|
+
$[120] = box.removeAttachment;
|
|
586
|
+
$[121] = draft.attachments;
|
|
587
|
+
$[122] = t44;
|
|
583
588
|
} else {
|
|
584
|
-
t44 = $[
|
|
589
|
+
t44 = $[122];
|
|
585
590
|
}
|
|
586
591
|
const t45 = !writable;
|
|
587
592
|
let t46;
|
|
588
|
-
if ($[
|
|
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
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
599
|
-
$[
|
|
600
|
-
$[
|
|
601
|
+
$[123] = box;
|
|
602
|
+
$[124] = history;
|
|
603
|
+
$[125] = hold;
|
|
604
|
+
$[126] = menus;
|
|
605
|
+
$[127] = t46;
|
|
601
606
|
} else {
|
|
602
|
-
t46 = $[
|
|
607
|
+
t46 = $[127];
|
|
603
608
|
}
|
|
604
609
|
let t47;
|
|
605
|
-
if ($[
|
|
610
|
+
if ($[128] !== hold || $[129] !== menus) {
|
|
606
611
|
t47 = () => {
|
|
607
612
|
menus.close();
|
|
608
613
|
hold.release("blur");
|
|
609
614
|
};
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
615
|
+
$[128] = hold;
|
|
616
|
+
$[129] = menus;
|
|
617
|
+
$[130] = t47;
|
|
613
618
|
} else {
|
|
614
|
-
t47 = $[
|
|
619
|
+
t47 = $[130];
|
|
615
620
|
}
|
|
616
621
|
let t48;
|
|
617
|
-
if ($[
|
|
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
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
638
|
-
$[
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
644
|
-
$[
|
|
645
|
-
$[
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
|
|
650
|
-
|
|
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 ($[
|
|
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
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
666
|
+
$[146] = notice.notice;
|
|
667
|
+
$[147] = notice.tone;
|
|
668
|
+
$[148] = t49;
|
|
662
669
|
} else {
|
|
663
|
-
t49 = $[
|
|
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 ($[
|
|
682
|
+
if ($[149] !== draft.text || $[150] !== sendKey) {
|
|
676
683
|
t55 = sendShortcut(sendKey, draft.text.includes("\n"));
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
684
|
+
$[149] = draft.text;
|
|
685
|
+
$[150] = sendKey;
|
|
686
|
+
$[151] = t55;
|
|
680
687
|
} else {
|
|
681
|
-
t55 = $[
|
|
688
|
+
t55 = $[151];
|
|
682
689
|
}
|
|
683
690
|
let t56;
|
|
684
|
-
if ($[
|
|
691
|
+
if ($[152] !== submit) {
|
|
685
692
|
t56 = alternate => submit(alternate ? "alternate" : "default");
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
693
|
+
$[152] = submit;
|
|
694
|
+
$[153] = t56;
|
|
688
695
|
} else {
|
|
689
|
-
t56 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
703
|
-
$[
|
|
704
|
-
$[
|
|
705
|
-
$[
|
|
706
|
-
$[
|
|
707
|
-
$[
|
|
708
|
-
$[
|
|
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 = $[
|
|
717
|
+
t58 = $[160];
|
|
711
718
|
}
|
|
712
719
|
let t59;
|
|
713
|
-
if ($[
|
|
720
|
+
if ($[161] !== files) {
|
|
714
721
|
t59 = picked => {
|
|
715
722
|
files.addFiles(picked);
|
|
716
723
|
inputRef.current?.focus();
|
|
717
724
|
};
|
|
718
|
-
$[
|
|
719
|
-
$[
|
|
725
|
+
$[161] = files;
|
|
726
|
+
$[162] = t59;
|
|
720
727
|
} else {
|
|
721
|
-
t59 = $[
|
|
728
|
+
t59 = $[162];
|
|
722
729
|
}
|
|
723
730
|
let t60;
|
|
724
|
-
if ($[
|
|
731
|
+
if ($[163] !== writable) {
|
|
725
732
|
t60 = added => {
|
|
726
733
|
if (writable) {
|
|
727
734
|
inputRef.current?.insert(added);
|
|
728
735
|
}
|
|
729
736
|
};
|
|
730
|
-
$[
|
|
731
|
-
$[
|
|
737
|
+
$[163] = writable;
|
|
738
|
+
$[164] = t60;
|
|
732
739
|
} else {
|
|
733
|
-
t60 = $[
|
|
740
|
+
t60 = $[164];
|
|
734
741
|
}
|
|
735
742
|
let t61;
|
|
736
|
-
if ($[
|
|
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
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
-
$[
|
|
758
|
-
$[
|
|
759
|
-
$[
|
|
760
|
-
$[
|
|
761
|
-
$[
|
|
762
|
-
$[
|
|
763
|
-
} else {
|
|
764
|
-
t61 = $[
|
|
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 ($[
|
|
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:
|
|
776
|
+
className: t36,
|
|
770
777
|
onPointerOver: pointSurface,
|
|
771
778
|
onMouseDown: pressSurface,
|
|
772
|
-
children: [
|
|
779
|
+
children: [t37, t39, t40, t41, t42, t43, t44, t48, t49, t50, t61]
|
|
773
780
|
});
|
|
774
|
-
$[
|
|
775
|
-
$[
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
781
|
-
$[
|
|
782
|
-
$[
|
|
783
|
-
$[
|
|
784
|
-
$[
|
|
785
|
-
$[
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
788
|
-
$[
|
|
789
|
-
|
|
790
|
-
|
|
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 ($[
|
|
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:
|
|
802
|
-
denyReason:
|
|
803
|
-
onAllAnswered:
|
|
807
|
+
hasDraft: t32,
|
|
808
|
+
denyReason: t33,
|
|
809
|
+
onAllAnswered: t34,
|
|
804
810
|
hold: hold,
|
|
805
811
|
children: t62
|
|
806
812
|
});
|
|
807
|
-
$[
|
|
808
|
-
$[
|
|
809
|
-
$[
|
|
810
|
-
$[
|
|
811
|
-
$[
|
|
812
|
-
$[
|
|
813
|
-
$[
|
|
814
|
-
$[
|
|
815
|
-
$[
|
|
816
|
-
$[
|
|
817
|
-
$[
|
|
818
|
-
$[
|
|
819
|
-
} else {
|
|
820
|
-
t63 = $[
|
|
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 ($[
|
|
829
|
+
if ($[205] !== files.dropTarget || $[206] !== t30 || $[207] !== t63) {
|
|
824
830
|
t64 = /*#__PURE__*/_jsx("div", {
|
|
825
|
-
className:
|
|
826
|
-
...
|
|
831
|
+
className: t30,
|
|
832
|
+
...t31,
|
|
827
833
|
children: t63
|
|
828
834
|
});
|
|
829
|
-
$[
|
|
830
|
-
$[
|
|
831
|
-
$[
|
|
832
|
-
$[
|
|
835
|
+
$[205] = files.dropTarget;
|
|
836
|
+
$[206] = t30;
|
|
837
|
+
$[207] = t63;
|
|
838
|
+
$[208] = t64;
|
|
833
839
|
} else {
|
|
834
|
-
t64 = $[
|
|
840
|
+
t64 = $[208];
|
|
835
841
|
}
|
|
836
842
|
const t65 = controls.confirmClear;
|
|
837
843
|
let t66;
|
|
838
|
-
if ($[
|
|
844
|
+
if ($[209] !== t) {
|
|
839
845
|
t66 = t("composer.clear.title");
|
|
840
|
-
$[
|
|
841
|
-
$[
|
|
846
|
+
$[209] = t;
|
|
847
|
+
$[210] = t66;
|
|
842
848
|
} else {
|
|
843
|
-
t66 = $[
|
|
849
|
+
t66 = $[210];
|
|
844
850
|
}
|
|
845
851
|
let t67;
|
|
846
|
-
if ($[
|
|
852
|
+
if ($[211] !== t) {
|
|
847
853
|
t67 = t("composer.clear.description");
|
|
848
|
-
$[
|
|
849
|
-
$[
|
|
854
|
+
$[211] = t;
|
|
855
|
+
$[212] = t67;
|
|
850
856
|
} else {
|
|
851
|
-
t67 = $[
|
|
857
|
+
t67 = $[212];
|
|
852
858
|
}
|
|
853
859
|
let t68;
|
|
854
|
-
if ($[
|
|
860
|
+
if ($[213] !== t) {
|
|
855
861
|
t68 = t("composer.clear.confirm");
|
|
856
|
-
$[
|
|
857
|
-
$[
|
|
862
|
+
$[213] = t;
|
|
863
|
+
$[214] = t68;
|
|
858
864
|
} else {
|
|
859
|
-
t68 = $[
|
|
865
|
+
t68 = $[214];
|
|
860
866
|
}
|
|
861
867
|
let t69;
|
|
862
|
-
if ($[
|
|
868
|
+
if ($[215] !== t) {
|
|
863
869
|
t69 = t("composer.notice.clearFailed");
|
|
864
|
-
$[
|
|
865
|
-
$[
|
|
870
|
+
$[215] = t;
|
|
871
|
+
$[216] = t69;
|
|
866
872
|
} else {
|
|
867
|
-
t69 = $[
|
|
873
|
+
t69 = $[216];
|
|
868
874
|
}
|
|
869
875
|
let t70;
|
|
870
|
-
if ($[
|
|
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
|
-
$[
|
|
882
|
-
$[
|
|
883
|
-
$[
|
|
884
|
-
$[
|
|
885
|
-
$[
|
|
886
|
-
$[
|
|
887
|
-
$[
|
|
888
|
-
$[
|
|
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 = $[
|
|
896
|
+
t70 = $[224];
|
|
891
897
|
}
|
|
892
898
|
let t71;
|
|
893
|
-
if ($[
|
|
899
|
+
if ($[225] !== t27 || $[226] !== t28 || $[227] !== t64 || $[228] !== t70) {
|
|
894
900
|
t71 = /*#__PURE__*/_jsxs("div", {
|
|
895
|
-
className:
|
|
896
|
-
children: [
|
|
901
|
+
className: t26,
|
|
902
|
+
children: [t27, t28, t64, t70]
|
|
897
903
|
});
|
|
898
|
-
$[
|
|
899
|
-
$[
|
|
900
|
-
$[
|
|
901
|
-
$[
|
|
902
|
-
$[
|
|
904
|
+
$[225] = t27;
|
|
905
|
+
$[226] = t28;
|
|
906
|
+
$[227] = t64;
|
|
907
|
+
$[228] = t70;
|
|
908
|
+
$[229] = t71;
|
|
903
909
|
} else {
|
|
904
|
-
t71 = $[
|
|
910
|
+
t71 = $[229];
|
|
905
911
|
}
|
|
906
912
|
return t71;
|
|
907
913
|
}
|
|
908
|
-
function
|
|
914
|
+
function _temp4(event) {
|
|
909
915
|
event.currentTarget.toggleAttribute("data-text-cursor", surfacePartOf(event.target, event.currentTarget) !== "action");
|
|
910
916
|
}
|
|
911
|
-
function
|
|
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
|
}
|