Skip to content

fix(dsh): 补齐注入消息的 id 与 role,避免会话无法回放 - #8

Merged
ceastld merged 1 commit into
mainfrom
fix/dsh-inject-id
Sep 15, 2026
Merged

ceastld merged 1 commit into
mainfrom
fix/dsh-inject-id

Conversation

@ceastld

@ceastld ceastld commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • dsh-plugin-quicker 的 agent.inject 以前只传 content / source,DSH 回放要求完整 UserMessage(id + role)。缺字段的事件会落进会话日志,再次打开时报 session event at seq N lacks an identified message,整段历史无法加载。
  • 现按 DSH 官方 createUserMessage 的形状补齐 id: randomUUID() 和 role: 'user',并在注入前做形状校验。
  • 本机已用 DSH @deepseek-ai/dsh-session 的 snapshotSessionEvent 复现:session-4042791e 的 seq 10 报同样错误;修复后的注入可通过回放。dsh --profile web --dump-config 仍能看到 dsh-plugin-quicker 层。
  • 0.2.0 已经写坏的旧会话不会自动修好。插件版本升到 0.2.1。

Test plan

  • python -m unittest discover -s tests -v(44 项,含本机 DSH session validator)
  • 本机已损坏会话 session-4042791e seq 10:lacks an identified message
  • 修复后 createAuthoringGuideMessage / apply() 注入通过 snapshotSessionEvent
  • 本机 web profile dump-config 仍包含 dsh-plugin-quicker
  • 重启 DSH web/桌面端后新开会话,确认历史可再次打开

- plugins/quicker-dsh:agent.inject 改为完整 UserMessage(id + role)
- tests:用本机 DSH snapshotSessionEvent 复现 lacks an identified message,并校验修复后可回放
- scripts/install-client.ps1:归属标记写入包内真实版本
- 文档:DSH 插件记为 0.2.1;旧会话不会自动修好
@ceastld
ceastld merged commit b41ed76 into main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant