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