Repository navigation
Conversation
解决的问题: 1. v0.2.8 把产品能力迁入 DSH 插件后,设定桥接文件的 history 只剩开场白和当前输入,关键词扫描深度大于 1 与 EJS 的 matchChatMessages 看不到最近对话,本轮须读的升格判断会失真。 怎么解决: 1. 准备输入时从官方 Session 面取可见对话(用户输入与最终回复,去掉工具步骤和 FINAL 标签),连同开场白和当前输入写入设定桥接文件。 2. 重新生成会保留当前输入;桥接文件只追加一次当前输入,避免重复。 3. 补单元测试与集成回归测试(普通准备与重新生成各一条)。
解决的问题: 1. 重新生成去重按正文等串比较;多段文本输入经 sessionMessageText 与 messageText 的不同拼接方式会判不等,桥接文件写两次当前输入。 2. 注释称只收用户输入与最终回复,实际把压缩检查点也当历史写入,没有用例说明。 3. 为本修复新增专用测试文件,与 TESTING.md “优先扩展现有测试”不一致;writeSettingBridge 新加的默认参数从不触发。 怎么解决: 1. 改按会话末尾的直接用户消息识别保留输入,不比较正文;压缩检查点不当作保留输入。 2. 用例并入现有 dsh-conversation-context.test.js,覆盖工具步骤、末尾保留输入、压缩检查点与空输入。 3. 去掉 writeSettingBridge 的默认参数;集成测试复用 settingBridge helper。
10 tasks done
This branch has not been deployed
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.
Desktop Change(桌面端改动)
What changed(改了什么)
用户不可见;底层变化是角色扮演的设定读取拿回真实对话历史。
每轮输入前写出的设定桥接文件
eleckoi-setting-library-state.json,history现在包含可见对话历史:history的两个消费者:受影响的行为:关键词扫描深度 > 1 时扫描最近 N 条消息;EJS 的
matchChatMessages/getMessageVar/lastMessageId能看到最近对话;关键词/EJS 升格的「本轮须读」判断不再失真。根因:v0.2.8 迁入 DSH 插件后,
prepareConversationRuntime的history只保留开场白;迁移前AgentSessionCoordinator取完整历史(d3ab69d)。Architecture route(架构归属)
host / modules / platform / i18n(无新增 Main 文件)contracts / foundation(无新增 Shared 文件)@eleckoi/dsh-runtime;Host/Client 插件使用同版本公开合同,上游包仍是同一个精确版本批次(无版本变化)@eleckoi/dsh-product-data独占,跨模块依赖只使用对方index.ts公开面(改动在dsh-client-roleplayHost 插件内部)Data and compatibility(数据与兼容)
history退回为空,不阻塞生成;重新生成保留的当前输入按会话末尾的直接用户消息识别,不比较正文;压缩摘要条目保留在历史里)回滚与影响面
pnpm build即可。产品数据库、Session 日志、Schema 都不动。<compacted-summary>)会进入历史,与模型读到的历史一致。Verification(验证)
pnpm test(本地已跑受影响文件;全量由 CI 执行,状态见检查项)pnpm build(由 CI 执行,状态见检查项;本机 Linux 已知停在check:licenses,与本次改动无关)pnpm check:electron-dsh(由 CI 执行,状态见检查项;本 PR 未改 DSH 运行时装配)本地证据(旧源码 + 新回归用例 → 修复后):
pnpm typecheck过;快闸除check:plugin-docs外全过。check:plugin-docs在未改动的main(a5bb881)上同样失败(@eleckoi/dsh-client-html-resources的./client导出解析不到src/client/types.ts),是基线红,与本次改动无关。fork 侧的预跑与评审记录:KuramiWan#5
Review scope(审查范围)
packages/client/features/dsh-client-roleplay/src/host/conversation-context.mjspackages/client/features/dsh-client-roleplay/src/host/session-runtime.mjspackages/client/features/dsh-client-roleplay/tests/host/dsh-conversation-context.test.jstests/integration/dsh-old-chat-generation.test.js评审重点:会话末尾保留输入的识别(不比较正文)、压缩摘要条目的处理、取不到 Session 的退回路径。