dsh-side-chat-plus 0.4.2 → 0.4.3
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/CHANGELOG.md +19 -0
- package/README.md +3 -3
- package/README.zh.md +3 -3
- package/dsh.plugin.json +1 -1
- package/lib/client-registry.js +102 -92
- package/lib/client-registry.js.map +1 -1
- package/lib/client.js +105 -95
- package/lib/client.js.map +1 -1
- package/lib/index.js +27 -16
- package/package.json +20 -20
- package/src/client/index.tsx +25 -3
- package/src/index.ts +24 -6
package/lib/client.js
CHANGED
|
@@ -20,14 +20,14 @@ window.__ModuleLoader__.load({
|
|
|
20
20
|
document.head.appendChild(tag);
|
|
21
21
|
}
|
|
22
22
|
var AttachmentRail_module_css_default = {
|
|
23
|
+
"thumbnail": "J5tleW_thumbnail",
|
|
23
24
|
"arrowRight": "J5tleW_arrowRight",
|
|
24
|
-
"root": "J5tleW_root",
|
|
25
|
-
"rail": "J5tleW_rail",
|
|
26
25
|
"arrow": "J5tleW_arrow",
|
|
27
|
-
"
|
|
26
|
+
"arrowLeft": "J5tleW_arrowLeft",
|
|
28
27
|
"remove": "J5tleW_remove",
|
|
29
28
|
"item": "J5tleW_item",
|
|
30
|
-
"
|
|
29
|
+
"root": "J5tleW_root",
|
|
30
|
+
"rail": "J5tleW_rail"
|
|
31
31
|
};
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/client/attachments/AttachmentRail.tsx
|
|
@@ -173,11 +173,11 @@ window.__ModuleLoader__.load({
|
|
|
173
173
|
document.head.appendChild(tag);
|
|
174
174
|
}
|
|
175
175
|
var DropOverlay_module_css_default = {
|
|
176
|
+
"title": "_9H6qrq_title",
|
|
177
|
+
"mask": "_9H6qrq_mask",
|
|
176
178
|
"desc": "_9H6qrq_desc",
|
|
177
179
|
"wrap": "_9H6qrq_wrap",
|
|
178
|
-
"illustration": "_9H6qrq_illustration"
|
|
179
|
-
"title": "_9H6qrq_title",
|
|
180
|
-
"mask": "_9H6qrq_mask"
|
|
180
|
+
"illustration": "_9H6qrq_illustration"
|
|
181
181
|
};
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region src/client/attachments/DropOverlay.tsx
|
|
@@ -320,10 +320,10 @@ window.__ModuleLoader__.load({
|
|
|
320
320
|
document.head.appendChild(tag);
|
|
321
321
|
}
|
|
322
322
|
var ImageLightbox_module_css_default = {
|
|
323
|
-
"backdrop": "_5IyjUq_backdrop",
|
|
324
323
|
"close": "_5IyjUq_close",
|
|
325
|
-
"
|
|
326
|
-
"mask": "_5IyjUq_mask"
|
|
324
|
+
"backdrop": "_5IyjUq_backdrop",
|
|
325
|
+
"mask": "_5IyjUq_mask",
|
|
326
|
+
"image": "_5IyjUq_image"
|
|
327
327
|
};
|
|
328
328
|
//#endregion
|
|
329
329
|
//#region src/client/attachments/ImageLightbox.tsx
|
|
@@ -388,10 +388,10 @@ window.__ModuleLoader__.load({
|
|
|
388
388
|
document.head.appendChild(tag);
|
|
389
389
|
}
|
|
390
390
|
var MessageImage_module_css_default = {
|
|
391
|
-
"loading": "_1H6WSq_loading",
|
|
392
|
-
"error": "_1H6WSq_error",
|
|
393
391
|
"gallery": "_1H6WSq_gallery",
|
|
394
|
-
"frame": "_1H6WSq_frame"
|
|
392
|
+
"frame": "_1H6WSq_frame",
|
|
393
|
+
"loading": "_1H6WSq_loading",
|
|
394
|
+
"error": "_1H6WSq_error"
|
|
395
395
|
};
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/client/attachments/MessageImage.tsx
|
|
@@ -760,101 +760,101 @@ window.__ModuleLoader__.load({
|
|
|
760
760
|
document.head.appendChild(tag);
|
|
761
761
|
}
|
|
762
762
|
var client_module_css_default = {
|
|
763
|
-
"
|
|
764
|
-
"
|
|
765
|
-
"
|
|
766
|
-
"questionToggle": "yw4T5a_questionToggle",
|
|
767
|
-
"modelCellValue": "yw4T5a_modelCellValue",
|
|
768
|
-
"questionDeleteAll": "yw4T5a_questionDeleteAll",
|
|
769
|
-
"panelTitle": "yw4T5a_panelTitle",
|
|
763
|
+
"panelTextarea": "yw4T5a_panelTextarea",
|
|
764
|
+
"settingsSection": "yw4T5a_settingsSection",
|
|
765
|
+
"settingsRowDesc": "yw4T5a_settingsRowDesc",
|
|
770
766
|
"messageInsertButton": "yw4T5a_messageInsertButton",
|
|
771
|
-
"
|
|
767
|
+
"panelHeader": "yw4T5a_panelHeader",
|
|
768
|
+
"panelList": "yw4T5a_panelList",
|
|
769
|
+
"panelTitle": "yw4T5a_panelTitle",
|
|
770
|
+
"questionOptionDesc": "yw4T5a_questionOptionDesc",
|
|
771
|
+
"panelRunning": "yw4T5a_panelRunning",
|
|
772
|
+
"reasoningBody": "yw4T5a_reasoningBody",
|
|
773
|
+
"modelSelectMenu": "yw4T5a_modelSelectMenu",
|
|
774
|
+
"modelDescription": "yw4T5a_modelDescription",
|
|
775
|
+
"settingsRowTitle": "yw4T5a_settingsRowTitle",
|
|
776
|
+
"panelAttachment": "yw4T5a_panelAttachment",
|
|
777
|
+
"settingsBringMode": "yw4T5a_settingsBringMode",
|
|
778
|
+
"panelAttachmentText": "yw4T5a_panelAttachmentText",
|
|
779
|
+
"questionItem": "yw4T5a_questionItem",
|
|
780
|
+
"questionBody": "yw4T5a_questionBody",
|
|
781
|
+
"selectionMenu": "yw4T5a_selectionMenu",
|
|
782
|
+
"panelHeaderActions": "yw4T5a_panelHeaderActions",
|
|
783
|
+
"panelListItemDot": "yw4T5a_panelListItemDot",
|
|
784
|
+
"questionHeaderText": "yw4T5a_questionHeaderText",
|
|
785
|
+
"panelListItemLabel": "yw4T5a_panelListItemLabel",
|
|
786
|
+
"panelToolbar": "yw4T5a_panelToolbar",
|
|
787
|
+
"modelOptionCopy": "yw4T5a_modelOptionCopy",
|
|
788
|
+
"panel": "yw4T5a_panel",
|
|
789
|
+
"panelFooter": "yw4T5a_panelFooter",
|
|
772
790
|
"primary": "yw4T5a_primary",
|
|
773
|
-
"panelRunningPulse": "yw4T5a_panelRunningPulse",
|
|
774
|
-
"panelConflictHidden": "yw4T5a_panelConflictHidden",
|
|
775
|
-
"panelResize": "yw4T5a_panelResize",
|
|
776
|
-
"modelSelectLabel": "yw4T5a_modelSelectLabel",
|
|
777
791
|
"modelGroup": "yw4T5a_modelGroup",
|
|
778
|
-
"
|
|
779
|
-
"
|
|
780
|
-
"
|
|
781
|
-
"
|
|
792
|
+
"settingsToggle": "yw4T5a_settingsToggle",
|
|
793
|
+
"modelSelectLabel": "yw4T5a_modelSelectLabel",
|
|
794
|
+
"questionDetail": "yw4T5a_questionDetail",
|
|
795
|
+
"selectionButton": "yw4T5a_selectionButton",
|
|
796
|
+
"panelEmbedded": "yw4T5a_panelEmbedded",
|
|
797
|
+
"questionDeleteAll": "yw4T5a_questionDeleteAll",
|
|
798
|
+
"questionHeaderActions": "yw4T5a_questionHeaderActions",
|
|
799
|
+
"collapsedHandle": "yw4T5a_collapsedHandle",
|
|
800
|
+
"questionItemCollapsed": "yw4T5a_questionItemCollapsed",
|
|
801
|
+
"panelError": "yw4T5a_panelError",
|
|
802
|
+
"modelEmpty": "yw4T5a_modelEmpty",
|
|
803
|
+
"panelTranscript": "yw4T5a_panelTranscript",
|
|
804
|
+
"panelEmpty": "yw4T5a_panelEmpty",
|
|
805
|
+
"panelConflictHidden": "yw4T5a_panelConflictHidden",
|
|
782
806
|
"settingsBringOption": "yw4T5a_settingsBringOption",
|
|
807
|
+
"questionOption": "yw4T5a_questionOption",
|
|
808
|
+
"panelResize": "yw4T5a_panelResize",
|
|
809
|
+
"questionBlockActions": "yw4T5a_questionBlockActions",
|
|
810
|
+
"panelListItemRemove": "yw4T5a_panelListItemRemove",
|
|
811
|
+
"messageAssistant": "yw4T5a_messageAssistant",
|
|
783
812
|
"panelAttachmentRail": "yw4T5a_panelAttachmentRail",
|
|
813
|
+
"modelCellValue": "yw4T5a_modelCellValue",
|
|
814
|
+
"questionHeader": "yw4T5a_questionHeader",
|
|
784
815
|
"questionOptionText": "yw4T5a_questionOptionText",
|
|
785
|
-
"
|
|
786
|
-
"
|
|
787
|
-
"
|
|
788
|
-
"
|
|
789
|
-
"
|
|
816
|
+
"panelIconButton": "yw4T5a_panelIconButton",
|
|
817
|
+
"messageActions": "yw4T5a_messageActions",
|
|
818
|
+
"modelCheck": "yw4T5a_modelCheck",
|
|
819
|
+
"questionOptionLabel": "yw4T5a_questionOptionLabel",
|
|
820
|
+
"modelSelectEffort": "yw4T5a_modelSelectEffort",
|
|
821
|
+
"modelOption": "yw4T5a_modelOption",
|
|
822
|
+
"modelSelect": "yw4T5a_modelSelect",
|
|
790
823
|
"modelCellLabel": "yw4T5a_modelCellLabel",
|
|
791
|
-
"
|
|
792
|
-
"
|
|
793
|
-
"
|
|
794
|
-
"
|
|
795
|
-
"panelToolbar": "yw4T5a_panelToolbar",
|
|
796
|
-
"modelCellChevron": "yw4T5a_modelCellChevron",
|
|
797
|
-
"settingsRowText": "yw4T5a_settingsRowText",
|
|
824
|
+
"messageUser": "yw4T5a_messageUser",
|
|
825
|
+
"panelDispose": "yw4T5a_panelDispose",
|
|
826
|
+
"panelListItemActive": "yw4T5a_panelListItemActive",
|
|
827
|
+
"questionBringButton": "yw4T5a_questionBringButton",
|
|
798
828
|
"modelOptionSelected": "yw4T5a_modelOptionSelected",
|
|
799
|
-
"
|
|
800
|
-
"panelAttachment": "yw4T5a_panelAttachment",
|
|
801
|
-
"panelList": "yw4T5a_panelList",
|
|
829
|
+
"panelRunningDot": "yw4T5a_panelRunningDot",
|
|
802
830
|
"questionDelete": "yw4T5a_questionDelete",
|
|
803
831
|
"panelListItemRow": "yw4T5a_panelListItemRow",
|
|
804
|
-
"
|
|
805
|
-
"
|
|
806
|
-
"questionBody": "yw4T5a_questionBody",
|
|
807
|
-
"panelTextarea": "yw4T5a_panelTextarea",
|
|
808
|
-
"panelListItemDot": "yw4T5a_panelListItemDot",
|
|
809
|
-
"reasoningBody": "yw4T5a_reasoningBody",
|
|
810
|
-
"panelIconButton": "yw4T5a_panelIconButton",
|
|
811
|
-
"questionHeaderText": "yw4T5a_questionHeaderText",
|
|
832
|
+
"messageUserText": "yw4T5a_messageUserText",
|
|
833
|
+
"modelGroups": "yw4T5a_modelGroups",
|
|
812
834
|
"panelListDeleteAll": "yw4T5a_panelListDeleteAll",
|
|
813
|
-
"
|
|
835
|
+
"settingsRow": "yw4T5a_settingsRow",
|
|
836
|
+
"panelClose": "yw4T5a_panelClose",
|
|
837
|
+
"modelName": "yw4T5a_modelName",
|
|
838
|
+
"settingsRowText": "yw4T5a_settingsRowText",
|
|
839
|
+
"settingsBringOptionActive": "yw4T5a_settingsBringOptionActive",
|
|
814
840
|
"panelComposer": "yw4T5a_panelComposer",
|
|
815
|
-
"
|
|
816
|
-
"
|
|
841
|
+
"panelLookup": "yw4T5a_panelLookup",
|
|
842
|
+
"questionBlock": "yw4T5a_questionBlock",
|
|
843
|
+
"modelCell": "yw4T5a_modelCell",
|
|
844
|
+
"questionFab": "yw4T5a_questionFab",
|
|
817
845
|
"panelListItem": "yw4T5a_panelListItem",
|
|
818
|
-
"
|
|
819
|
-
"
|
|
820
|
-
"modelSelectTrigger": "yw4T5a_modelSelectTrigger",
|
|
821
|
-
"questionHeaderActions": "yw4T5a_questionHeaderActions",
|
|
822
|
-
"panelHeader": "yw4T5a_panelHeader",
|
|
823
|
-
"selectionButton": "yw4T5a_selectionButton",
|
|
846
|
+
"questionToggle": "yw4T5a_questionToggle",
|
|
847
|
+
"panelRunningPulse": "yw4T5a_panelRunningPulse",
|
|
824
848
|
"chevronOpen": "yw4T5a_chevronOpen",
|
|
825
|
-
"questionFab": "yw4T5a_questionFab",
|
|
826
|
-
"questionFabDot": "yw4T5a_questionFabDot",
|
|
827
|
-
"questionBlock": "yw4T5a_questionBlock",
|
|
828
|
-
"collapsedHandle": "yw4T5a_collapsedHandle",
|
|
829
|
-
"questionBringButton": "yw4T5a_questionBringButton",
|
|
830
|
-
"panelRunning": "yw4T5a_panelRunning",
|
|
831
|
-
"modelSelectEffort": "yw4T5a_modelSelectEffort",
|
|
832
|
-
"modelSelectMenu": "yw4T5a_modelSelectMenu",
|
|
833
|
-
"selectionMenu": "yw4T5a_selectionMenu",
|
|
834
|
-
"panelClose": "yw4T5a_panelClose",
|
|
835
|
-
"modelGroupTitle": "yw4T5a_modelGroupTitle",
|
|
836
|
-
"modelOption": "yw4T5a_modelOption",
|
|
837
|
-
"settingsRow": "yw4T5a_settingsRow",
|
|
838
849
|
"panelListActions": "yw4T5a_panelListActions",
|
|
850
|
+
"modelCellChevron": "yw4T5a_modelCellChevron",
|
|
851
|
+
"panelAttachmentRemove": "yw4T5a_panelAttachmentRemove",
|
|
852
|
+
"modelSelectTrigger": "yw4T5a_modelSelectTrigger",
|
|
853
|
+
"panelRunningClock": "yw4T5a_panelRunningClock",
|
|
839
854
|
"settingsPromptInput": "yw4T5a_settingsPromptInput",
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
"
|
|
843
|
-
"questionDetail": "yw4T5a_questionDetail",
|
|
844
|
-
"settingsRowTitle": "yw4T5a_settingsRowTitle",
|
|
845
|
-
"questionHeader": "yw4T5a_questionHeader",
|
|
846
|
-
"panelTranscript": "yw4T5a_panelTranscript",
|
|
847
|
-
"modelEmpty": "yw4T5a_modelEmpty",
|
|
848
|
-
"messageUser": "yw4T5a_messageUser",
|
|
849
|
-
"settingsBringMode": "yw4T5a_settingsBringMode",
|
|
850
|
-
"messageActions": "yw4T5a_messageActions",
|
|
851
|
-
"modelOptionCopy": "yw4T5a_modelOptionCopy",
|
|
852
|
-
"settingsRowDesc": "yw4T5a_settingsRowDesc",
|
|
853
|
-
"panelEmpty": "yw4T5a_panelEmpty",
|
|
854
|
-
"panelListItemLabel": "yw4T5a_panelListItemLabel",
|
|
855
|
-
"panelError": "yw4T5a_panelError",
|
|
856
|
-
"panel": "yw4T5a_panel",
|
|
857
|
-
"panelEmbedded": "yw4T5a_panelEmbedded"
|
|
855
|
+
"modelGroupTitle": "yw4T5a_modelGroupTitle",
|
|
856
|
+
"reasoningSummary": "yw4T5a_reasoningSummary",
|
|
857
|
+
"questionFabDot": "yw4T5a_questionFabDot"
|
|
858
858
|
};
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region \0dsh-css:/home/runner/work/dsh-side-chat/dsh-side-chat/src/client/layout.css.mjs
|
|
@@ -916,6 +916,7 @@ window.__ModuleLoader__.load({
|
|
|
916
916
|
let prefs = { ...SUBCHAT_PREFS_DEFAULTS };
|
|
917
917
|
let mainQuestion = null;
|
|
918
918
|
let dismissedQuestionIds = [];
|
|
919
|
+
let dockAvailable = true;
|
|
919
920
|
const bySession = /* @__PURE__ */ new Map();
|
|
920
921
|
const listeners = /* @__PURE__ */ new Set();
|
|
921
922
|
let dockLaunch = null;
|
|
@@ -925,7 +926,8 @@ window.__ModuleLoader__.load({
|
|
|
925
926
|
anchor,
|
|
926
927
|
prefs,
|
|
927
928
|
mainQuestion,
|
|
928
|
-
dismissedQuestionIds
|
|
929
|
+
dismissedQuestionIds,
|
|
930
|
+
dockAvailable
|
|
929
931
|
};
|
|
930
932
|
const notify = () => {
|
|
931
933
|
snapshot = {
|
|
@@ -934,7 +936,8 @@ window.__ModuleLoader__.load({
|
|
|
934
936
|
anchor,
|
|
935
937
|
prefs,
|
|
936
938
|
mainQuestion,
|
|
937
|
-
dismissedQuestionIds
|
|
939
|
+
dismissedQuestionIds,
|
|
940
|
+
dockAvailable
|
|
938
941
|
};
|
|
939
942
|
for (const fn of [...listeners]) fn();
|
|
940
943
|
};
|
|
@@ -1001,6 +1004,11 @@ window.__ModuleLoader__.load({
|
|
|
1001
1004
|
setDockLaunch(fn) {
|
|
1002
1005
|
dockLaunch = fn;
|
|
1003
1006
|
},
|
|
1007
|
+
setDockAvailable(available) {
|
|
1008
|
+
if (available === dockAvailable) return;
|
|
1009
|
+
dockAvailable = available;
|
|
1010
|
+
notify();
|
|
1011
|
+
},
|
|
1004
1012
|
setActive(childId) {
|
|
1005
1013
|
panel = {
|
|
1006
1014
|
...panel,
|
|
@@ -2652,7 +2660,7 @@ window.__ModuleLoader__.load({
|
|
|
2652
2660
|
props.store.openPanel(snap.panel.parentSessionId);
|
|
2653
2661
|
}
|
|
2654
2662
|
}),
|
|
2655
|
-
snap.prefs.panelHome === "floating" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidechatPanel, {
|
|
2663
|
+
(snap.prefs.panelHome === "floating" || !snap.dockAvailable) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidechatPanel, {
|
|
2656
2664
|
store: props.store,
|
|
2657
2665
|
t: props.t,
|
|
2658
2666
|
formatDuration: props.formatDuration,
|
|
@@ -3133,9 +3141,11 @@ window.__ModuleLoader__.load({
|
|
|
3133
3141
|
const sidebarRightTabs = ctx.get("sidebarRightTabs") ?? sidebarRight?.tabs;
|
|
3134
3142
|
if (sidebarRight === void 0 || sidebarRightTabs === void 0) {
|
|
3135
3143
|
phase = "unavailable";
|
|
3144
|
+
store.setDockAvailable(false);
|
|
3136
3145
|
store.patch({ error: translate(activeLocale, "dock.unavailable") });
|
|
3137
3146
|
return;
|
|
3138
3147
|
}
|
|
3148
|
+
store.setDockAvailable(true);
|
|
3139
3149
|
const dockT = (key) => translate(activeLocale, key);
|
|
3140
3150
|
const disposeType = sidebarRightTabs.register({
|
|
3141
3151
|
id: SIDEBAR_TAB_ID,
|