fix(ai-review comment): 顯示審查問題原因
This commit is contained in:
@@ -115,7 +115,7 @@ describe('findings exclusions', () => {
|
||||
|
||||
it('builds a compact exclusion hint for AI', async () => {
|
||||
const findings = [
|
||||
{ level: 'warning', role: 'Maya', location: 'src/app.cs:12', suggestion: 'update tests' },
|
||||
{ level: 'warning', role: 'Maya', location: 'src/app.cs:12', problem: '缺少測試驗證', suggestion: 'update tests' },
|
||||
];
|
||||
const exclusions = [
|
||||
{ location: 'src/app.cs:1', original_finding: '更新套件後請補上測試驗證' },
|
||||
@@ -138,6 +138,7 @@ describe('findings exclusions', () => {
|
||||
assert.ok(capturedSystemPrompt.includes('paths=src/app.cs, src/service.cs'));
|
||||
assert.ok(capturedSystemPrompt.includes('請確認安全性變更'));
|
||||
assert.ok(capturedUserContent.includes('"location":"src/app.cs:12"'));
|
||||
assert.ok(capturedUserContent.includes('"problem":"缺少測試驗證"'));
|
||||
assert.ok(capturedUserContent.includes('"suggestion":"update tests"'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user