wonder
3e93344c7b
test: 添加单元测试(config/services/handlers,共 59 个用例)
Deploy PR-Helper / deploy (push) Successful in 40s
2026-06-24 18:28:14 +08:00
wonder
8e8ea6a07d
refactor: 合并 PR 描述生成和 AI 代码审查到仓库详情页
...
Deploy PR-Helper / deploy (push) Successful in 2m9s
- 新增 PR 描述 tab:流式生成 + 双栏实时预览(渲染效果 + Markdown 源码)
- 新增 AI 代码审查 tab:Top-N/并发设置、历史记录、进度条、总结、备注、PDF 导出、内联 Diff
- 保留 Diff 视图中的 AI 评审快捷内联按钮
- Repo handler 传递 TopN/Concurrency 设置
- 删除独立的 generate.html 和 review.html 页面及路由
2026-06-23 21:55:05 +08:00
wonder
496e3ba71e
refactor: LLM 直接输出 Markdown,移除 JSON 解析层
...
Deploy PR-Helper / deploy (push) Successful in 30s
服务端:
- prompt 改为要求直接输出 Markdown,不再输出 JSON
- GeneratePR 返回 string 而非 PRDescription 结构体
- 移除 JSON 解析、extractJSON、fixInlineCode 等逻辑
- ChatStream 的 content 事件直接携带 Markdown 片段流式传输
前端:
- generate() 仅处理 content + done + error 三个事件
- content 事件累积 Markdown 文本,实时渲染到两栏
- 移除 parsePartialJSON、buildMarkdown 等中间层
- 代码量从 ~100 行减至 ~50 行
2026-06-21 16:02:05 +08:00
wonder
55bfdf08ce
i18n: 中文化所有错误消息和用户交互文本
...
Deploy PR-Helper / deploy (push) Successful in 31s
- Go 后端 handler 错误消息统一中文化(middleware/repos/generate/review/settings)
- 前端 JS 加载和错误消息中文化(diff-viewer.js, graph.js)
- 模板页面错误 fallback 和静态文本中文化(index/generate/review/base)
- 消除中英文混杂,提升中文用户体验
2026-06-21 15:11:20 +08:00
wonder
a6bd46db34
feat: support private repo cloning with HTTP basic auth
...
Deploy PR-Helper / deploy (push) Successful in 30s
- Add SSH URL detection with friendly prompt to use HTTPS instead
- Add private repo toggle (default off) with username/password fields
- Persist auth_type and credential in repositories table
- Pass stored credentials to PullRepo for authenticated pulls
- Incremental migration adds auth_type and credential columns
2026-06-21 14:58:12 +08:00
wonder
1359c5c339
fix: use MySQL-compatible datetime format for cloned_at
...
Deploy PR-Helper / deploy (push) Successful in 22s
RFC3339 format (T separator, Z suffix) is rejected by MySQL DATETIME columns.
Use '2006-01-02 15:04:05' instead.
2026-06-21 14:39:36 +08:00
wonder
20be99b287
feat: add git pull to update cached repositories from remote
...
Deploy PR-Helper / deploy (push) Successful in 34s
- Replace dead FetchRemote with PullRepo (fetch + merge) in services/git.go
- Add POST /api/repos/:id/pull endpoint with DB size/last_used update
- Add '更新' button next to each cached repo in the index page
2026-06-21 14:31:33 +08:00
wonder
735126ff56
fix: escape 'key' as reserved word in all MySQL queries with backticks
2026-06-20 23:21:24 +08:00
wonder
00c1839635
feat: migrate database from SQLite to MySQL with .env configuration
...
- Replace go-sqlite3 with go-sql-driver/mysql (pure Go, no CGO needed)
- Add joho/godotenv for .env file loading
- Rewrite database/db.go with MySQL-compatible DDL (BIGINT AUTO_INCREMENT, InnoDB, utf8mb4)
- Convert all SQLite-specific SQL: INSERT OR IGNORE → INSERT IGNORE,
INSERT OR REPLACE → INSERT ... ON DUPLICATE KEY UPDATE,
datetime('now') → NOW(), date arithmetic → DATE_SUB()
- Add MySQL config fields to config.go (host/port/user/password/database)
- Add .env.example with connection parameter template
- Update Dockerfile: remove CGO/gcc/musl dependency, smaller build
- Update docker-compose.yml: add MySQL service container with healthcheck
- Update CLAUDE.md documentation
2026-06-20 22:40:46 +08:00
wonder
6c60b767df
refactor: replace chromedp with browser native print for PDF export
...
Remove chromedp dependency, use window.print() instead. Docker image no longer needs Chromium (~200MB smaller).
- Delete services/pdf.go and templates/reports/review.html
- Remove PDF API route POST /api/repos/:id/review/pdf
- Add @media print CSS to review page
- Remove chromium from Dockerfile
2026-06-20 22:26:46 +08:00
wonder
292588ef23
feat: 将默认 LLM 配置从 OpenAI 切换为 DeepSeek (deepseek-v4-pro)
2026-06-20 22:03:09 +08:00
wonder
9c843b79ba
feat: 添加用户注册登录功能,实现数据和配置的用户隔离
...
- 新增 users 和 user_settings 表,repositories/analyses/review_notes 添加 user_id 列
- 实现基于邮箱+密码的注册登录,密码使用 bcrypt 哈希
- 使用 gin-contrib/sessions cookie-based session 管理
- 所有仓库、分析记录、review notes 按用户隔离
- 用户设置(LLM 配置、review 参数、缓存配置)独立存储
- 新增登录/注册页面,导航栏显示用户邮箱和退出按钮
- 前端 fetch 请求统一添加 credentials: 'same-origin'
- 支持 SESSION_SECRET 环境变量配置会话密钥
2026-06-20 21:57:46 +08:00
wonder
72c7d8e7b3
fix: 在 handler 中检查错误,不再静默丢弃
2026-06-20 00:06:00 +08:00
wonder
a66074e49c
feat: 并发文件审查,可配置并行度
2026-06-19 23:40:13 +08:00
wonder
0528eee4de
feat: 持久化 AI 审查结果,文件级内联展示与页面集成
2026-06-19 23:24:06 +08:00
wonder
b35d6f874b
feat: Phase 5 — 审查备注编辑器与 PDF 导出
2026-06-19 22:10:13 +08:00
wonder
afb270721c
feat: Phase 4 — LLM 集成,PR 描述生成与 AI 代码审查
2026-06-19 19:43:18 +08:00
wonder
4f873cf2ce
fix: 改进 SSE 克隆处理,仓库页面添加调试信息
2026-06-18 23:04:58 +08:00
wonder
34ef868e10
feat: Phase 2 — Git 核心功能,go-git 克隆、SSE 进度、D3.js 图形、diff2html 查看器
2026-06-18 22:59:51 +08:00
wonder
1e9b1a2129
feat: Phase 1 — 项目骨架搭建,集成 Gin、SQLite 和设置页面
2026-06-18 22:48:16 +08:00