Skip to content

feat(frontend): update agent detail component - #23

Merged
HelloWorldU merged 2 commits into
mainfrom
agent/-v615
May 27, 2026
Merged

feat(frontend): update agent detail component#23
HelloWorldU merged 2 commits into
mainfrom
agent/-v615

Conversation

@HelloWorldU

Copy link
Copy Markdown
Owner

变更内容

  • kimi-code-swarm/package.json / package-lock.json: 更新项目依赖
  • kimi-code-swarm/src/components/AgentDetail.vue: 调整 AgentDetail 组件
  • kimi-code-swarm/src/style.css: 更新全局样式

类型

  • feat: 新功能
  • fix: Bug 修复
  • refactor: 代码重构
  • docs: 文档更新
  • test: 测试补充
  • chore: 构建/工具链

检查项

  • 本地 pre-commit 通过(typecheck / lint / analyze / check-docs)
  • 测试已补充或无需补充
  • 文档已同步或无需同步

Update AgentDetail view and related global styles,
including necessary dependency upgrades.

已有测试覆盖或无需补充。
Refresh DESIGN, FRONTEND, COMPONENT_PATTERNS and CONSTRAINTS
to align with current project standards and architecture.

无需补充测试(纯文档更新)。

@HelloWorldU HelloWorldU left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[自审] 自动审阅通过(LGTM)

注:GitHub 不允许 PR 作者 approve 自己的 PR,此评论仅作为审阅记录。

@HelloWorldU HelloWorldU left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[自审] 自动审阅通过

注:GitHub 不允许 PR 作者 approve 自己的 PR,此评论仅作为审阅记录。

@HelloWorldU HelloWorldU left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[自审] 自动审阅通过

注:GitHub 不允许 PR 作者 approve 自己的 PR,此评论仅作为审阅记录。

@HelloWorldU HelloWorldU left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[自审] 自动审阅通过

注:GitHub 不允许 PR 作者 approve 自己的 PR,此评论仅作为审阅记录。

@HelloWorldU
HelloWorldU merged commit 94afc0c into main May 27, 2026
1 check passed
HelloWorldU added a commit that referenced this pull request May 28, 2026
backlog #3 真根因 2026-05-28 实测确认:agent workspace 是 git clone
出来的,没跑 npm install → setup-hooks.js postinstall 从未执行 →
core.hooksPath 没设 → git commit 默认找 .git/hooks/(空)→ 没 hook
可跑,commit 直接通过。ci/hooks/pre-commit 文件存在但没注册到 git
config,形同虚设。

之前我误诊为「Windows shell hook 找不到 sh.exe / silent skip」是因
为当时用 kimi 在一个碰巧跑过 npm install 的旧 workspace 测试,hook
能拦——新建 workspace 没装 npm 就不行。

修复:git.ts.cloneRepo 在 clone 完后追加一行 git config core.hooksPath
ci/hooks——跟 setup-hooks.js 做的事一样,零开销。所有新 agent workspace
自动注册 pre-commit hook,本地 commit 时 check-docs 等检查就能拦住
「源码改了忘改文档」这类问题,省一轮 CI fix。

backlog 同步:#3 标已修;清理重复条目;底部时间戳更新。Bug F 修复
PR #23 已验证生效(reviewer 失败 3 次正确标 failed),从观察项里移除。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HelloWorldU added a commit that referenced this pull request May 28, 2026
发送一大段消息(比如粘贴一份 SKILL.md)时,「任务指令」框(Info 区
通过 getLastInput 显示最近一条 input)会被完整内容撑成大块,挤掉
下方的聊天面板,导致 markdown 渲染过的气泡都看不到。

修复:Info 区 <p> 加 line-clamp-2 + break-words,最多显示 2 行截断
(末尾自动 `…`),:title 让鼠标 hover 看完整原文。完整内容由下方
聊天面板的用户气泡(PR #23 marked + highlight.js + dompurify
markdown 渲染)正常显示。

docs: COMPONENT_PATTERNS / FRONTEND 同步 AgentDetail Info 区行为。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HelloWorldU added a commit that referenced this pull request May 28, 2026
…nMerge 排除 failed

紧跟 PR #24 (Bug #8 初版实施) 的两个潜在问题修复,外加两个附带修复:

修问题 1:conflict prefix inline 注入污染 UI
- 原版 syncBranchWithMain 把 conflict 文件内容 + 解决 prompt 拼到 instruction
  前面返回,sendInstruction 末尾 log('input', ...) 把整段当用户消息显示,
  污染「任务指令」区 + 聊天面板出现巨大「用户气泡」装冲突文件。
- 改成 syncBranchWithMain 内部独立调 runInstructionSilent 让 kimi 静默
  解决冲突 → engine sanity check + commit → 然后 sendInstruction 才用
  原 instruction 跑用户任务。UI 上只看到 system log「冲突自动解决中 /
  已解决 / 失败」,干净。
- finalizeMergeCommit 改为接收参数的纯函数(不再用 pendingMergeCommit /
  conflictFiles / conflictFileOriginals 实例字段),删掉这些字段。
- 删 sendInstruction 末尾「kimi 退出后异步触发 finalize」机制,整个
  sync 流程在 syncBranchWithMain 内同步完成。

修问题 2:触发条件改为不依赖 prStatus
- 原版 if (prStatus === 'merged') 触发,用户在 GitHub web 手动 merge
  时 prStatus 永远不变 merged → 后续 sendInstruction 不触发 sync →
  base 漂移问题没解决。
- 改成每次 sendInstruction 入口都触发 syncBranchWithMain,内部 5 分钟
  throttle(lastSyncCheckAt 字段)防止每条用户消息都 fetch。

附带修复:
- runInstructionSilent 默认 idle 120s → 600s。kimi 不是逐 token 流式
  输出,是「长 think → 一批 tool call → 一段 text」分批,60-180s 间隙
  正常;之前 runReview / fix loop 经常误判卡死,PR #23 之后看到的
  「kimi 卡死/超时」3 次重试很多就是这个误判。
- generateCommitAndPrBody 调用 60s → 300s(大 diff 时 commit message
  生成也可能 60+s)。
- canMerge 自审 + fallback 分支过滤 status === 'failed' 的 reviewer,
  改成 activeReviews.every(approved)。reviewer 自动审阅 3 次跑不起来标
  failed ≠ 内容被拒,不该阻塞合并。之前 PR #24 截图 1/2 通过但被
  failed reviewer 卡住合并就是这个 bug。

backlog #8 同步:标 ✅ 已实施 + 列出本轮修复细节。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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