@yushaw/sanqian-chat 0.2.22 → 0.2.23
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/renderer/index.js +37 -26
- package/dist/renderer/index.mjs +37 -26
- package/package.json +1 -1
package/dist/renderer/index.js
CHANGED
|
@@ -10793,6 +10793,39 @@ var CompactChat = (0, import_react38.memo)(function CompactChat2({
|
|
|
10793
10793
|
leftSlot: addResourceButtonSlot
|
|
10794
10794
|
}
|
|
10795
10795
|
);
|
|
10796
|
+
const hasContextTags = chat.sessionResources.length > 0 || resourcePicker.attachedResources.length > 0;
|
|
10797
|
+
const contextTagsOverlay = hasContextTags ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10798
|
+
"div",
|
|
10799
|
+
{
|
|
10800
|
+
className: "pointer-events-none absolute left-0 right-0 z-10",
|
|
10801
|
+
style: { bottom: "calc(100% + 8px)" },
|
|
10802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
10803
|
+
chat.sessionResources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pointer-events-auto", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10804
|
+
AttachedResourceTags,
|
|
10805
|
+
{
|
|
10806
|
+
resources: chat.sessionResources.map((r) => ({
|
|
10807
|
+
providerId: r.appName,
|
|
10808
|
+
resourceId: r.fullId,
|
|
10809
|
+
title: r.title,
|
|
10810
|
+
summary: r.summary,
|
|
10811
|
+
icon: r.icon,
|
|
10812
|
+
type: r.type
|
|
10813
|
+
})),
|
|
10814
|
+
onRemove: (_, fullId) => chat.removeSessionResource(fullId),
|
|
10815
|
+
disabled: disableInput
|
|
10816
|
+
}
|
|
10817
|
+
) }),
|
|
10818
|
+
resourcePicker.attachedResources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pointer-events-auto", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10819
|
+
AttachedResourceTags,
|
|
10820
|
+
{
|
|
10821
|
+
resources: resourcePicker.attachedResources,
|
|
10822
|
+
onRemove: resourcePicker.detachResource,
|
|
10823
|
+
disabled: disableInput
|
|
10824
|
+
}
|
|
10825
|
+
) })
|
|
10826
|
+
] })
|
|
10827
|
+
}
|
|
10828
|
+
) : null;
|
|
10796
10829
|
if (shouldRenderInputExternally && portalContainerRef.current) {
|
|
10797
10830
|
return (0, import_react_dom.createPortal)(inputElement, portalContainerRef.current);
|
|
10798
10831
|
}
|
|
@@ -10852,32 +10885,10 @@ var CompactChat = (0, import_react38.memo)(function CompactChat2({
|
|
|
10852
10885
|
}
|
|
10853
10886
|
}
|
|
10854
10887
|
),
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
resources: chat.sessionResources.map((r) => ({
|
|
10860
|
-
providerId: r.appName,
|
|
10861
|
-
resourceId: r.fullId,
|
|
10862
|
-
title: r.title,
|
|
10863
|
-
summary: r.summary,
|
|
10864
|
-
icon: r.icon,
|
|
10865
|
-
type: r.type
|
|
10866
|
-
})),
|
|
10867
|
-
onRemove: (_, fullId) => chat.removeSessionResource(fullId),
|
|
10868
|
-
disabled: disableInput
|
|
10869
|
-
}
|
|
10870
|
-
),
|
|
10871
|
-
resourcePicker.attachedResources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10872
|
-
AttachedResourceTags,
|
|
10873
|
-
{
|
|
10874
|
-
resources: resourcePicker.attachedResources,
|
|
10875
|
-
onRemove: resourcePicker.detachResource,
|
|
10876
|
-
disabled: disableInput
|
|
10877
|
-
}
|
|
10878
|
-
)
|
|
10879
|
-
] }),
|
|
10880
|
-
inputElement
|
|
10888
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative", children: [
|
|
10889
|
+
contextTagsOverlay,
|
|
10890
|
+
inputElement
|
|
10891
|
+
] })
|
|
10881
10892
|
] });
|
|
10882
10893
|
})()
|
|
10883
10894
|
]
|
package/dist/renderer/index.mjs
CHANGED
|
@@ -10721,6 +10721,39 @@ var CompactChat = memo18(function CompactChat2({
|
|
|
10721
10721
|
leftSlot: addResourceButtonSlot
|
|
10722
10722
|
}
|
|
10723
10723
|
);
|
|
10724
|
+
const hasContextTags = chat.sessionResources.length > 0 || resourcePicker.attachedResources.length > 0;
|
|
10725
|
+
const contextTagsOverlay = hasContextTags ? /* @__PURE__ */ jsx26(
|
|
10726
|
+
"div",
|
|
10727
|
+
{
|
|
10728
|
+
className: "pointer-events-none absolute left-0 right-0 z-10",
|
|
10729
|
+
style: { bottom: "calc(100% + 8px)" },
|
|
10730
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
|
|
10731
|
+
chat.sessionResources.length > 0 && /* @__PURE__ */ jsx26("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx26(
|
|
10732
|
+
AttachedResourceTags,
|
|
10733
|
+
{
|
|
10734
|
+
resources: chat.sessionResources.map((r) => ({
|
|
10735
|
+
providerId: r.appName,
|
|
10736
|
+
resourceId: r.fullId,
|
|
10737
|
+
title: r.title,
|
|
10738
|
+
summary: r.summary,
|
|
10739
|
+
icon: r.icon,
|
|
10740
|
+
type: r.type
|
|
10741
|
+
})),
|
|
10742
|
+
onRemove: (_, fullId) => chat.removeSessionResource(fullId),
|
|
10743
|
+
disabled: disableInput
|
|
10744
|
+
}
|
|
10745
|
+
) }),
|
|
10746
|
+
resourcePicker.attachedResources.length > 0 && /* @__PURE__ */ jsx26("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx26(
|
|
10747
|
+
AttachedResourceTags,
|
|
10748
|
+
{
|
|
10749
|
+
resources: resourcePicker.attachedResources,
|
|
10750
|
+
onRemove: resourcePicker.detachResource,
|
|
10751
|
+
disabled: disableInput
|
|
10752
|
+
}
|
|
10753
|
+
) })
|
|
10754
|
+
] })
|
|
10755
|
+
}
|
|
10756
|
+
) : null;
|
|
10724
10757
|
if (shouldRenderInputExternally && portalContainerRef.current) {
|
|
10725
10758
|
return createPortal(inputElement, portalContainerRef.current);
|
|
10726
10759
|
}
|
|
@@ -10780,32 +10813,10 @@ var CompactChat = memo18(function CompactChat2({
|
|
|
10780
10813
|
}
|
|
10781
10814
|
}
|
|
10782
10815
|
),
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
resources: chat.sessionResources.map((r) => ({
|
|
10788
|
-
providerId: r.appName,
|
|
10789
|
-
resourceId: r.fullId,
|
|
10790
|
-
title: r.title,
|
|
10791
|
-
summary: r.summary,
|
|
10792
|
-
icon: r.icon,
|
|
10793
|
-
type: r.type
|
|
10794
|
-
})),
|
|
10795
|
-
onRemove: (_, fullId) => chat.removeSessionResource(fullId),
|
|
10796
|
-
disabled: disableInput
|
|
10797
|
-
}
|
|
10798
|
-
),
|
|
10799
|
-
resourcePicker.attachedResources.length > 0 && /* @__PURE__ */ jsx26(
|
|
10800
|
-
AttachedResourceTags,
|
|
10801
|
-
{
|
|
10802
|
-
resources: resourcePicker.attachedResources,
|
|
10803
|
-
onRemove: resourcePicker.detachResource,
|
|
10804
|
-
disabled: disableInput
|
|
10805
|
-
}
|
|
10806
|
-
)
|
|
10807
|
-
] }),
|
|
10808
|
-
inputElement
|
|
10816
|
+
/* @__PURE__ */ jsxs20("div", { className: "relative", children: [
|
|
10817
|
+
contextTagsOverlay,
|
|
10818
|
+
inputElement
|
|
10819
|
+
] })
|
|
10809
10820
|
] });
|
|
10810
10821
|
})()
|
|
10811
10822
|
]
|