Skip to content

v0.3.3

Choose a tag to compare

@XiaoFeng7418 XiaoFeng7418 released this 22 Nov 05:33
· 3 commits to main since this release

v0.3.3 — 修复「从 Chat 切到 PTC 后工具全被屏蔽」

修复(Fixed)

  • 离开 Chat 不再让会话丢失工具。 空白会话允许切换预设,宿主会复用同一个 Agent scope、只替换父链。此前每一步的 allow 列表追加在该共享 scope 上却不保存 disposer,切换 Chat → PTC(或 Chat → 标准模式)后 allow: [] 仍生效,所有继承工具被过滤掉,PTC 里连 tools.compress 都消失。
    现在每条 mask 自己持有 disposer,在「会话切换预设」「Agent 销毁」「插件卸载」三处释放;切回 Chat 时下一步会按新状态重建 mask。

验证

  • npm test 72/72、npm run typecheck 通过;隐私扫描无命中。
  • 实机回归(本地 mock 捕获请求体):Chat 首轮 tools: 0;同一会话在首轮之前切到 PTC 再发消息,请求带 run_code、系统提示 56 KB —— 修复前该请求会是 0 个工具。

说明

  • 已经运行中的 DSH 实例仍持有旧限制,需更新插件后**重启 DSH(含托盘)**才生效。

English

Fixed

  • Leaving Chat no longer starves the session of tools. A blank session may switch presets, and the host reuses the same Agent scope while swapping the preset in the parent chain. The per-step allow list was appended to that shared scope without keeping its disposer, so after Chat -> PTC (or Chat -> Standard) allow: [] kept filtering every inherited tool and tools.compress disappeared.
    Each mask now owns its disposer and is released when the session's preset changes, when the agent is disposed, or when the plugin unloads; switching back to Chat rebuilds the mask on the next step.

Verification

  • npm test 72/72, npm run typecheck clean, privacy scan clean.
  • Live regression with a local mock recording request bodies: the first Chat turn carries tools: 0; switching that same blank session to PTC before the first turn now sends run_code with a 56 KB system prompt — it used to send zero tools.

Notes

  • A DSH instance that is already running still holds the old restriction: update the plugin and restart DSH completely (including the tray) for the fix to take effect.