@adecore/agents-react 0.50.6 → 0.51.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-references.d.ts +1 -0
- package/dist/chat/ui/Markdown.js +117 -142
- package/dist/chat/ui/MessageActions.js +69 -51
- package/dist/chat/ui/Timeline.js +38 -25
- package/dist/chat/ui/composer/use-prompt-menus.d.ts +1 -0
- package/dist/chat/ui/composer/use-prompt-menus.js +238 -213
- package/dist/chat/ui/rows/WorkRows.js +46 -0
- package/dist/host-hooks.d.ts +1 -0
- package/dist/host-hooks.js +7 -0
- package/dist/host.d.ts +25 -0
- package/package.json +8 -8
- package/src/chat/chat-references.ts +2 -0
- package/src/chat/ui/Markdown.tsx +23 -8
- package/src/chat/ui/MessageActions.tsx +1 -0
- package/src/chat/ui/Timeline.tsx +2 -0
- package/src/chat/ui/composer/use-prompt-menus.ts +32 -1
- package/src/chat/ui/rows/WorkRows.tsx +11 -0
- package/src/host-hooks.ts +10 -0
- package/src/host.ts +18 -0
package/dist/chat/ui/Markdown.js
CHANGED
|
@@ -455,7 +455,7 @@ function Diagram(t0) {
|
|
|
455
455
|
return t4;
|
|
456
456
|
}
|
|
457
457
|
function MarkdownCode(t0) {
|
|
458
|
-
const $ = _c(
|
|
458
|
+
const $ = _c(7);
|
|
459
459
|
const {
|
|
460
460
|
className,
|
|
461
461
|
children,
|
|
@@ -463,61 +463,42 @@ function MarkdownCode(t0) {
|
|
|
463
463
|
} = t0;
|
|
464
464
|
const plain = t1 === undefined ? false : t1;
|
|
465
465
|
const block = useContext(BlockCodeContext);
|
|
466
|
+
const {
|
|
467
|
+
renderCodeFence
|
|
468
|
+
} = useChatHost();
|
|
466
469
|
const text = String(children ?? "");
|
|
467
470
|
if (block) {
|
|
468
471
|
let t2;
|
|
469
|
-
if ($[0] !== className) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
} else {
|
|
474
|
-
t2 = $[1];
|
|
475
|
-
}
|
|
476
|
-
const lang = t2;
|
|
477
|
-
let t3;
|
|
478
|
-
if ($[2] !== text) {
|
|
479
|
-
let t4;
|
|
480
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
481
|
-
t4 = /\n$/;
|
|
482
|
-
$[4] = t4;
|
|
483
|
-
} else {
|
|
484
|
-
t4 = $[4];
|
|
485
|
-
}
|
|
486
|
-
t3 = text.replace(t4, "");
|
|
487
|
-
$[2] = text;
|
|
488
|
-
$[3] = t3;
|
|
489
|
-
} else {
|
|
490
|
-
t3 = $[3];
|
|
491
|
-
}
|
|
492
|
-
const code = t3;
|
|
493
|
-
let t4;
|
|
494
|
-
if ($[5] !== code || $[6] !== lang) {
|
|
495
|
-
t4 = lang === "mermaid" ? /*#__PURE__*/_jsx(Diagram, {
|
|
472
|
+
if ($[0] !== className || $[1] !== renderCodeFence || $[2] !== text) {
|
|
473
|
+
const lang = languageOf(className);
|
|
474
|
+
const code = text.replace(/\n$/, "");
|
|
475
|
+
t2 = renderCodeFence?.(lang, code) ?? (lang === "mermaid" ? /*#__PURE__*/_jsx(Diagram, {
|
|
496
476
|
code: code
|
|
497
477
|
}) : /*#__PURE__*/_jsx(CodeBlock, {
|
|
498
478
|
code: code,
|
|
499
479
|
lang: lang
|
|
500
|
-
});
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
480
|
+
}));
|
|
481
|
+
$[0] = className;
|
|
482
|
+
$[1] = renderCodeFence;
|
|
483
|
+
$[2] = text;
|
|
484
|
+
$[3] = t2;
|
|
504
485
|
} else {
|
|
505
|
-
|
|
486
|
+
t2 = $[3];
|
|
506
487
|
}
|
|
507
|
-
return
|
|
488
|
+
return t2;
|
|
508
489
|
}
|
|
509
490
|
let t2;
|
|
510
|
-
if ($[
|
|
491
|
+
if ($[4] !== plain || $[5] !== text) {
|
|
511
492
|
t2 = plain ? /*#__PURE__*/_jsx(PlainCode, {
|
|
512
493
|
text: text
|
|
513
494
|
}) : /*#__PURE__*/_jsx(InlineCode, {
|
|
514
495
|
text: text
|
|
515
496
|
});
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
497
|
+
$[4] = plain;
|
|
498
|
+
$[5] = text;
|
|
499
|
+
$[6] = t2;
|
|
519
500
|
} else {
|
|
520
|
-
t2 = $[
|
|
501
|
+
t2 = $[6];
|
|
521
502
|
}
|
|
522
503
|
return t2;
|
|
523
504
|
}
|
|
@@ -595,7 +576,7 @@ const replyComponents = {
|
|
|
595
576
|
h6: replyHeading(6)
|
|
596
577
|
};
|
|
597
578
|
function ReplyCode(t0) {
|
|
598
|
-
const $ = _c(
|
|
579
|
+
const $ = _c(21);
|
|
599
580
|
const {
|
|
600
581
|
className,
|
|
601
582
|
children,
|
|
@@ -604,6 +585,7 @@ function ReplyCode(t0) {
|
|
|
604
585
|
const reply = useContext(ShellCodeBlockReplyContext);
|
|
605
586
|
const block = useContext(BlockCodeContext);
|
|
606
587
|
const {
|
|
588
|
+
renderCodeFence,
|
|
607
589
|
renderShellCodeBlock
|
|
608
590
|
} = useChatHost();
|
|
609
591
|
const properties = node?.properties;
|
|
@@ -611,7 +593,7 @@ function ReplyCode(t0) {
|
|
|
611
593
|
const code = properties?.["data-shell-code"];
|
|
612
594
|
let t1;
|
|
613
595
|
let text;
|
|
614
|
-
if ($[0] !== block || $[1] !== children || $[2] !== className || $[3] !== code || $[4] !== language || $[5] !== properties || $[6] !==
|
|
596
|
+
if ($[0] !== block || $[1] !== children || $[2] !== className || $[3] !== code || $[4] !== language || $[5] !== properties || $[6] !== renderCodeFence || $[7] !== renderShellCodeBlock || $[8] !== reply) {
|
|
615
597
|
t1 = Symbol.for("react.early_return_sentinel");
|
|
616
598
|
bb0: {
|
|
617
599
|
const shell = (language === "sh" || language === "bash" || language === "zsh") && typeof code === "string" ? {
|
|
@@ -620,62 +602,47 @@ function ReplyCode(t0) {
|
|
|
620
602
|
closed: properties?.["data-shell-closed"] === true
|
|
621
603
|
} : null;
|
|
622
604
|
text = String(children ?? "");
|
|
623
|
-
if (block
|
|
605
|
+
if (block) {
|
|
606
|
+
let body;
|
|
607
|
+
let lang;
|
|
624
608
|
let t2;
|
|
625
|
-
if ($[
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
$[
|
|
635
|
-
$[11] = t2;
|
|
609
|
+
if ($[11] !== className || $[12] !== renderCodeFence || $[13] !== text) {
|
|
610
|
+
lang = languageOf(className);
|
|
611
|
+
body = text.replace(/\n$/, "");
|
|
612
|
+
t2 = renderCodeFence?.(lang, body);
|
|
613
|
+
$[11] = className;
|
|
614
|
+
$[12] = renderCodeFence;
|
|
615
|
+
$[13] = text;
|
|
616
|
+
$[14] = body;
|
|
617
|
+
$[15] = lang;
|
|
618
|
+
$[16] = t2;
|
|
636
619
|
} else {
|
|
637
|
-
|
|
620
|
+
body = $[14];
|
|
621
|
+
lang = $[15];
|
|
622
|
+
t2 = $[16];
|
|
638
623
|
}
|
|
639
|
-
|
|
640
|
-
if (
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
});
|
|
644
|
-
$[13] = t2;
|
|
645
|
-
$[14] = t3;
|
|
646
|
-
} else {
|
|
647
|
-
t3 = $[14];
|
|
624
|
+
const drawn = t2;
|
|
625
|
+
if (drawn !== undefined && drawn !== null) {
|
|
626
|
+
t1 = drawn;
|
|
627
|
+
break bb0;
|
|
648
628
|
}
|
|
649
|
-
|
|
650
|
-
break bb0;
|
|
651
|
-
}
|
|
652
|
-
if (block) {
|
|
653
|
-
let t2;
|
|
654
|
-
if ($[15] !== text) {
|
|
629
|
+
if (lang === "mermaid") {
|
|
655
630
|
let t3;
|
|
656
|
-
if ($[17]
|
|
657
|
-
t3 =
|
|
658
|
-
|
|
631
|
+
if ($[17] !== body) {
|
|
632
|
+
t3 = /*#__PURE__*/_jsx(Diagram, {
|
|
633
|
+
code: body
|
|
634
|
+
});
|
|
635
|
+
$[17] = body;
|
|
636
|
+
$[18] = t3;
|
|
659
637
|
} else {
|
|
660
|
-
t3 = $[
|
|
638
|
+
t3 = $[18];
|
|
661
639
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
$[16] = t2;
|
|
665
|
-
} else {
|
|
666
|
-
t2 = $[16];
|
|
667
|
-
}
|
|
668
|
-
let t3;
|
|
669
|
-
if ($[18] !== className) {
|
|
670
|
-
t3 = languageOf(className);
|
|
671
|
-
$[18] = className;
|
|
672
|
-
$[19] = t3;
|
|
673
|
-
} else {
|
|
674
|
-
t3 = $[19];
|
|
640
|
+
t1 = t3;
|
|
641
|
+
break bb0;
|
|
675
642
|
}
|
|
676
643
|
t1 = /*#__PURE__*/_jsx(CodeBlock, {
|
|
677
|
-
code:
|
|
678
|
-
lang:
|
|
644
|
+
code: body,
|
|
645
|
+
lang: lang,
|
|
679
646
|
actions: shellCodeBlockActions(reply, shell, renderShellCodeBlock)
|
|
680
647
|
});
|
|
681
648
|
break bb0;
|
|
@@ -687,26 +654,27 @@ function ReplyCode(t0) {
|
|
|
687
654
|
$[3] = code;
|
|
688
655
|
$[4] = language;
|
|
689
656
|
$[5] = properties;
|
|
690
|
-
$[6] =
|
|
691
|
-
$[7] =
|
|
692
|
-
$[8] =
|
|
693
|
-
$[9] =
|
|
657
|
+
$[6] = renderCodeFence;
|
|
658
|
+
$[7] = renderShellCodeBlock;
|
|
659
|
+
$[8] = reply;
|
|
660
|
+
$[9] = t1;
|
|
661
|
+
$[10] = text;
|
|
694
662
|
} else {
|
|
695
|
-
t1 = $[
|
|
696
|
-
text = $[
|
|
663
|
+
t1 = $[9];
|
|
664
|
+
text = $[10];
|
|
697
665
|
}
|
|
698
666
|
if (t1 !== Symbol.for("react.early_return_sentinel")) {
|
|
699
667
|
return t1;
|
|
700
668
|
}
|
|
701
669
|
let t2;
|
|
702
|
-
if ($[
|
|
670
|
+
if ($[19] !== text) {
|
|
703
671
|
t2 = /*#__PURE__*/_jsx(InlineCode, {
|
|
704
672
|
text: text
|
|
705
673
|
});
|
|
706
|
-
$[
|
|
707
|
-
$[
|
|
674
|
+
$[19] = text;
|
|
675
|
+
$[20] = t2;
|
|
708
676
|
} else {
|
|
709
|
-
t2 = $[
|
|
677
|
+
t2 = $[20];
|
|
710
678
|
}
|
|
711
679
|
return t2;
|
|
712
680
|
}
|
|
@@ -966,57 +934,64 @@ const ReplyFence = memo(function ReplyFence(t0) {
|
|
|
966
934
|
reply
|
|
967
935
|
} = t0;
|
|
968
936
|
const {
|
|
937
|
+
renderCodeFence,
|
|
969
938
|
renderShellCodeBlock
|
|
970
939
|
} = useChatHost();
|
|
971
940
|
let t1;
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
941
|
+
let t2;
|
|
942
|
+
if ($[0] !== body || $[1] !== info || $[2] !== open || $[3] !== renderCodeFence || $[4] !== renderShellCodeBlock || $[5] !== reply || $[6] !== source) {
|
|
943
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
944
|
+
bb0: {
|
|
945
|
+
let t3;
|
|
946
|
+
if ($[9] !== info) {
|
|
947
|
+
let t4;
|
|
948
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
949
|
+
t4 = /[ \t]/;
|
|
950
|
+
$[11] = t4;
|
|
951
|
+
} else {
|
|
952
|
+
t4 = $[11];
|
|
953
|
+
}
|
|
954
|
+
t3 = info.split(t4, 1);
|
|
955
|
+
$[9] = info;
|
|
956
|
+
$[10] = t3;
|
|
957
|
+
} else {
|
|
958
|
+
t3 = $[10];
|
|
959
|
+
}
|
|
960
|
+
const lang = languageOf(`language-${t3[0]}`);
|
|
961
|
+
const shell = reply === undefined ? null : shellFence(source);
|
|
962
|
+
const drawn = open ? null : renderCodeFence?.(lang, body);
|
|
963
|
+
if (drawn !== undefined && drawn !== null) {
|
|
964
|
+
t2 = drawn;
|
|
965
|
+
break bb0;
|
|
966
|
+
}
|
|
967
|
+
t1 = /*#__PURE__*/_jsx(CodeStreamingContext.Provider, {
|
|
968
|
+
value: open,
|
|
969
|
+
children: lang === "mermaid" ? /*#__PURE__*/_jsx(Diagram, {
|
|
970
|
+
code: body
|
|
971
|
+
}) : /*#__PURE__*/_jsx(CodeBlock, {
|
|
972
|
+
code: body,
|
|
973
|
+
lang: lang,
|
|
974
|
+
actions: shellCodeBlockActions(reply ?? null, shell, renderShellCodeBlock)
|
|
975
|
+
})
|
|
976
|
+
});
|
|
979
977
|
}
|
|
980
|
-
|
|
981
|
-
$[
|
|
982
|
-
$[
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
t3 = languageOf(t2);
|
|
990
|
-
$[3] = t2;
|
|
991
|
-
$[4] = t3;
|
|
978
|
+
$[0] = body;
|
|
979
|
+
$[1] = info;
|
|
980
|
+
$[2] = open;
|
|
981
|
+
$[3] = renderCodeFence;
|
|
982
|
+
$[4] = renderShellCodeBlock;
|
|
983
|
+
$[5] = reply;
|
|
984
|
+
$[6] = source;
|
|
985
|
+
$[7] = t1;
|
|
986
|
+
$[8] = t2;
|
|
992
987
|
} else {
|
|
993
|
-
|
|
988
|
+
t1 = $[7];
|
|
989
|
+
t2 = $[8];
|
|
994
990
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
if ($[5] !== body || $[6] !== lang || $[7] !== open || $[8] !== renderShellCodeBlock || $[9] !== reply || $[10] !== source) {
|
|
998
|
-
const shell = reply === undefined ? null : shellFence(source);
|
|
999
|
-
t4 = /*#__PURE__*/_jsx(CodeStreamingContext.Provider, {
|
|
1000
|
-
value: open,
|
|
1001
|
-
children: lang === "mermaid" ? /*#__PURE__*/_jsx(Diagram, {
|
|
1002
|
-
code: body
|
|
1003
|
-
}) : /*#__PURE__*/_jsx(CodeBlock, {
|
|
1004
|
-
code: body,
|
|
1005
|
-
lang: lang,
|
|
1006
|
-
actions: shellCodeBlockActions(reply ?? null, shell, renderShellCodeBlock)
|
|
1007
|
-
})
|
|
1008
|
-
});
|
|
1009
|
-
$[5] = body;
|
|
1010
|
-
$[6] = lang;
|
|
1011
|
-
$[7] = open;
|
|
1012
|
-
$[8] = renderShellCodeBlock;
|
|
1013
|
-
$[9] = reply;
|
|
1014
|
-
$[10] = source;
|
|
1015
|
-
$[11] = t4;
|
|
1016
|
-
} else {
|
|
1017
|
-
t4 = $[11];
|
|
991
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) {
|
|
992
|
+
return t2;
|
|
1018
993
|
}
|
|
1019
|
-
return
|
|
994
|
+
return t1;
|
|
1020
995
|
});
|
|
1021
996
|
/*
|
|
1022
997
|
* A reply in a chat thread, parsed a block at a time so a delta only parses the block that grows,
|
|
@@ -18,7 +18,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
18
18
|
const COPIED_MS = 1500;
|
|
19
19
|
/* Hidden actions keep their height, so hovering never forces the virtualizer to remeasure. */
|
|
20
20
|
export function MessageActions(t0) {
|
|
21
|
-
const $ = _c(
|
|
21
|
+
const $ = _c(66);
|
|
22
22
|
const {
|
|
23
23
|
chatId,
|
|
24
24
|
row
|
|
@@ -189,81 +189,99 @@ export function MessageActions(t0) {
|
|
|
189
189
|
t12 = $[38];
|
|
190
190
|
}
|
|
191
191
|
let t13;
|
|
192
|
-
if ($[39] !== row.item.
|
|
193
|
-
t13 =
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
if ($[39] !== chatId || $[40] !== host || $[41] !== row.id || $[42] !== row.item.text || $[43] !== row.kind) {
|
|
193
|
+
t13 = host.renderMessageActions?.({
|
|
194
|
+
chatId,
|
|
195
|
+
id: row.id,
|
|
196
|
+
kind: row.kind,
|
|
197
|
+
text: row.item.text
|
|
198
|
+
});
|
|
199
|
+
$[39] = chatId;
|
|
200
|
+
$[40] = host;
|
|
201
|
+
$[41] = row.id;
|
|
202
|
+
$[42] = row.item.text;
|
|
203
|
+
$[43] = row.kind;
|
|
204
|
+
$[44] = t13;
|
|
196
205
|
} else {
|
|
197
|
-
t13 = $[
|
|
206
|
+
t13 = $[44];
|
|
198
207
|
}
|
|
199
208
|
let t14;
|
|
200
|
-
if ($[
|
|
201
|
-
t14 =
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
209
|
+
if ($[45] !== row.item.createdAt) {
|
|
210
|
+
t14 = formatDateTime(row.item.createdAt, TIMESTAMP_FORMAT);
|
|
211
|
+
$[45] = row.item.createdAt;
|
|
212
|
+
$[46] = t14;
|
|
204
213
|
} else {
|
|
205
|
-
t14 = $[
|
|
214
|
+
t14 = $[46];
|
|
206
215
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
$[
|
|
212
|
-
$[44] = t16;
|
|
216
|
+
let t15;
|
|
217
|
+
if ($[47] !== row.item.createdAt) {
|
|
218
|
+
t15 = new Date(row.item.createdAt).toISOString();
|
|
219
|
+
$[47] = row.item.createdAt;
|
|
220
|
+
$[48] = t15;
|
|
213
221
|
} else {
|
|
214
|
-
|
|
222
|
+
t15 = $[48];
|
|
215
223
|
}
|
|
224
|
+
const t16 = row.kind === "assistant" && "order-first";
|
|
216
225
|
let t17;
|
|
217
|
-
if ($[
|
|
218
|
-
t17 =
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
226
|
+
if ($[49] !== t16) {
|
|
227
|
+
t17 = clsx("shrink-0 text-xs text-text-faint tabular-nums select-none", t16);
|
|
228
|
+
$[49] = t16;
|
|
229
|
+
$[50] = t17;
|
|
221
230
|
} else {
|
|
222
|
-
t17 = $[
|
|
231
|
+
t17 = $[50];
|
|
223
232
|
}
|
|
224
233
|
let t18;
|
|
225
|
-
if ($[
|
|
226
|
-
t18 =
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
children: t17
|
|
230
|
-
});
|
|
231
|
-
$[47] = t14;
|
|
232
|
-
$[48] = t16;
|
|
233
|
-
$[49] = t17;
|
|
234
|
-
$[50] = t18;
|
|
234
|
+
if ($[51] !== row.item.createdAt) {
|
|
235
|
+
t18 = formatClock(row.item.createdAt);
|
|
236
|
+
$[51] = row.item.createdAt;
|
|
237
|
+
$[52] = t18;
|
|
235
238
|
} else {
|
|
236
|
-
t18 = $[
|
|
239
|
+
t18 = $[52];
|
|
237
240
|
}
|
|
238
241
|
let t19;
|
|
239
|
-
if ($[
|
|
240
|
-
t19 = /*#__PURE__*/_jsx(
|
|
241
|
-
|
|
242
|
+
if ($[53] !== t15 || $[54] !== t17 || $[55] !== t18) {
|
|
243
|
+
t19 = /*#__PURE__*/_jsx("time", {
|
|
244
|
+
dateTime: t15,
|
|
245
|
+
className: t17,
|
|
242
246
|
children: t18
|
|
243
247
|
});
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
248
|
+
$[53] = t15;
|
|
249
|
+
$[54] = t17;
|
|
250
|
+
$[55] = t18;
|
|
251
|
+
$[56] = t19;
|
|
247
252
|
} else {
|
|
248
|
-
t19 = $[
|
|
253
|
+
t19 = $[56];
|
|
249
254
|
}
|
|
250
255
|
let t20;
|
|
251
|
-
if ($[
|
|
252
|
-
t20 = /*#__PURE__*/
|
|
256
|
+
if ($[57] !== t14 || $[58] !== t19) {
|
|
257
|
+
t20 = /*#__PURE__*/_jsx(Tooltip, {
|
|
258
|
+
label: t14,
|
|
259
|
+
children: t19
|
|
260
|
+
});
|
|
261
|
+
$[57] = t14;
|
|
262
|
+
$[58] = t19;
|
|
263
|
+
$[59] = t20;
|
|
264
|
+
} else {
|
|
265
|
+
t20 = $[59];
|
|
266
|
+
}
|
|
267
|
+
let t21;
|
|
268
|
+
if ($[60] !== t11 || $[61] !== t12 || $[62] !== t13 || $[63] !== t20 || $[64] !== t9) {
|
|
269
|
+
t21 = /*#__PURE__*/_jsxs("div", {
|
|
253
270
|
role: "toolbar",
|
|
254
271
|
"aria-label": t9,
|
|
255
272
|
className: t11,
|
|
256
|
-
children: [t12,
|
|
273
|
+
children: [t12, t13, t20]
|
|
257
274
|
});
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
275
|
+
$[60] = t11;
|
|
276
|
+
$[61] = t12;
|
|
277
|
+
$[62] = t13;
|
|
278
|
+
$[63] = t20;
|
|
279
|
+
$[64] = t9;
|
|
280
|
+
$[65] = t21;
|
|
263
281
|
} else {
|
|
264
|
-
|
|
282
|
+
t21 = $[65];
|
|
265
283
|
}
|
|
266
|
-
return
|
|
284
|
+
return t21;
|
|
267
285
|
}
|
|
268
286
|
function _temp2(chat_0) {
|
|
269
287
|
return chat_0?.info ?? null;
|
package/dist/chat/ui/Timeline.js
CHANGED
|
@@ -55,10 +55,13 @@ function showRowAtTop(virtualizer, followRef, index) {
|
|
|
55
55
|
* and the folder it works in, so a first question can lean on all three.
|
|
56
56
|
*/
|
|
57
57
|
function EmptyThread(t0) {
|
|
58
|
-
const $ = _c(
|
|
58
|
+
const $ = _c(24);
|
|
59
59
|
const {
|
|
60
60
|
chatId
|
|
61
61
|
} = t0;
|
|
62
|
+
const {
|
|
63
|
+
renderEmptyThread
|
|
64
|
+
} = useChatHost();
|
|
62
65
|
const {
|
|
63
66
|
t
|
|
64
67
|
} = useTranslation("agent-chat");
|
|
@@ -102,8 +105,17 @@ function EmptyThread(t0) {
|
|
|
102
105
|
t3 = $[8];
|
|
103
106
|
}
|
|
104
107
|
let t4;
|
|
105
|
-
if ($[9] !==
|
|
106
|
-
t4 =
|
|
108
|
+
if ($[9] !== chatId || $[10] !== renderEmptyThread) {
|
|
109
|
+
t4 = renderEmptyThread?.(chatId);
|
|
110
|
+
$[9] = chatId;
|
|
111
|
+
$[10] = renderEmptyThread;
|
|
112
|
+
$[11] = t4;
|
|
113
|
+
} else {
|
|
114
|
+
t4 = $[11];
|
|
115
|
+
}
|
|
116
|
+
let t5;
|
|
117
|
+
if ($[12] !== sources || $[13] !== t) {
|
|
118
|
+
t5 = sources.length > 0 && /*#__PURE__*/_jsxs("div", {
|
|
107
119
|
className: "flex max-w-full flex-col items-center gap-1",
|
|
108
120
|
children: [/*#__PURE__*/_jsx(SectionLabel, {
|
|
109
121
|
children: t("timeline.empty.canRead")
|
|
@@ -112,15 +124,15 @@ function EmptyThread(t0) {
|
|
|
112
124
|
children: sources.map(_temp2).join(", ")
|
|
113
125
|
})]
|
|
114
126
|
});
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
127
|
+
$[12] = sources;
|
|
128
|
+
$[13] = t;
|
|
129
|
+
$[14] = t5;
|
|
118
130
|
} else {
|
|
119
|
-
|
|
131
|
+
t5 = $[14];
|
|
120
132
|
}
|
|
121
|
-
let
|
|
122
|
-
if ($[
|
|
123
|
-
|
|
133
|
+
let t6;
|
|
134
|
+
if ($[15] !== hidesFolder || $[16] !== info || $[17] !== t) {
|
|
135
|
+
t6 = info?.cwd && !hidesFolder && /*#__PURE__*/_jsxs("div", {
|
|
124
136
|
className: "flex max-w-full flex-col items-center gap-1",
|
|
125
137
|
children: [/*#__PURE__*/_jsx(SectionLabel, {
|
|
126
138
|
children: t("timeline.empty.worksIn")
|
|
@@ -129,30 +141,31 @@ function EmptyThread(t0) {
|
|
|
129
141
|
children: info.cwd
|
|
130
142
|
})]
|
|
131
143
|
});
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
144
|
+
$[15] = hidesFolder;
|
|
145
|
+
$[16] = info;
|
|
146
|
+
$[17] = t;
|
|
147
|
+
$[18] = t6;
|
|
136
148
|
} else {
|
|
137
|
-
|
|
149
|
+
t6 = $[18];
|
|
138
150
|
}
|
|
139
|
-
let
|
|
140
|
-
if ($[
|
|
141
|
-
|
|
151
|
+
let t7;
|
|
152
|
+
if ($[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
|
|
153
|
+
t7 = /*#__PURE__*/_jsx("div", {
|
|
142
154
|
className: "flex grow items-center justify-center",
|
|
143
155
|
children: /*#__PURE__*/_jsxs("div", {
|
|
144
156
|
className: "flex max-w-sm flex-col items-center gap-3 px-6 py-8 text-center",
|
|
145
|
-
children: [t3, t4, t5]
|
|
157
|
+
children: [t3, t4, t5, t6]
|
|
146
158
|
})
|
|
147
159
|
});
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
160
|
+
$[19] = t3;
|
|
161
|
+
$[20] = t4;
|
|
162
|
+
$[21] = t5;
|
|
163
|
+
$[22] = t6;
|
|
164
|
+
$[23] = t7;
|
|
152
165
|
} else {
|
|
153
|
-
|
|
166
|
+
t7 = $[23];
|
|
154
167
|
}
|
|
155
|
-
return
|
|
168
|
+
return t7;
|
|
156
169
|
}
|
|
157
170
|
/*
|
|
158
171
|
* A row of the thread behind the chapter line of its bookmark. A message, the only row that takes a
|