dsh-plugin-agent-memory 0.1.5 → 0.1.6

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/client.js CHANGED
@@ -283,7 +283,7 @@ window.__ModuleLoader__.load({
283
283
  .catch((failure) => setError(String(failure.message ?? failure)));
284
284
  }, [sessionId]);
285
285
 
286
- const label = selection ? `专家:${selection.agentName}` : '选择专家';
286
+ const label = selection ? `专家:${selection.agentName}` : '请选择专家';
287
287
  const healthColor =
288
288
  health.state === 'ok' ? '#2e7d32' : health.state === 'bad' ? '#c0392b' : 'rgba(128,128,128,0.85)';
289
289
 
@@ -302,17 +302,32 @@ window.__ModuleLoader__.load({
302
302
  }
303
303
  },
304
304
  },
305
- h('span', {
306
- style: {
307
- width: '6px',
308
- height: '6px',
309
- borderRadius: '50%',
310
- flex: '0 0 auto',
311
- background: selection
312
- ? 'var(--dsw-alias-accent, #247bbf)'
313
- : 'var(--dsw-alias-border-subtle, rgba(128,128,128,0.5))',
305
+ h(
306
+ 'svg',
307
+ {
308
+ width: 13,
309
+ height: 13,
310
+ viewBox: '0 0 16 16',
311
+ 'aria-hidden': true,
312
+ style: {
313
+ flex: '0 0 auto',
314
+ color: selection
315
+ ? 'var(--dsw-alias-accent, #247bbf)'
316
+ : 'var(--dsw-alias-text-secondary, currentColor)',
317
+ },
314
318
  },
315
- }),
319
+ h('path', {
320
+ d: 'M6.6 3.6 9.4 3.1 M4.9 6.3 7.3 9.2 M10.9 5.2 9.1 9.1',
321
+ stroke: 'currentColor',
322
+ strokeWidth: 1.1,
323
+ strokeLinecap: 'round',
324
+ fill: 'none',
325
+ opacity: 0.75,
326
+ }),
327
+ h('circle', { cx: 4.6, cy: 5, r: 2, fill: 'currentColor' }),
328
+ h('circle', { cx: 11.6, cy: 4.2, r: 1.6, fill: 'currentColor', opacity: 0.8 }),
329
+ h('circle', { cx: 8.2, cy: 11, r: 2.2, fill: 'currentColor', opacity: 0.95 }),
330
+ ),
316
331
  h('span', { style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, label),
317
332
  );
318
333
 
package/docs/DETAIL.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ## 用法
6
6
 
7
7
  1. 在对话框工具行左侧点「选择专家」,展开后点右上角「设置」,直接填 `Hub 地址`、`实例 ID`、`Userkey` 并点「检测连接」;保存后写入本 profile 的 `cordis.patch.yml`(也可以手改该行)。
8
- 2. 「设置」旁边的「返回列表」回到团队 / agent 列表,先选团队,再选 agent;选中的专家记录在当前会话上。
8
+ 2. 「设置」旁边的「返回列表」回到团队 / agent 列表,先选团队,再选 agent;选中的专家记录在当前会话上。未选择时按钮显示「请选择专家」,且不注入任何记忆——需要默认专家时把 `defaultAgentId` 填上即可。
9
9
  3. 每轮对话开始时,Host 半侧会用该 agent 的记忆块做检索(L3 / L2 / L1 / L0 依次尝试),把命中的记忆以 `<agent-memory>` 段落追加到该 step 的消息里,模型因此能看到专家的长期记忆。
10
10
  4. 同一份团队资产还能按需取用:插件注册了 4 个只读工具 —— `am_knowledge_resources`(列出 wiki / code-graph 资源)、`am_knowledge_call`(先取该资源的工具清单,再执行 explore / search / callers / impact / read_page 等)、`am_skill_search`(检索技能)、`am_skill_read`(读技能正文)。工具默认绑定当前会话选中的专家所在团队。
11
11
 
package/index.js CHANGED
@@ -865,9 +865,8 @@ export function apply(ctx, config) {
865
865
  if (typeof body.userKey === 'string' && body.userKey.trim() !== '') {
866
866
  patch.userKey = body.userKey.trim();
867
867
  }
868
- if (typeof body.defaultAgentId === 'string' && body.defaultAgentId.trim() !== '') {
869
- patch.defaultAgentId = body.defaultAgentId.trim();
870
- }
868
+ // An empty string clears the default expert, so the composer starts at 「请选择专家」.
869
+ if (typeof body.defaultAgentId === 'string') patch.defaultAgentId = body.defaultAgentId.trim();
871
870
  if (typeof body.injectMemory === 'boolean') patch.injectMemory = body.injectMemory;
872
871
  if (typeof body.writeMemory === 'boolean') patch.writeMemory = body.writeMemory;
873
872
  if (Number.isFinite(body.topK)) patch.topK = Math.max(1, Math.min(10, body.topK));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-agent-memory",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Tencent agent-memory integration: pick a team agent as an expert at the composer, recall its memories into each turn, and expose its wiki, code-graph and skill assets as tools.",
6
6
  "license": "MIT",