fix(dsh): 补齐注入消息的 id 与 role,避免会话无法回放 - #8
Merged
Merged
Conversation
- plugins/quicker-dsh:agent.inject 改为完整 UserMessage(id + role) - tests:用本机 DSH snapshotSessionEvent 复现 lacks an identified message,并校验修复后可回放 - scripts/install-client.ps1:归属标记写入包内真实版本 - 文档:DSH 插件记为 0.2.1;旧会话不会自动修好
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dsh-plugin-quicker的agent.inject以前只传content/source,DSH 回放要求完整 UserMessage(id+role)。缺字段的事件会落进会话日志,再次打开时报session event at seq N lacks an identified message,整段历史无法加载。createUserMessage的形状补齐id: randomUUID()和role: 'user',并在注入前做形状校验。@deepseek-ai/dsh-session的snapshotSessionEvent复现:session-4042791e的 seq 10 报同样错误;修复后的注入可通过回放。dsh --profile web --dump-config仍能看到dsh-plugin-quicker层。Test plan
python -m unittest discover -s tests -v(44 项,含本机 DSH session validator)session-4042791eseq 10:lacks an identified messagecreateAuthoringGuideMessage/apply()注入通过snapshotSessionEventdsh-plugin-quicker