feat(probe): v35 code_edit 자동 Accept — agentAcceptAllInFile 직접 호출 (v0.5.100)

Accept all 버튼이 Observer DOM에 없음 확인 (에디터 레이어).
step_probe에서 WAITING code_edit 감지 시 500ms 후 agentAcceptAllInFile 직접 실행.
Observer relay 필터에 ACCEPT 추가.
This commit is contained in:
Variet Worker
2026-04-20 04:05:47 +09:00
parent cf1352eefa
commit 2bf1eb41d1
4 changed files with 31 additions and 4 deletions

View File

@@ -12,4 +12,4 @@
### 검증 결과 ### 검증 결과
- 14/14 E2E 테스트 통과 - 14/14 E2E 테스트 통과
- SYNTAX OK - SYNTAX OK
- Accept all (diff review) 자동 승인 테스트 — v0.5.98 21:48 KST - Accept all (diff review) 자동 승인 테스트 — v0.5.99 04:01 KST

View File

@@ -1,12 +1,12 @@
{ {
"name": "gravity-bridge", "name": "gravity-bridge",
"version": "0.5.99", "version": "0.5.100",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "gravity-bridge", "name": "gravity-bridge",
"version": "0.5.99", "version": "0.5.100",
"dependencies": { "dependencies": {
"cheerio": "^1.2.0", "cheerio": "^1.2.0",
"ws": "^8.19.0" "ws": "^8.19.0"

View File

@@ -2,7 +2,7 @@
"name": "gravity-bridge", "name": "gravity-bridge",
"displayName": "Gravity Bridge", "displayName": "Gravity Bridge",
"description": "Discord-based unified approval system for Antigravity AI interactions.", "description": "Discord-based unified approval system for Antigravity AI interactions.",
"version": "0.5.99", "version": "0.5.100",
"publisher": "variet", "publisher": "variet",
"engines": { "engines": {
"vscode": "^1.100.0" "vscode": "^1.100.0"

View File

@@ -808,6 +808,19 @@ function setupMonitor() {
source: 'step_probe_offset', source: 'step_probe_offset',
safe_to_auto_run: isSafeToAutoRun, safe_to_auto_run: isSafeToAutoRun,
}); });
// v35: Auto-accept code edits (offset path)
if (['write_to_file', 'replace_file_content', 'multi_replace_file_content'].includes(toolName)) {
ctx.logToFile(`[STEP-PROBE] v35: code_edit (offset) → auto-accepting in 500ms`);
setTimeout(async () => {
try {
const vscode = require('vscode');
await vscode.commands.executeCommand('antigravity.prioritized.agentAcceptAllInFile');
ctx.logToFile(`[STEP-PROBE] ✅ agentAcceptAllInFile (offset) SUCCESS`);
} catch (e: any) {
ctx.logToFile(`[STEP-PROBE] ❌ agentAcceptAllInFile (offset): ${e.message?.substring(0, 100)}`);
}
}, 500);
}
} }
} }
// NOTE: no break — process ALL parallel WAITING steps // NOTE: no break — process ALL parallel WAITING steps
@@ -861,6 +874,20 @@ function setupMonitor() {
source: 'step_probe', source: 'step_probe',
safe_to_auto_run: isSafeToAutoRun, safe_to_auto_run: isSafeToAutoRun,
}); });
// v35: Auto-accept code edits via agentAcceptAllInFile
// Observer can't see "Accept all" button (different DOM layer)
if (['write_to_file', 'replace_file_content', 'multi_replace_file_content'].includes(toolName)) {
ctx.logToFile(`[STEP-PROBE] v35: code_edit detected → auto-accepting in 500ms`);
setTimeout(async () => {
try {
const vscode = require('vscode');
await vscode.commands.executeCommand('antigravity.prioritized.agentAcceptAllInFile');
ctx.logToFile(`[STEP-PROBE] ✅ agentAcceptAllInFile SUCCESS`);
} catch (e: any) {
ctx.logToFile(`[STEP-PROBE] ❌ agentAcceptAllInFile: ${e.message?.substring(0, 100)}`);
}
}, 500);
}
} }
} }
// NOTE: no break — process ALL parallel WAITING steps // NOTE: no break — process ALL parallel WAITING steps