fix(bridge): v37 openReviewChanges 선호출 — agentAcceptAllInFile 실효성 보장 (v0.5.102)
agentAcceptAllInFile은 diff review 패널이 포커스되어야 동작. v34에서 직접 호출만 했더니 SUCCESS 반환하지만 실제 효과 없음. openReviewChanges → 500ms 대기 → agentAcceptAllInFile 순서로 수정.
This commit is contained in:
@@ -12,4 +12,4 @@
|
||||
### 검증 결과
|
||||
- 14/14 E2E 테스트 통과
|
||||
- SYNTAX OK
|
||||
- Accept all (diff review) 자동 승인 테스트 — v0.5.100 04:13 KST ✅
|
||||
- Accept all (diff review) v36 span 감지 테스트 — v0.5.101 04:30 KST
|
||||
|
||||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "gravity-bridge",
|
||||
"version": "0.5.101",
|
||||
"version": "0.5.102",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gravity-bridge",
|
||||
"version": "0.5.101",
|
||||
"version": "0.5.102",
|
||||
"dependencies": {
|
||||
"cheerio": "^1.2.0",
|
||||
"ws": "^8.19.0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "gravity-bridge",
|
||||
"displayName": "Gravity Bridge",
|
||||
"description": "Discord-based unified approval system for Antigravity AI interactions.",
|
||||
"version": "0.5.101",
|
||||
"version": "0.5.102",
|
||||
"publisher": "variet",
|
||||
"engines": {
|
||||
"vscode": "^1.100.0"
|
||||
|
||||
@@ -302,12 +302,22 @@ function _handlePending(req: any, res: any, ctx: HttpBridgeContext) {
|
||||
// v34: If this is "Accept all" / "Accept", also call agentAcceptAllInFile directly
|
||||
const isAcceptAll = /^Accept/i.test(rawCmd) || (data.step_type === 'diff_review');
|
||||
if (isAcceptAll) {
|
||||
ctx.logToFile(`[HTTP] AUTO-APPROVE Accept all → calling agentAcceptAllInFile directly`);
|
||||
ctx.logToFile(`[HTTP] AUTO-APPROVE Accept all → opening review + agentAcceptAllInFile`);
|
||||
try {
|
||||
const vscode = require('vscode');
|
||||
vscode.commands.executeCommand('antigravity.prioritized.agentAcceptAllInFile')
|
||||
.then(() => ctx.logToFile(`[HTTP] ✅ agentAcceptAllInFile SUCCESS`))
|
||||
.catch((e: any) => ctx.logToFile(`[HTTP] ❌ agentAcceptAllInFile failed: ${e.message?.substring(0, 100)}`));
|
||||
// v37: Must focus diff review panel BEFORE calling agentAcceptAllInFile
|
||||
// Without this, the command succeeds but has no effect
|
||||
(async () => {
|
||||
try {
|
||||
await vscode.commands.executeCommand('antigravity.openReviewChanges');
|
||||
ctx.logToFile(`[HTTP] openReviewChanges OK`);
|
||||
await new Promise((r: any) => setTimeout(r, 500));
|
||||
await vscode.commands.executeCommand('antigravity.prioritized.agentAcceptAllInFile');
|
||||
ctx.logToFile(`[HTTP] ✅ agentAcceptAllInFile SUCCESS`);
|
||||
} catch (e: any) {
|
||||
ctx.logToFile(`[HTTP] ❌ agentAcceptAllInFile: ${e.message?.substring(0, 100)}`);
|
||||
}
|
||||
})();
|
||||
} catch (e: any) { ctx.logToFile(`[HTTP] ❌ vscode require failed: ${e.message}`); }
|
||||
}
|
||||
// Try enrichment for better Discord display text
|
||||
|
||||
Reference in New Issue
Block a user