## English
SVN Audit Assistant is a VS Code extension designed for SVN developers to simplify the incremental code review process. It aggregates code changes by author and time period, providing line-level comments, AI-assisted reviews, and automated report exports to help teams efficiently control code quality.
- 📂 Audit Session Management: Create audit sessions based on SVN URLs, specific developers, and time ranges. All data is stored in a local SQLite database.
- 🔍 Incremental Diff & Annotation: One-click internal Diff view with line-level comments (via
Enterkey). - 🤖 AI-Powered Review: Built-in support for DeepSeek, OpenAI, Claude, Gemini, Kimi, GLM, etc. AI can automatically analyze code and generate work summaries.
- 📊 Report Export: Export audit results for the entire session or specific individuals to standard Markdown documents.
- Config: Click the SVN Audit icon -> Settings. Configure SVN credentials and AI Engine.
- Create Session: Click + (New Review Session). Enter SVN URL, authors, and time range.
- Audit: Expand the session, select a file, and press
Enterto add a comment in the Diff view. - Export: Click the Export button next to a session or person to save the report.
If you want team members to share data (sessions/comments/summaries), deploy the backend server in the server/ directory and configure the extension to use server mode.
- macOS
cd server/deploy
bash deploy-macos.sh- Linux
cd server/deploy
bash deploy-linux.sh- Windows (CMD)
cd server\deploy
deploy-windows.batThe deploy scripts will:
- Check Node.js (18+) and MongoDB availability.
- Install dependencies and build TypeScript output.
- Create
.envfrom.env.exampleif missing. - Start server using
pm2with process namecode-review-server.
cd server/deploy
docker compose up -d --buildThis starts:
mongodbon port27017code-review-serveron port3000
PORT=3000MONGODB_URI=mongodb://localhost:27017/code_review(local mode)JWT_SECRET=your-secret-key-change-this(change in production)JWT_EXPIRES_IN=7d
- Health endpoint:
http://localhost:3000/api/health - PM2 status (script deploy):
pm2 status - Docker status (compose deploy):
docker compose ps
Open extension settings and enable server mode, then set the server base URL (for example: http://localhost:3000).
## 中文
SVN Audit Assistant 是一款专为 SVN 开发者设计的 VS Code 插件,旨在简化增量代码审查流程。它通过按人员和时间段聚合代码修改,提供行级批注、AI 辅助审查以及自动化报告导出功能,助力团队高效把控代码质量。
- 📂 审计会话管理 (Audit Sessions):按 SVN 地址、开发人员及时间范围创建会话。所有数据持久化存储在本地 SQLite 中。
- 🔍 增量对比与批注:内置 Diff 视图,支持在差异窗口直接通过
Enter键添加行级批注。 - 🤖 AI 智能辅助 (AI Power):支持 DeepSeek、OpenAI、Claude、Kimi 等主流模型。AI 可自动分析代码漏洞并生成工作总结。
- 📊 报告导出:支持将审计结果(含批注、修改点)一键导出为标准 Markdown 报表。
- 基础配置:点击侧边栏图标 -> 设置 (Settings),配置 SVN 账号及 AI 引擎。
- 创建会话:点击标题栏的 + 按钮。输入 SVN 地址、人员列表及时间范围。
- 开始审计:在侧边栏选中文件,点击打开 Diff 视图,按
Enter键添加评论。 - 导出结果:点击会话或人员旁的 导出 (Export) 按钮即可生成报告。
如果你希望团队成员共享会话、评论和总结数据,可部署 server/ 目录下的后端服务,并在插件中启用服务器模式。
- macOS
cd server/deploy
bash deploy-macos.sh- Linux
cd server/deploy
bash deploy-linux.sh- Windows (CMD)
cd server\deploy
deploy-windows.bat脚本会自动完成:
- 检查 Node.js(18+)与 MongoDB 是否可用。
- 安装依赖并构建 TypeScript。
- 若不存在
.env,会从.env.example自动生成。 - 使用
pm2启动服务,进程名为code-review-server。
cd server/deploy
docker compose up -d --build该方式会启动:
mongodb(端口27017)code-review-server(端口3000)
PORT=3000MONGODB_URI=mongodb://localhost:27017/code_review(本地模式)JWT_SECRET=your-secret-key-change-this(生产环境请务必修改)JWT_EXPIRES_IN=7d
- 健康检查:
http://localhost:3000/api/health - PM2 状态(脚本部署):
pm2 status - Docker 状态(Compose 部署):
docker compose ps
在插件设置中启用服务器模式,并填写服务地址(例如 http://localhost:3000)。
- Enter: Add/Edit comment in Diff View (在差异视图中添加/编辑评论)。
The extension UI language will automatically switch with the VS Code language setting. 插件界面语言将跟随 VS Code 语言设置自动切换。
Tip
Enabling "Debug Mode" allows you to view detailed AI request payloads and bodies in the output window for easy debugging.