fix(extension): v0.5.4 신호 감지 3중 버그 수정 — 세션 전환 즉시 probe, reviewAbsoluteUris 필드, stepIndex uint32 clamp + permission 매핑
This commit is contained in:
@@ -313,7 +313,7 @@ async function processResponseFile(filePath: string) {
|
||||
*/
|
||||
export async function tryApprovalStrategies(approved: boolean, sessionId: string, stepType: string = '', stepIndex: number = -1): Promise<string> {
|
||||
const action = approved ? 'APPROVE' : 'REJECT';
|
||||
const effectiveStepIndex = stepIndex >= 0 ? stepIndex : ctx.lastPendingStepIndex;
|
||||
const effectiveStepIndex = Math.max(0, stepIndex >= 0 ? stepIndex : ctx.lastPendingStepIndex);
|
||||
ctx.logToFile(`[APPROVAL] Starting ${action} strategies for session ${sessionId.substring(0, 8)} stepType=${stepType} stepIndex=${effectiveStepIndex}`);
|
||||
|
||||
// ── Dynamic Command Discovery (log what's available during WAITING state) ──
|
||||
@@ -388,6 +388,10 @@ export async function tryApprovalStrategies(approved: boolean, sessionId: string
|
||||
interactionPayload = { filePermission: { allow: true, scope } };
|
||||
} else if (typeLower.includes('elicitation')) {
|
||||
interactionPayload = { elicitation: {} };
|
||||
} else if (typeLower === 'permission' || typeLower.includes('permission')) {
|
||||
// DOM observer 'permission' type: browser_subagent Allow/Deny dialog
|
||||
// Try runExtensionCode first (most common for JS execution permission)
|
||||
interactionPayload = { runExtensionCode: { confirm: true } };
|
||||
} else {
|
||||
// Default: try run_command (most common)
|
||||
interactionPayload = { runCommand: { confirm: true } };
|
||||
|
||||
Reference in New Issue
Block a user