feat(bridge): v17 Always run auto-approve + Retry button relay (v0.5.53) #task-632
- Observer v17: ACTION_WORDS에 'Retry' 추가 — Agent terminated 대화상자의 Retry 버튼 감지/릴레이 - http-bridge: 'Always run' 버튼 자동승인 — response 파일 즉시 생성하여 observer가 바로 클릭 - bot.py: auto_approved 상태 처리 — Discord에 비대화형 '자동 승인' 알림 표시 - Observer matchedType에 'retry' step_type 매핑
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export function generateApprovalObserverScript(_port: number): string {
|
||||
return `
|
||||
// ── Gravity Bridge v16: AG Native Chat Relay + Style Strip ──
|
||||
// v16: AG Native style/script strip + #conversation + .leading-relaxed.select-text chat body scanning
|
||||
// ── Gravity Bridge v17: Always Run Auto-Approve + Retry Detection ──
|
||||
// v17: "Always run" auto-approve at bridge level + Retry button relay to Discord
|
||||
(function(){
|
||||
'use strict';
|
||||
var BASE='',_obs=false,_sent={},_ready=false;
|
||||
@@ -10,7 +10,7 @@ export function generateApprovalObserverScript(_port: number): string {
|
||||
var CLEANUP_MS=300000;
|
||||
|
||||
function log(m){console.log('[GB Observer] '+m);}
|
||||
log('v16 Script loaded — AG Native Chat Relay + Style Strip');
|
||||
log('v17 Script loaded — Always Run Auto-Approve + Retry Detection');
|
||||
|
||||
// DIAGNOSTIC BEACON: immediate POST to confirm script execution in renderer
|
||||
try {
|
||||
@@ -231,7 +231,7 @@ export function generateApprovalObserverScript(_port: number): string {
|
||||
return extractStepContext(b);
|
||||
}
|
||||
|
||||
var ACTION_WORDS = ['Allow', 'Run', 'Approve', 'Accept', 'Always allow', 'Always run'];
|
||||
var ACTION_WORDS = ['Allow', 'Run', 'Approve', 'Accept', 'Always allow', 'Always run', 'Retry'];
|
||||
var REJECT_WORDS = ['Reject', 'Cancel', 'Deny', 'Stop', 'Decline', 'Dismiss'];
|
||||
|
||||
function isActionBtn(txt) {
|
||||
@@ -713,7 +713,7 @@ export function generateApprovalObserverScript(_port: number): string {
|
||||
continue;
|
||||
}
|
||||
|
||||
var matchedType = txt.includes('Accept') ? 'diff_review' : (txt.includes('Run') || txt.includes('Allow') ? 'command' : 'permission');
|
||||
var matchedType = txt.includes('Accept') ? 'diff_review' : (txt === 'Retry' ? 'retry' : (txt.includes('Run') || txt.includes('Allow') ? 'command' : 'permission'));
|
||||
|
||||
// v7: Use step-index for more unique group key
|
||||
var stepContainer = getStepContainer(b);
|
||||
|
||||
Reference in New Issue
Block a user