fix(mcp): align image generation agent badges with dynamic registration state#1505
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Code Review:fix(mcp): align image generation agent badges with dynamic registration state (#1505)变更概述本 PR 修复了图像生成区域的 agent badge 无法正确显示注册状态的问题,同时修复了 Gemini Badge 在 MCP 中的动态注册状态显示。改动涉及 方案评估结论:✅ 方案合理 将 fork Gemini 从"跳过"改为"路由到 AionuiMcpAgent 并归并至 问题清单🟡 MEDIUM —
|
| # | 严重级别 | 文件 | 问题 |
|---|---|---|---|
| 1 | 🟡 MEDIUM | ToolsModalContent.tsx:394 |
clearImageGenerationAgentStatus 在 state updater 内调用 ConfigStorage.set 副作用 |
| 2 | 🔵 LOW | McpService.ts:151 |
getDetectionTarget 与 getAgentForConfig 重复 fork-Gemini 判断逻辑 |
| 3 | 🔵 LOW | ToolsModalContent.tsx:364 |
Object.assign 替代 spread,风格不一致 |
结论
本报告由本地 pr-review skill 生成,包含完整项目上下文,无截断限制。
- Fix clearImageGenerationAgentStatus calling ConfigStorage.set inside React state updater, causing potential double invocation in Strict Mode; move side effect outside the updater and pass direct value to setter - Refactor getDetectionTarget to reuse getAgentForConfig, eliminating duplicated fork-Gemini detection logic Review follow-up for #1505
…ew-followup fix(image-generation-mcp): address review issues from PR #1505
Pull Request
Description
Type of Change
Testing
Screenshots