dsh-side-chat-plus 0.4.1-alpha.1 → 0.4.2

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 CHANGED
@@ -1,3 +1,21 @@
1
+ # 0.4.2
2
+
3
+ - 0.4.1 被 CI 从「修复提交之前」的提交打包发布(tag 先指向旧提交、随后才被强制更新),因此 npm 上的 0.4.1
4
+ **不含**设置 namespace 修复,设置页偏好读写仍然失效。0.4.2 是同一份修复的正式发布,修复内容见下一节。
5
+ 请使用 0.4.2 或更高版本。
6
+
7
+ # 0.4.1
8
+
9
+ - 修复「插件设置页偏好读写失效」的问题(0.4.1-alpha.1 引入)。此前插件从 `ctx.entry` 取自身 Loader entry id,
10
+ 但 Cordis 的受控 Context 对未声明的属性会直接抛错(`cannot get property "entry" without inject`),
11
+ `ctx.inject(['settings'], …)` 回调在绑定设置服务前就中断,于是 `settings.get` 恒返回空值、
12
+ `settings.update` 恒返回 503 `settings-rejected`,设置页里的偏好保存静默失败。
13
+ 现在改为从拥有该 fiber 的 entry 上取 namespace(`ctx.fiber.entry.options.id`,与官方 llm 插件一致),
14
+ 并以 `loader.locate(fiber)` 作为兜底。
15
+ - 已在真实的 Loader + config-editor + settings 组合中验证:`settings.describe()` 能列出本插件的 volatile 字段,
16
+ `/sidechat/api/settings.get` 返回当前偏好与 revision,`settings.update` 能到达设置服务并带正确的 namespace。
17
+ - 新增 3 条设置 namespace 回归测试(fiber entry、裸挂载时降级为“偏好不可用但不报错”、loader 兜底)。
18
+
1
19
  # 0.4.1-alpha.1
2
20
 
3
21
  - 适配 DSH `0.1.7-alpha.1`,最低版本声明同步为 `^0.1.7-0`。
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-side-chat-plus",
3
- "version": "0.4.1-alpha.1",
3
+ "version": "0.4.2",
4
4
  "main": "./lib/index.js",
5
5
  "description": "选中对话内容 → 在侧边聊天中提问:按主会话隔离的隐藏普通会话,继承模型/思考难度/权限(可调),带「需要时查工作区/主会话」开关;可停靠到新版右侧栏或使用经典浮动面板。",
