@chenkai114/dsh-team-admin 0.1.5 → 0.1.7
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/package.json +1 -1
- package/src/client.js +10 -4
- package/src/index.js +1 -1
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -186,13 +186,15 @@
|
|
|
186
186
|
|
|
187
187
|
function stripDismissedCatalogs(payload, dismissed) {
|
|
188
188
|
if (payload === null || typeof payload !== 'object' || dismissed === undefined || dismissed.size === 0) return payload
|
|
189
|
+
const keep = (entry) => !(entry !== null && typeof entry === 'object' && typeof entry.id === 'string' && dismissed.has(entry.id))
|
|
189
190
|
const visit = (node, depth) => {
|
|
190
191
|
if (node === null || typeof node !== 'object' || depth > 6) return
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
// 1) 顶部「子智能体」选择器:宿主 catalog 投影
|
|
193
|
+
if (Array.isArray(node.subagentCatalog)) node.subagentCatalog = node.subagentCatalog.filter(keep)
|
|
194
|
+
// 2) 「智能体团队」面板:宿主 roster 投影(成员数组)
|
|
195
|
+
if (isRecord(node.agentTeam) && Array.isArray(node.agentTeam.members)) node.agentTeam.members = node.agentTeam.members.filter(keep)
|
|
194
196
|
for (const key of Object.keys(node)) {
|
|
195
|
-
if (key === 'subagentCatalog') continue
|
|
197
|
+
if (key === 'subagentCatalog' || key === 'agentTeam') continue
|
|
196
198
|
visit(node[key], depth + 1)
|
|
197
199
|
}
|
|
198
200
|
}
|
|
@@ -1079,6 +1081,10 @@
|
|
|
1079
1081
|
}
|
|
1080
1082
|
}
|
|
1081
1083
|
|
|
1084
|
+
// 宿主模块表装载阶段就装好过滤器:客户端插件要等 slots 服务才 apply,
|
|
1085
|
+
// 而会话列表请求可能更早发生,所以不能只在 apply 里装。
|
|
1086
|
+
installSessionListFilter()
|
|
1087
|
+
|
|
1082
1088
|
// 宿主模块表:以包名注册,factory 返回 { inject, apply }
|
|
1083
1089
|
if (typeof window !== 'undefined' && window !== null && window.__ModuleLoader__ !== undefined && window.__ModuleLoader__ !== null
|
|
1084
1090
|
&& typeof window.__ModuleLoader__.load === 'function') {
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const DATA_DIR_ENV = 'DSH_TEAM_ADMIN_DATA_DIR'
|
|
|
17
17
|
/** 路由前缀:webServer 只支持 exact/prefix 注册。 */
|
|
18
18
|
const ROUTE_PREFIX = '/api/team-admin'
|
|
19
19
|
/** 与 package.json 版本保持一致(发布前由测试校验)。 */
|
|
20
|
-
const PLUGIN_VERSION = '0.1.
|
|
20
|
+
const PLUGIN_VERSION = '0.1.7'
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* 解析插件数据目录。
|