dsh-skill-tag 0.1.1 → 0.1.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/README.md +1 -1
- package/lib/client.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -879,6 +879,20 @@ window.__ModuleLoader__.load({
|
|
|
879
879
|
/** 菜单注入 ↔ 浮层渲染之间唯一的通信通道(模块级 store) */
|
|
880
880
|
const manage = { open: false, workspaceId: "", workspaceTitle: "", conversationId: "", sessionTitle: "", listeners: new Set() };
|
|
881
881
|
function manageSet(patch) {
|
|
882
|
+
// 作用域互斥:workspaceId 与 conversationId 绝不能同时有值。
|
|
883
|
+
// manageScope() 只看 conversationId 是否为空来决定走「工作区版」还是「对话版」,
|
|
884
|
+
// 所以只要残留一个上次打开对话管理时留下的 conversationId,
|
|
885
|
+
// 工作区的「管理标签」就会打开成「管理标签(对话)」。
|
|
886
|
+
// 三个打开入口里,会话行菜单和聊天框「+」都显式清了 workspaceId,
|
|
887
|
+
// 只有 DOM 注入的工作区菜单这一处漏了 —— 于是在这里统一兜住,免得以后再漏。
|
|
888
|
+
if (patch.open === true) {
|
|
889
|
+
if (patch.conversationId) {
|
|
890
|
+
patch.workspaceId = "";
|
|
891
|
+
} else if (patch.workspaceId) {
|
|
892
|
+
patch.conversationId = "";
|
|
893
|
+
patch.sessionTitle = "";
|
|
894
|
+
}
|
|
895
|
+
}
|
|
882
896
|
Object.assign(manage, patch);
|
|
883
897
|
for (const fn of [...manage.listeners]) fn();
|
|
884
898
|
}
|