refactor: 品牌重命名 + maxTokens 支持 + 设置面板简化
- CodeGuard → Code Purifier / 净码特工(displayName、命令、配置标题) - 新增 ai.maxTokens 配置项,所有 Provider 及 fixer 传入 maxTokens - AI 引擎增强:repairJsonEscapes + JSON 解析 fallback + 详细错误信息 - 设置面板规则管理改为文件级(list/delete .yaml),addRule 改为 AI 从 Markdown 生成 YAML - yaml-parser 简化:移除 config.yaml 的 enable/disable 过滤逻辑 - 审查报告面板:errorBanner 优先显示具体错误、lint 诊断显示 suggestion、移除 translatedDiagnostics 独立渲染 - merger 中 translatedDiagnostics 覆盖原始 lint 诊断 message/suggestion - HTML linter 配置项、测试用例重写、typescript-eslint 移入 dependencies
This commit is contained in:
@@ -444,7 +444,7 @@ interface AIFinding {
|
||||
"activitybar": [
|
||||
{
|
||||
"id": "code-reviewer",
|
||||
"title": "CodeGuard 代码审查",
|
||||
"title": "净码特工",
|
||||
"icon": "images/icon.png"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -461,7 +461,7 @@ applyFix() 应用修复到编辑器(单条 / 批量倒序)
|
||||
"viewsContainers": {
|
||||
"activitybar": [{
|
||||
"id": "code-reviewer",
|
||||
"title": "CodeGuard 代码审查",
|
||||
"title": "净码特工",
|
||||
"icon": "images/icon.png"
|
||||
}]
|
||||
},
|
||||
|
||||
@@ -173,7 +173,7 @@ import { registerCommands } from './activation/commands';
|
||||
let orchestrator: Orchestrator;
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
console.log('CodeGuard 代码审查插件已激活');
|
||||
console.log('净码特工 · Code Purifier 已激活');
|
||||
|
||||
orchestrator = new Orchestrator();
|
||||
registerCommands(context, orchestrator);
|
||||
@@ -213,14 +213,14 @@ export function deactivate() {
|
||||
```json
|
||||
{
|
||||
"commands": [
|
||||
{ "command": "codeReviewer.review", "title": "CodeGuard: 运行代码审查" },
|
||||
{ "command": "codeReviewer.reviewSelection", "title": "CodeGuard: 审查选中代码" },
|
||||
{ "command": "codeReviewer.openPanel", "title": "CodeGuard: 打开审查面板" },
|
||||
{ "command": "codeReviewer.exportReport", "title": "CodeGuard: 导出报告" },
|
||||
{ "command": "codeReviewer.addCustomRule", "title": "CodeGuard: 添加自定义规则" },
|
||||
{ "command": "codeReviewer.fixIssue", "title": "CodeGuard: 修复此问题" },
|
||||
{ "command": "codeReviewer.fixAll", "title": "CodeGuard: 批量修复" },
|
||||
{ "command": "codeReviewer.openSetup", "title": "CodeGuard: 打开设置面板" }
|
||||
{ "command": "codeReviewer.review", "title": "净码特工: 运行代码审查" },
|
||||
{ "command": "codeReviewer.reviewSelection", "title": "净码特工: 审查选中代码" },
|
||||
{ "command": "codeReviewer.openPanel", "title": "净码特工: 打开审查面板" },
|
||||
{ "command": "codeReviewer.exportReport", "title": "净码特工: 导出报告" },
|
||||
{ "command": "codeReviewer.addCustomRule", "title": "净码特工: 添加自定义规则" },
|
||||
{ "command": "codeReviewer.fixIssue", "title": "净码特工: 修复此问题" },
|
||||
{ "command": "codeReviewer.fixAll", "title": "净码特工: 批量修复" },
|
||||
{ "command": "codeReviewer.openSetup", "title": "净码特工: 打开设置面板" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -411,7 +411,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
## 验收
|
||||
|
||||
- [ ] 侧边栏显示 CodeGuard 设置视图
|
||||
- [ ] 侧边栏显示 净码特工 设置视图
|
||||
- [ ] 快速开始三步引导可见
|
||||
- [ ] API Key 可输入并保存到 SecretStorage
|
||||
- [ ] 提供商/模型可切换
|
||||
|
||||
Reference in New Issue
Block a user