IanShaw027
f60f943d0c
fix: 修复代码审查报告中的4个关键问题
1. 资源管理冗余(ForwardGemini双重Close)
- 错误分支读取body后立即关闭原始body,用内存副本重新包装
- defer添加nil guard,避免重复关闭
- fallback成功时显式关闭旧body,确保连接释放
2. Schema校验丢失(cleanJSONSchema移除字段无感知)
- 新增schemaCleaningWarningsEnabled()支持环境变量控制
- 实现warnSchemaKeyRemovedOnce()在非release模式下告警
- 移除关键验证字段时输出warning,包含key和path
3. UI响应式风险(UsersView操作菜单硬编码定位)
- 菜单改为先粗定位、渲染后测量、再clamp到视口内
- 添加max-height + overflow-auto,超出时可滚动
- 增强交互:点击其它位置/滚动/resize自动关闭或重新定位
4. 身份补丁干扰(TransformClaudeToGemini默认注入)
- 新增TransformOptions + TransformClaudeToGeminiWithOptions
- 系统设置新增enable_identity_patch、identity_patch_prompt
- 完整打通handler/dto/service/frontend配置链路
- 默认保持启用,向后兼容现有行为
测试:
- 后端单测全量通过:go test ./...
- 前端类型检查通过:npm run typecheck
2026-01-04 22:49:40 +08:00
..
2025-12-26 16:45:40 +08:00
2026-01-03 06:37:08 -08:00
2026-01-03 06:37:08 -08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-01 18:59:38 +08:00
2026-01-01 19:09:06 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 22:32:36 +08:00
2026-01-04 22:49:40 +08:00
2026-01-03 06:29:02 -08:00
2025-12-31 10:33:00 +08:00
2026-01-03 06:29:02 -08:00
2025-12-31 16:25:45 +08:00
2025-12-31 23:37:51 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2025-12-29 15:22:50 +08:00
2025-12-31 23:42:01 +08:00
2025-12-25 17:15:01 +08:00
2025-12-31 08:50:12 +08:00
2026-01-04 19:28:20 +08:00
2025-12-25 17:15:01 +08:00
2026-01-03 06:32:51 -08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2025-12-28 09:49:54 +08:00
2026-01-04 22:49:40 +08:00
2025-12-18 13:50:39 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 10:45:18 +08:00
2026-01-04 22:32:36 +08:00
2026-01-04 22:32:36 +08:00
2025-12-31 08:50:12 +08:00
2026-01-04 22:32:36 +08:00
2026-01-01 04:21:18 +08:00
2026-01-04 22:32:36 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 15:36:00 +08:00
2026-01-04 19:28:20 +08:00
2025-12-26 00:11:03 -08:00
2026-01-04 15:36:00 +08:00
2025-12-26 00:11:03 -08:00
2026-01-01 04:29:22 +08:00
2025-12-31 16:25:45 +08:00
2025-12-26 00:11:03 -08:00
2025-12-31 23:42:01 +08:00
2025-12-31 14:11:57 +08:00
2025-12-31 11:43:58 +08:00
2025-12-25 17:15:01 +08:00
2025-12-27 20:42:00 +08:00
2026-01-04 19:28:20 +08:00
2025-12-26 16:45:40 +08:00
2025-12-31 08:50:12 +08:00
2025-12-31 23:42:01 +08:00
2025-12-26 16:45:40 +08:00
2026-01-03 06:29:02 -08:00
2026-01-04 15:36:00 +08:00
2025-12-26 16:45:40 +08:00
2025-12-31 23:42:01 +08:00
2026-01-04 22:49:40 +08:00
2025-12-26 16:45:40 +08:00
2026-01-04 22:49:40 +08:00
2025-12-31 23:42:01 +08:00
2026-01-03 06:34:00 -08:00
2025-12-28 09:49:54 +08:00
2026-01-04 15:59:21 +08:00
2026-01-04 19:28:20 +08:00
2025-12-31 16:25:45 +08:00
2025-12-31 23:42:01 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00
2026-01-03 06:37:08 -08:00
2026-01-01 18:58:34 +08:00
2026-01-01 19:09:06 +08:00
2025-12-26 16:45:40 +08:00
2025-12-26 16:45:40 +08:00
2026-01-04 19:28:20 +08:00
2026-01-04 19:28:20 +08:00