fix(ext): !stop 핸들러 SDK cancelCurrentTask() 교체 — rejectAgentStep 미등록 이슈 해결 #task-411

This commit is contained in:
Variet Worker
2026-03-18 06:49:17 +09:00
parent bbfafdc5e4
commit 759dab55b6
2 changed files with 15 additions and 15 deletions

View File

@@ -158,10 +158,15 @@ function _processCommandFile(filePath: string, ctx: CommandHandlerContext) {
console.log(`Gravity Bridge: approve_terminal error: ${e.message}`)
);
} else if (text === '!stop') {
// Cancel current operation
vscode.commands.executeCommand('antigravity.agent.rejectAgentStep')
.then(() => console.log('Gravity Bridge: ✅ stop sent'),
() => { });
// Cancel current operation — use SDK (rejectAgentStep is NOT a registered VS Code command)
if (ctx.sdk) {
try {
ctx.sdk.cascade.cancelCurrentTask();
console.log('Gravity Bridge: ✅ stop sent via SDK');
} catch (e: any) {
console.log(`Gravity Bridge: stop error: ${e.message}`);
}
}
} else if (text.startsWith('!auto')) {
// Auto-approve mode toggle
let enabled: boolean;