6
6
  "engines": {
@@ -21,13 +21,13 @@ window.__ModuleLoader__.load({
21
21
  }
22
22
  var AttachmentRail_module_css_default = {
23
23
  "root": "J5tleW_root",
24
- "remove": "J5tleW_remove",
25
- "thumbnail": "J5tleW_thumbnail",
26
- "arrowLeft": "J5tleW_arrowLeft",
27
- "arrow": "J5tleW_arrow",
28
24
  "rail": "J5tleW_rail",
25
+ "thumbnail": "J5tleW_thumbnail",
29
26
  "item": "J5tleW_item",
30
- "arrowRight": "J5tleW_arrowRight"
27
+ "arrow": "J5tleW_arrow",
28
+ "arrowRight": "J5tleW_arrowRight",
29
+ "arrowLeft": "J5tleW_arrowLeft",
30
+ "remove": "J5tleW_remove"
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
- "desc": "_9H6qrq_desc",
177
- "illustration": "_9H6qrq_illustration",
178
176
  "mask": "_9H6qrq_mask",
177
+ "title": "_9H6qrq_title",
179
178
  "wrap": "_9H6qrq_wrap",
180
- "title": "_9H6qrq_title"
179
+ "desc": "_9H6qrq_desc",
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",
323
324
  "close": "_5IyjUq_close",
324
325
  "image": "_5IyjUq_image",
325
- "mask": "_5IyjUq_mask",
326
- "backdrop": "_5IyjUq_backdrop"
326
+ "mask": "_5IyjUq_mask"
327
327
  };
328
328
  //#endregion
329
329
  //#region src/client/attachments/ImageLightbox.tsx
@@ -388,9 +388,9 @@ window.__ModuleLoader__.load({
388
388
  document.head.appendChild(tag);
389
389
  }
390
390
  var MessageImage_module_css_default = {
391
- "frame": "_1H6WSq_frame",
392
- "error": "_1H6WSq_error",
393
391
  "gallery": "_1H6WSq_gallery",
392
+ "error": "_1H6WSq_error",
393
+ "frame": "_1H6WSq_frame",
394
394
  "loading": "_1H6WSq_loading"
395
395
  };
396
396
  //#endregion
@@ -760,101 +760,101 @@ window.__ModuleLoader__.load({
760
760
  document.head.appendChild(tag);
761
761
  }
762
762
  var client_module_css_default = {
763
- "modelCellChevron": "yw4T5a_modelCellChevron",
764
- "panelRunningDot": "yw4T5a_panelRunningDot",
765
- "panelHeader": "yw4T5a_panelHeader",
766
- "messageInsertButton": "yw4T5a_messageInsertButton",
763
+ "questionDeleteAll": "yw4T5a_questionDeleteAll",
764
+ "selectionButton": "yw4T5a_selectionButton",
765
+ "modelCellLabel": "yw4T5a_modelCellLabel",
766
+ "modelSelectTrigger": "yw4T5a_modelSelectTrigger",
767
+ "questionOptionText": "yw4T5a_questionOptionText",
768
+ "panelListItemRemove": "yw4T5a_panelListItemRemove",
769
+ "panelListItemLabel": "yw4T5a_panelListItemLabel",
770
+ "messageUser": "yw4T5a_messageUser",
771
+ "modelSelectLabel": "yw4T5a_modelSelectLabel",
767
772
  "panelComposer": "yw4T5a_panelComposer",
768
- "questionOptionLabel": "yw4T5a_questionOptionLabel",
769
- "panelListItem": "yw4T5a_panelListItem",
770
- "modelGroups": "yw4T5a_modelGroups",
773
+ "settingsBringOption": "yw4T5a_settingsBringOption",
774
+ "modelSelectMenu": "yw4T5a_modelSelectMenu",
775
+ "panelListItemDot": "yw4T5a_panelListItemDot",
776
+ "modelCheck": "yw4T5a_modelCheck",
777
+ "panelIconButton": "yw4T5a_panelIconButton",
778
+ "questionOptionDesc": "yw4T5a_questionOptionDesc",
779
+ "chevronOpen": "yw4T5a_chevronOpen",
771
780
  "questionDetail": "yw4T5a_questionDetail",
781
+ "questionFab": "yw4T5a_questionFab",
782
+ "questionHeaderActions": "yw4T5a_questionHeaderActions",
783
+ "reasoningSummary": "yw4T5a_reasoningSummary",
784
+ "panelTranscript": "yw4T5a_panelTranscript",
785
+ "modelCellChevron": "yw4T5a_modelCellChevron",
786
+ "panelListDeleteAll": "yw4T5a_panelListDeleteAll",
787
+ "settingsSection": "yw4T5a_settingsSection",
788
+ "modelGroupTitle": "yw4T5a_modelGroupTitle",
789
+ "settingsRowTitle": "yw4T5a_settingsRowTitle",
790
+ "panelListActions": "yw4T5a_panelListActions",
791
+ "panelRunningPulse": "yw4T5a_panelRunningPulse",
792
+ "collapsedHandle": "yw4T5a_collapsedHandle",
793
+ "modelGroup": "yw4T5a_modelGroup",
772
794
  "panelConflictHidden": "yw4T5a_panelConflictHidden",
773
- "panelEmbedded": "yw4T5a_panelEmbedded",
774
- "panelListItemRow": "yw4T5a_panelListItemRow",
795
+ "questionHeader": "yw4T5a_questionHeader",
796
+ "modelOption": "yw4T5a_modelOption",
797
+ "modelDescription": "yw4T5a_modelDescription",
775
798
  "modelSelect": "yw4T5a_modelSelect",
776
- "questionBringButton": "yw4T5a_questionBringButton",
777
- "panelTitle": "yw4T5a_panelTitle",
778
- "panelListItemActive": "yw4T5a_panelListItemActive",
779
- "messageAssistant": "yw4T5a_messageAssistant",
780
- "reasoningBody": "yw4T5a_reasoningBody",
781
- "questionOptionDesc": "yw4T5a_questionOptionDesc",
799
+ "panelAttachment": "yw4T5a_panelAttachment",
800
+ "settingsBringOptionActive": "yw4T5a_settingsBringOptionActive",
801
+ "questionFabDot": "yw4T5a_questionFabDot",
802
+ "questionBlock": "yw4T5a_questionBlock",
803
+ "modelOptionCopy": "yw4T5a_modelOptionCopy",
804
+ "settingsPromptInput": "yw4T5a_settingsPromptInput",
782
805
  "questionOption": "yw4T5a_questionOption",
783
- "questionHeaderText": "yw4T5a_questionHeaderText",
806
+ "messageActions": "yw4T5a_messageActions",
807
+ "panelFooter": "yw4T5a_panelFooter",
784
808
  "modelCell": "yw4T5a_modelCell",
785
- "questionToggle": "yw4T5a_questionToggle",
786
- "panelListDeleteAll": "yw4T5a_panelListDeleteAll",
787
- "modelOption": "yw4T5a_modelOption",
788
- "primary": "yw4T5a_primary",
789
- "modelDescription": "yw4T5a_modelDescription",
790
- "panelListItemDot": "yw4T5a_panelListItemDot",
791
- "modelSelectMenu": "yw4T5a_modelSelectMenu",
809
+ "panelToolbar": "yw4T5a_panelToolbar",
810
+ "questionBlockActions": "yw4T5a_questionBlockActions",
811
+ "panelList": "yw4T5a_panelList",
812
+ "modelGroups": "yw4T5a_modelGroups",
813
+ "questionOptionLabel": "yw4T5a_questionOptionLabel",
792
814
  "modelOptionSelected": "yw4T5a_modelOptionSelected",
793
- "modelOptionCopy": "yw4T5a_modelOptionCopy",
794
- "panelClose": "yw4T5a_panelClose",
795
- "questionHeaderActions": "yw4T5a_questionHeaderActions",
815
+ "primary": "yw4T5a_primary",
816
+ "messageAssistant": "yw4T5a_messageAssistant",
817
+ "questionBody": "yw4T5a_questionBody",
796
818
  "panel": "yw4T5a_panel",
797
- "modelEmpty": "yw4T5a_modelEmpty",
798
- "questionFabDot": "yw4T5a_questionFabDot",
799
- "settingsRowDesc": "yw4T5a_settingsRowDesc",
800
- "panelToolbar": "yw4T5a_panelToolbar",
801
- "settingsToggle": "yw4T5a_settingsToggle",
802
- "panelTextarea": "yw4T5a_panelTextarea",
803
- "settingsBringMode": "yw4T5a_settingsBringMode",
804
- "panelAttachment": "yw4T5a_panelAttachment",
805
- "chevronOpen": "yw4T5a_chevronOpen",
806
- "settingsBringOption": "yw4T5a_settingsBringOption",
807
- "questionDelete": "yw4T5a_questionDelete",
808
- "questionFab": "yw4T5a_questionFab",
819
+ "panelHeaderActions": "yw4T5a_panelHeaderActions",
820
+ "settingsRowText": "yw4T5a_settingsRowText",
821
+ "questionHeaderText": "yw4T5a_questionHeaderText",
822
+ "questionItem": "yw4T5a_questionItem",
809
823
  "selectionMenu": "yw4T5a_selectionMenu",
810
- "questionBlock": "yw4T5a_questionBlock",
811
- "questionDeleteAll": "yw4T5a_questionDeleteAll",
812
- "questionOptionText": "yw4T5a_questionOptionText",
813
- "panelListItemLabel": "yw4T5a_panelListItemLabel",
814
824
  "panelRunningClock": "yw4T5a_panelRunningClock",
815
- "panelIconButton": "yw4T5a_panelIconButton",
816
- "panelTranscript": "yw4T5a_panelTranscript",
817
- "panelDispose": "yw4T5a_panelDispose",
825
+ "reasoningBody": "yw4T5a_reasoningBody",
826
+ "modelCellValue": "yw4T5a_modelCellValue",
827
+ "settingsRowDesc": "yw4T5a_settingsRowDesc",
818
828
  "panelAttachmentRail": "yw4T5a_panelAttachmentRail",
819
- "modelSelectLabel": "yw4T5a_modelSelectLabel",
829
+ "panelHeader": "yw4T5a_panelHeader",
820
830
  "settingsRow": "yw4T5a_settingsRow",
821
- "modelGroup": "yw4T5a_modelGroup",
822
- "panelFooter": "yw4T5a_panelFooter",
823
- "modelCheck": "yw4T5a_modelCheck",
824
- "panelHeaderActions": "yw4T5a_panelHeaderActions",
825
- "panelAttachmentRemove": "yw4T5a_panelAttachmentRemove",
826
- "panelError": "yw4T5a_panelError",
827
- "questionHeader": "yw4T5a_questionHeader",
828
- "selectionButton": "yw4T5a_selectionButton",
829
- "panelRunning": "yw4T5a_panelRunning",
830
- "panelEmpty": "yw4T5a_panelEmpty",
831
- "panelRunningPulse": "yw4T5a_panelRunningPulse",
832
- "panelAttachmentText": "yw4T5a_panelAttachmentText",
833
- "modelCellLabel": "yw4T5a_modelCellLabel",
834
- "modelGroupTitle": "yw4T5a_modelGroupTitle",
835
- "settingsRowTitle": "yw4T5a_settingsRowTitle",
836
- "modelSelectTrigger": "yw4T5a_modelSelectTrigger",
837
- "panelListActions": "yw4T5a_panelListActions",
838
- "messageUser": "yw4T5a_messageUser",
839
831
  "messageUserText": "yw4T5a_messageUserText",
840
- "modelCellValue": "yw4T5a_modelCellValue",
841
832
  "modelName": "yw4T5a_modelName",
842
- "messageActions": "yw4T5a_messageActions",
843
- "panelListItemRemove": "yw4T5a_panelListItemRemove",
844
- "settingsBringOptionActive": "yw4T5a_settingsBringOptionActive",
845
- "panelResize": "yw4T5a_panelResize",
846
- "settingsRowText": "yw4T5a_settingsRowText",
847
- "panelList": "yw4T5a_panelList",
848
- "questionBody": "yw4T5a_questionBody",
849
- "settingsPromptInput": "yw4T5a_settingsPromptInput",
850
833
  "questionItemCollapsed": "yw4T5a_questionItemCollapsed",
851
- "questionItem": "yw4T5a_questionItem",
852
834
  "panelLookup": "yw4T5a_panelLookup",
853
- "collapsedHandle": "yw4T5a_collapsedHandle",
854
- "settingsSection": "yw4T5a_settingsSection",
855
- "questionBlockActions": "yw4T5a_questionBlockActions",
835
+ "settingsBringMode": "yw4T5a_settingsBringMode",
836
+ "questionToggle": "yw4T5a_questionToggle",
837
+ "panelListItem": "yw4T5a_panelListItem",
838
+ "panelAttachmentText": "yw4T5a_panelAttachmentText",
839
+ "panelListItemRow": "yw4T5a_panelListItemRow",
840
+ "modelEmpty": "yw4T5a_modelEmpty",
841
+ "panelRunningDot": "yw4T5a_panelRunningDot",
842
+ "questionDelete": "yw4T5a_questionDelete",
843
+ "panelError": "yw4T5a_panelError",
844
+ "panelAttachmentRemove": "yw4T5a_panelAttachmentRemove",
845
+ "panelDispose": "yw4T5a_panelDispose",
846
+ "panelEmbedded": "yw4T5a_panelEmbedded",
847
+ "panelRunning": "yw4T5a_panelRunning",
848
+ "panelTitle": "yw4T5a_panelTitle",
849
+ "panelClose": "yw4T5a_panelClose",
850
+ "panelListItemActive": "yw4T5a_panelListItemActive",
851
+ "messageInsertButton": "yw4T5a_messageInsertButton",
856
852
  "modelSelectEffort": "yw4T5a_modelSelectEffort",
857
- "reasoningSummary": "yw4T5a_reasoningSummary"
853
+ "panelEmpty": "yw4T5a_panelEmpty",
854
+ "panelResize": "yw4T5a_panelResize",
855
+ "questionBringButton": "yw4T5a_questionBringButton",
856
+ "panelTextarea": "yw4T5a_panelTextarea",
857
+ "settingsToggle": "yw4T5a_settingsToggle"
858
858
  };
859
859
  //#endregion
860
860
  //#region \0dsh-css:/home/runner/work/dsh-side-chat/dsh-side-chat/src/client/layout.css.mjs
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
- "arrow": "J5tleW_arrow",
24
- "item": "J5tleW_item",
25
- "rail": "J5tleW_rail",
26
23
  "arrowRight": "J5tleW_arrowRight",
27
- "remove": "J5tleW_remove",
28
24
  "root": "J5tleW_root",
29
- "arrowLeft": "J5tleW_arrowLeft",
30
- "thumbnail": "J5tleW_thumbnail"
25
+ "rail": "J5tleW_rail",
26
+ "arrow": "J5tleW_arrow",
27
+ "thumbnail": "J5tleW_thumbnail",
28
+ "remove": "J5tleW_remove",
29
+ "item": "J5tleW_item",
30
+ "arrowLeft": "J5tleW_arrowLeft"
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
- "mask": "_9H6qrq_mask",
177
- "title": "_9H6qrq_title",
176
+ "desc": "_9H6qrq_desc",
178
177
  "wrap": "_9H6qrq_wrap",
179
178
  "illustration": "_9H6qrq_illustration",
180
- "desc": "_9H6qrq_desc"
179
+ "title": "_9H6qrq_title",
180
+ "mask": "_9H6qrq_mask"
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",
323
324
  "close": "_5IyjUq_close",
324
- "mask": "_5IyjUq_mask",
325
325
  "image": "_5IyjUq_image",
326
- "backdrop": "_5IyjUq_backdrop"
326
+ "mask": "_5IyjUq_mask"
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
- "frame": "_1H6WSq_frame",
392
391
  "loading": "_1H6WSq_loading",
393
392
  "error": "_1H6WSq_error",
394
- "gallery": "_1H6WSq_gallery"
393
+ "gallery": "_1H6WSq_gallery",
394
+ "frame": "_1H6WSq_frame"
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
- "questionBringButton": "yw4T5a_questionBringButton",
764
- "questionOptionDesc": "yw4T5a_questionOptionDesc",
765
- "panelFooter": "yw4T5a_panelFooter",
766
- "questionItemCollapsed": "yw4T5a_questionItemCollapsed",
767
- "modelSelect": "yw4T5a_modelSelect",
768
- "modelCellLabel": "yw4T5a_modelCellLabel",
769
- "modelOptionCopy": "yw4T5a_modelOptionCopy",
770
- "modelGroupTitle": "yw4T5a_modelGroupTitle",
771
- "modelDescription": "yw4T5a_modelDescription",
772
- "modelSelectTrigger": "yw4T5a_modelSelectTrigger",
773
- "panelRunningClock": "yw4T5a_panelRunningClock",
774
- "settingsBringOption": "yw4T5a_settingsBringOption",
763
+ "panelAttachmentRemove": "yw4T5a_panelAttachmentRemove",
775
764
  "settingsToggle": "yw4T5a_settingsToggle",
776
- "panelListDeleteAll": "yw4T5a_panelListDeleteAll",
777
- "panel": "yw4T5a_panel",
778
- "panelRunning": "yw4T5a_panelRunning",
765
+ "reasoningSummary": "yw4T5a_reasoningSummary",
766
+ "questionToggle": "yw4T5a_questionToggle",
767
+ "modelCellValue": "yw4T5a_modelCellValue",
768
+ "questionDeleteAll": "yw4T5a_questionDeleteAll",
769
+ "panelTitle": "yw4T5a_panelTitle",
770
+ "messageInsertButton": "yw4T5a_messageInsertButton",
771
+ "panelRunningDot": "yw4T5a_panelRunningDot",
779
772
  "primary": "yw4T5a_primary",
780
- "panelEmpty": "yw4T5a_panelEmpty",
781
- "modelName": "yw4T5a_modelName",
782
- "modelSelectEffort": "yw4T5a_modelSelectEffort",
783
- "panelTextarea": "yw4T5a_panelTextarea",
784
- "modelOption": "yw4T5a_modelOption",
785
- "panelHeaderActions": "yw4T5a_panelHeaderActions",
786
- "questionFab": "yw4T5a_questionFab",
787
773
  "panelRunningPulse": "yw4T5a_panelRunningPulse",
788
- "panelComposer": "yw4T5a_panelComposer",
774
+ "panelConflictHidden": "yw4T5a_panelConflictHidden",
775
+ "panelResize": "yw4T5a_panelResize",
776
+ "modelSelectLabel": "yw4T5a_modelSelectLabel",
789
777
  "modelGroup": "yw4T5a_modelGroup",
778
+ "questionItem": "yw4T5a_questionItem",
779
+ "modelCell": "yw4T5a_modelCell",
780
+ "modelCheck": "yw4T5a_modelCheck",
781
+ "settingsBringOptionActive": "yw4T5a_settingsBringOptionActive",
782
+ "settingsBringOption": "yw4T5a_settingsBringOption",
783
+ "panelAttachmentRail": "yw4T5a_panelAttachmentRail",
784
+ "questionOptionText": "yw4T5a_questionOptionText",
785
+ "questionItemCollapsed": "yw4T5a_questionItemCollapsed",
786
+ "panelRunningClock": "yw4T5a_panelRunningClock",
787
+ "modelDescription": "yw4T5a_modelDescription",
790
788
  "settingsSection": "yw4T5a_settingsSection",
791
- "modelSelectMenu": "yw4T5a_modelSelectMenu",
792
- "questionDelete": "yw4T5a_questionDelete",
793
- "modelCellValue": "yw4T5a_modelCellValue",
794
- "settingsRowText": "yw4T5a_settingsRowText",
789
+ "questionBlockActions": "yw4T5a_questionBlockActions",
790
+ "modelCellLabel": "yw4T5a_modelCellLabel",
791
+ "modelName": "yw4T5a_modelName",
792
+ "panelHeaderActions": "yw4T5a_panelHeaderActions",
793
+ "modelGroups": "yw4T5a_modelGroups",
795
794
  "messageUserText": "yw4T5a_messageUserText",
796
- "settingsRowTitle": "yw4T5a_settingsRowTitle",
797
- "questionBody": "yw4T5a_questionBody",
798
- "questionOption": "yw4T5a_questionOption",
799
- "panelListItem": "yw4T5a_panelListItem",
800
- "panelListItemActive": "yw4T5a_panelListItemActive",
795
+ "panelToolbar": "yw4T5a_panelToolbar",
796
+ "modelCellChevron": "yw4T5a_modelCellChevron",
797
+ "settingsRowText": "yw4T5a_settingsRowText",
798
+ "modelOptionSelected": "yw4T5a_modelOptionSelected",
799
+ "messageAssistant": "yw4T5a_messageAssistant",
800
+ "panelAttachment": "yw4T5a_panelAttachment",
801
+ "panelList": "yw4T5a_panelList",
802
+ "questionDelete": "yw4T5a_questionDelete",
801
803
  "panelListItemRow": "yw4T5a_panelListItemRow",
804
+ "panelListItemRemove": "yw4T5a_panelListItemRemove",
805
+ "questionOptionLabel": "yw4T5a_questionOptionLabel",
806
+ "questionBody": "yw4T5a_questionBody",
807
+ "panelTextarea": "yw4T5a_panelTextarea",
808
+ "panelListItemDot": "yw4T5a_panelListItemDot",
809
+ "reasoningBody": "yw4T5a_reasoningBody",
810
+ "panelIconButton": "yw4T5a_panelIconButton",
802
811
  "questionHeaderText": "yw4T5a_questionHeaderText",
803
- "settingsRowDesc": "yw4T5a_settingsRowDesc",
804
- "questionBlockActions": "yw4T5a_questionBlockActions",
805
- "messageInsertButton": "yw4T5a_messageInsertButton",
806
- "questionHeader": "yw4T5a_questionHeader",
812
+ "panelListDeleteAll": "yw4T5a_panelListDeleteAll",
813
+ "panelLookup": "yw4T5a_panelLookup",
814
+ "panelComposer": "yw4T5a_panelComposer",
815
+ "panelFooter": "yw4T5a_panelFooter",
816
+ "questionOptionDesc": "yw4T5a_questionOptionDesc",
817
+ "panelListItem": "yw4T5a_panelListItem",
818
+ "panelAttachmentText": "yw4T5a_panelAttachmentText",
819
+ "panelDispose": "yw4T5a_panelDispose",
820
+ "modelSelectTrigger": "yw4T5a_modelSelectTrigger",
807
821
  "questionHeaderActions": "yw4T5a_questionHeaderActions",
808
- "modelSelectLabel": "yw4T5a_modelSelectLabel",
809
- "panelTranscript": "yw4T5a_panelTranscript",
810
- "panelIconButton": "yw4T5a_panelIconButton",
811
- "modelCheck": "yw4T5a_modelCheck",
812
- "panelListItemLabel": "yw4T5a_panelListItemLabel",
813
- "panelListItemDot": "yw4T5a_panelListItemDot",
814
- "questionOptionLabel": "yw4T5a_questionOptionLabel",
822
+ "panelHeader": "yw4T5a_panelHeader",
823
+ "selectionButton": "yw4T5a_selectionButton",
815
824
  "chevronOpen": "yw4T5a_chevronOpen",
816
- "panelList": "yw4T5a_panelList",
825
+ "questionFab": "yw4T5a_questionFab",
826
+ "questionFabDot": "yw4T5a_questionFabDot",
817
827
  "questionBlock": "yw4T5a_questionBlock",
818
- "questionDeleteAll": "yw4T5a_questionDeleteAll",
828
+ "collapsedHandle": "yw4T5a_collapsedHandle",
829
+ "questionBringButton": "yw4T5a_questionBringButton",
830
+ "panelRunning": "yw4T5a_panelRunning",
831
+ "modelSelectEffort": "yw4T5a_modelSelectEffort",
832
+ "modelSelectMenu": "yw4T5a_modelSelectMenu",
819
833
  "selectionMenu": "yw4T5a_selectionMenu",
834
+ "panelClose": "yw4T5a_panelClose",
835
+ "modelGroupTitle": "yw4T5a_modelGroupTitle",
836
+ "modelOption": "yw4T5a_modelOption",
820
837
  "settingsRow": "yw4T5a_settingsRow",
821
- "panelAttachmentRail": "yw4T5a_panelAttachmentRail",
822
- "messageActions": "yw4T5a_messageActions",
823
- "questionToggle": "yw4T5a_questionToggle",
824
- "reasoningBody": "yw4T5a_reasoningBody",
825
- "modelCellChevron": "yw4T5a_modelCellChevron",
826
838
  "panelListActions": "yw4T5a_panelListActions",
827
- "panelAttachmentText": "yw4T5a_panelAttachmentText",
828
- "panelRunningDot": "yw4T5a_panelRunningDot",
829
- "reasoningSummary": "yw4T5a_reasoningSummary",
830
- "collapsedHandle": "yw4T5a_collapsedHandle",
831
- "questionFabDot": "yw4T5a_questionFabDot",
832
- "panelToolbar": "yw4T5a_panelToolbar",
833
- "panelAttachment": "yw4T5a_panelAttachment",
834
- "modelOptionSelected": "yw4T5a_modelOptionSelected",
835
- "questionOptionText": "yw4T5a_questionOptionText",
836
- "modelCell": "yw4T5a_modelCell",
837
- "panelTitle": "yw4T5a_panelTitle",
838
- "panelListItemRemove": "yw4T5a_panelListItemRemove",
839
- "panelAttachmentRemove": "yw4T5a_panelAttachmentRemove",
840
- "panelConflictHidden": "yw4T5a_panelConflictHidden",
841
- "panelResize": "yw4T5a_panelResize",
842
- "selectionButton": "yw4T5a_selectionButton",
843
- "messageAssistant": "yw4T5a_messageAssistant",
844
- "panelHeader": "yw4T5a_panelHeader",
845
- "questionItem": "yw4T5a_questionItem",
846
- "panelLookup": "yw4T5a_panelLookup",
847
- "panelDispose": "yw4T5a_panelDispose",
848
- "messageUser": "yw4T5a_messageUser",
839
+ "settingsPromptInput": "yw4T5a_settingsPromptInput",
840
+ "panelListItemActive": "yw4T5a_panelListItemActive",
841
+ "questionOption": "yw4T5a_questionOption",
842
+ "modelSelect": "yw4T5a_modelSelect",
843
+ "questionDetail": "yw4T5a_questionDetail",
844
+ "settingsRowTitle": "yw4T5a_settingsRowTitle",
845
+ "questionHeader": "yw4T5a_questionHeader",
846
+ "panelTranscript": "yw4T5a_panelTranscript",
849
847
  "modelEmpty": "yw4T5a_modelEmpty",
848
+ "messageUser": "yw4T5a_messageUser",
850
849
  "settingsBringMode": "yw4T5a_settingsBringMode",
851
- "panelClose": "yw4T5a_panelClose",
852
- "modelGroups": "yw4T5a_modelGroups",
850
+ "messageActions": "yw4T5a_messageActions",
851
+ "modelOptionCopy": "yw4T5a_modelOptionCopy",
852
+ "settingsRowDesc": "yw4T5a_settingsRowDesc",
853
+ "panelEmpty": "yw4T5a_panelEmpty",
854
+ "panelListItemLabel": "yw4T5a_panelListItemLabel",
853
855
  "panelError": "yw4T5a_panelError",
854
- "questionDetail": "yw4T5a_questionDetail",
855
- "panelEmbedded": "yw4T5a_panelEmbedded",
856
- "settingsBringOptionActive": "yw4T5a_settingsBringOptionActive",
857
- "settingsPromptInput": "yw4T5a_settingsPromptInput"
856
+ "panel": "yw4T5a_panel",
857
+ "panelEmbedded": "yw4T5a_panelEmbedded"
858
858
  };
859
859
  //#endregion
860
860
  //#region \0dsh-css:/home/runner/work/dsh-side-chat/dsh-side-chat/src/client/layout.css.mjs
package/lib/index.js CHANGED
@@ -854,6 +854,21 @@ function buildApi(ctx, sideChats, getSettings) {
854
854
  }
855
855
  };
856
856
  }
857
+ /**
858
+ * Resolve this plugin's settings namespace: the Loader entry id that owns the
859
+ * running fiber. Both reads are defensive because this package builds against
860
+ * its own cordis, so the upstream `Fiber.entry` augmentation is not visible
861
+ * here. `undefined` (no owning entry, e.g. a bare programmatic mount) leaves
862
+ * the settings face unbound: the plugin still runs, only its preferences stay
863
+ * unavailable instead of being written to a namespace nobody owns.
864
+ */
865
+ function settingsNamespaceOf(ctx) {
866
+ const owner = ctx.fiber?.entry;
867
+ const fromFiber = owner?.options?.id ?? owner?.id;
868
+ if (typeof fromFiber === "string" && fromFiber !== "") return fromFiber;
869
+ const located = ctx.get("loader")?.locate?.(ctx.fiber);
870
+ return typeof located === "string" && located !== "" ? located : void 0;
871
+ }
857
872
  /** Read the connection row's trustedHosts, or empty (loopback-only fence). */
858
873
  function trustedHostsOf(ctx) {
859
874
  const loader = ctx.get("loader");
@@ -865,7 +880,7 @@ function apply(ctx) {
865
880
  const sideChats = /* @__PURE__ */ new Map();
866
881
  let settingsFace;
867
882
  ctx.inject(["settings"], (sctx) => {
868
- const ns = ctx.entry?.id;
883
+ const ns = settingsNamespaceOf(ctx);
869
884
  if (ns === void 0) return;
870
885
  sctx.effect(() => sctx.settings.configure({ auto: false }, ctx.fiber));
871
886
  const viewOf = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-side-chat-plus",
3
- "version": "0.4.1-alpha.1",
3
+ "version": "0.4.2",
4
4
  "description": "侧边聊天 Plus (Side chat Plus) — DSH web plugin: select text in a conversation and ask it in a per-session side chat (hidden ordinary session, own right-side panel, inherits model/effort/permissions, lookup toggle).",
5
5
  "private": false,
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -882,6 +882,40 @@ function buildApi(ctx: Context, sideChats: Map<string, SidechatRecord>, getSetti
882
882
  }
883
883
  }
884
884
 
885
+ /**
886
+ * The Loader entry that owns a fiber, as the Loader records it. The owning
887
+ * entry lives on the FIBER (`fiber.entry = fiber.parent[Entry.key]` in
888
+ * cordis-plugin-loader), never as a plain `ctx.entry`; `Entry.options.id` is
889
+ * the raw configured id and `Entry.id` the nested-qualified one, and the
890
+ * settings service keys namespaces by the raw one
891
+ * (`configEditor.entries().find(row => row.options.id === ns)`).
892
+ */
893
+ interface SideEntryOwner {
894
+ entry?: { id?: string; options?: { id?: string } }
895
+ }
896
+
897
+ /** The loader face this plugin needs to locate its own entry (best-effort). */
898
+ interface SideLoaderFace {
899
+ locate?: (fiber?: unknown) => string | undefined
900
+ }
901
+
902
+ /**
903
+ * Resolve this plugin's settings namespace: the Loader entry id that owns the
904
+ * running fiber. Both reads are defensive because this package builds against
905
+ * its own cordis, so the upstream `Fiber.entry` augmentation is not visible
906
+ * here. `undefined` (no owning entry, e.g. a bare programmatic mount) leaves
907
+ * the settings face unbound: the plugin still runs, only its preferences stay
908
+ * unavailable instead of being written to a namespace nobody owns.
909
+ */
910
+ function settingsNamespaceOf(ctx: Context): string | undefined {
911
+ const owner = (ctx.fiber as SideEntryOwner | undefined)?.entry
912
+ const fromFiber = owner?.options?.id ?? owner?.id
913
+ if (typeof fromFiber === 'string' && fromFiber !== '') return fromFiber
914
+ const loader = ctx.get('loader') as SideLoaderFace | undefined
915
+ const located = loader?.locate?.(ctx.fiber)
916
+ return typeof located === 'string' && located !== '' ? located : undefined
917
+ }
918
+
885
919
  /** Read the connection row's trustedHosts, or empty (loopback-only fence). */
886
920
  function trustedHostsOf(ctx: Context): string[] {
887
921
  const loader = ctx.get('loader') as { entries?: () => Iterable<{ options: { name: string; config?: unknown } }> } | undefined
@@ -899,9 +933,10 @@ export function apply(ctx: Context): void {
899
933
  const sideChats = new Map<string, SidechatRecord>()
900
934
  let settingsFace: SubchatSettingsFace | undefined
901
935
 
902
- // Settings namespaces are now Loader entry ids, including user-renamed rows.
936
+ // Settings namespaces are Loader entry ids, including user-renamed rows: the
937
+ // id is read off the owning fiber (see `settingsNamespaceOf`).
903
938
  ctx.inject(['settings'], (sctx: Context) => {
904
- const ns = (ctx as Context & { entry?: { id: string } }).entry?.id
939
+ const ns = settingsNamespaceOf(ctx)
905
940
  if (ns === undefined) return
906
941
  sctx.effect(() => sctx.settings.configure({ auto: false }, ctx.fiber))
907
942
  const viewOf = (): { value?: unknown; revision?: number } => {