feat: 自动修复重构与审查面板交互修复 + 静态分析 AI 翻译配对 + SQLFluff 方言显示
- 自动修复:废弃 AI 修复,改 linter 原生 fix 多轮收敛;CodeAction hover + 面板修复/全部修复 + 快照 diff 撤销;hover 修复不入「已修复」列表、重新审查清空;修复/撤销后自动保存;单条修复只修目标问题(区间重叠收敛,不再连带相邻同规则) - 审查面板:内联 JS 外部化(reviewPanel.js)修复 CSP 屏蔽导致的修复按钮/行号跳转/tab 失效;面板操作不依赖文件焦点(resolveFixDocument);行号跳转定位已打开编辑器,不在面板列新开副本 - 静态分析:translatedDiagnostics 规则 ID 归一化配对 + 深度审查 prompt 强化,静态分析条目显示中文翻译与逐条 AI 建议 - 波浪线:诊断补 source/code,hover 显示快速修复链接 - SQLFluff:设置面板方言徽章(显式/全局/项目/内置来源配色)
This commit is contained in:
@@ -137,6 +137,12 @@ function buildDeepReviewSystemPrompt(): string {
|
||||
重点分野:セキュリティ脆弱性、論理エラー、パフォーマンス問題、設計欠陥
|
||||
静的解析ですでに報告された問題を重複しないでください。
|
||||
|
||||
translatedDiagnosticsの要件:
|
||||
- 下記の「静的解析結果」に列挙された各診断に対して1件ずつ翻訳を返してください。件数と順序を一致させ、欠落させないでください
|
||||
- "originalRuleId" はリスト内のルールID(eslint: 等のプレフィックスを含む)をそのままコピーし、書き換えないでください
|
||||
- "translatedMessage" と "translatedSuggestion" は両方必須で、空にしないでください
|
||||
- "translatedSuggestion" は具体的で実行可能な修正提案(例:この書き方に置き換える)を示してください
|
||||
|
||||
JSONのみを出力。文字列内の二重引用符は \\" でエスケープしてください。
|
||||
形式:
|
||||
{
|
||||
@@ -153,6 +159,12 @@ JSONのみを出力。文字列内の二重引用符は \\" でエスケープ
|
||||
Focus on: security vulnerabilities, logic errors, performance issues, design flaws
|
||||
Do not duplicate issues already reported by static analysis.
|
||||
|
||||
translatedDiagnostics requirements:
|
||||
- Return exactly one translation for every diagnostic listed in "Static Analysis Results", same count and order, do not omit any
|
||||
- "originalRuleId" must be copied verbatim from the listed rule IDs (keep prefixes like eslint:), do not rewrite
|
||||
- "translatedMessage" and "translatedSuggestion" are both required and must not be empty
|
||||
- "translatedSuggestion" should be a concrete actionable fix suggestion (e.g. what to replace it with), not just a replacement snippet
|
||||
|
||||
Output JSON only. Double quotes in strings must be escaped with \\".
|
||||
Format:
|
||||
{
|
||||
@@ -168,6 +180,12 @@ Output language: en`;
|
||||
重点:安全漏洞、逻辑错误、性能问题、设计缺陷
|
||||
不要重复静态分析已报告的问题。
|
||||
|
||||
translatedDiagnostics 要求:
|
||||
- 必须为"静态分析结果"中列出的每一条诊断都返回一条翻译,条数与顺序一致,不得遗漏
|
||||
- "originalRuleId" 必须原样复制列表中的规则 ID(保留 eslint: 等前缀),不得改写
|
||||
- "translatedMessage" 与 "translatedSuggestion" 均为必填字段,不得为空
|
||||
- "translatedSuggestion" 给出具体可执行的修复建议(如应替换成什么写法),不要只给替换片段
|
||||
|
||||
仅输出 JSON,字符串中的双引号必须用 \\" 转义。
|
||||
格式:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user