feat(skillhub): 完善Skill多引擎用量诊断与证据归因 - #5430
Open
NothingToDooo wants to merge 4 commits into
Open
NothingToDooo wants to merge 4 commits into
NothingToDooo wants to merge 4 commits into
Conversation
|
NothingToDooo
force-pushed
the
feat/skill-usage-diagnostics
branch
from
October 3, 2026 15:43
719441b to
bf10567
Compare
Contributor
|
本 PR 命中维护者确认(产品 / UI 变更与技术架构调整),已在讨论 issue 中写明本次改动与确认理由:#5431 请维护者直接在本 PR 上 Approve;需要作者修改则 Request Changes 并写明要求。 |
创建任务前记录账号代次,等待响应后重新确认归属,避免旧账号的任务进入新账号状态。 Signed-off-by: Nothingtodo <xinnothingtodo@gmail.com>
统一 Claude、Codex、Pi 的原生日志身份、内容版本和去重,补充 Pi 来源统计。 刷新失败时保留已有有效证据,防止较旧副本覆盖;派生索引保持格式 7。 统一缓存准备与更新事务,返回明确的刷新状态,生成本地化诊断草稿和原始证据入口。 Signed-off-by: Nothingtodo <xinnothingtodo@gmail.com>
统一媒体交接和图片预览的附件追加入口,保留已有草稿内容、上下文和附件顺序。 Signed-off-by: Nothingtodo <xinnothingtodo@gmail.com>
诊断入口复用常规任务的引擎、模型和权限配置,支持取消等待与配置重试。 区分尚无统计快照与已完成的零记录,首次索引期间保留入口,后台刷新时可使用已有结果。 首次索引完成后再次确认有效记录,避免创建无证据的诊断任务。 Signed-off-by: Nothingtodo <xinnothingtodo@gmail.com>
NothingToDooo
force-pushed
the
feat/skill-usage-diagnostics
branch
from
October 5, 2026 01:25
bf10567 to
3a4b0bb
Compare
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.
这次改了什么
摘要
Skill 用量诊断需要依据真实执行记录定位问题。原有统计对 Pi 的覆盖不完整,重复归档可能影响证据归因,首次索引的空结果又会隐藏诊断入口;创建诊断任务时也未完整沿用所选引擎的常规配置。
本 PR 完善 Claude、Codex、Pi 的日志分析、证据索引和本地化诊断草稿,区分尚无统计快照与真实零记录,并在刷新失败时保护已有有效证据。诊断入口复用常规 Agent 选择器和配置,支持索引等待、取消及重试。诊断草稿使用普通消息流程,诊断读取与其他 Skill 读取采用相同的统计规则。
变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
保留 4 个独立提交:账号切换边界、用量证据与诊断上下文、媒体附件草稿保留、诊断入口配置与状态;每个提交均带 DCO。
UI 变化
docs/design-rules/DESIGN.md§4 Buttons / Select & Dropdown / Dialog & Modal,复用标准 Button、AgentSelect 和上游统一的 modal-scrim / modal-panel;外框、阴影和动画由共享样式提供,对话框保留 16px 内边距、最大 460px 宽度及视窗两侧 16px 留白。§5 Border Radius Scale / Interaction constraints,沿用标准控件的圆角与交互尺寸。§10 Light / Dark Dual-Mode Delivery Gate,新增状态使用语义 token 实现双模式;未完成 Light、Dark 分别实机目检。§11 Voice & Content,状态、错误与诊断草稿通过五种语言资源提供。怎么验证的
自动验证
2026-10-05 将原有 4 个提交 rebase 到上游
755166499。唯一内容冲突位于诊断弹窗外观:保留上游共享 modal 样式、原有诊断交互和布局,同时更新对应样式断言。git range-diff确认前三个提交补丁不变,第四个仅作上述适配;当前 head 为3a4b0bb66。本次包含 #5431 特别提出的数据库事务
tx.test.ts(98 项)和registerIpcUsage.test.ts(86 项);另覆盖分析器、索引/存储、诊断提示词、入口状态/配置、账号边界、草稿附件及上游统一弹窗合同。独立复核确认上游弹窗改动完整保留,等待取消、过期结果隔离和零记录保护未变。之前
bf1056729的 13 文件、986 项定向测试记录属于此前版本;本次没有把未重跑项目计入上述 409 项。未执行格式检查或自动格式修复。手工验证
bf1056729,启动命令返回DESKTOP_DEV_VERDICT=ready,用户试用后确认可以推送。未执行的验证
v0.85.1/v1.0.2官方源码核对:会话目录、JSONL version 3、身份/分支字段、原生 Skill 展开及 read/toolResult 形态兼容,现有检索和分析无需为常规路径调整。本机运行包仍为 0.85.1,此结论不等于 1.0.2 实机通过。风险
风险分类
影响与回滚
提交前检查
git commit -s,见 DCO)