Update src/ai-repo-commander.user.js

This commit is contained in:
rob 2025-10-10 14:06:29 +00:00
parent 0b89645fb5
commit 539ed7d2f4
1 changed files with 9 additions and 3 deletions

View File

@ -35,7 +35,9 @@
// Timing & API // Timing & API
// If you see "debouncing → error" in logs (assistant streams very slowly), // If you see "debouncing → error" in logs (assistant streams very slowly),
// try bumping DEBOUNCE_DELAY by +10002000 and/or SETTLE_CHECK_MS by +400800. DEBOUNCE_DELAY: 3000, // try bumping DEBOUNCE_DELAY by +10002000 and/or SETTLE_CHECK_MS by +400800.
DEBOUNCE_DELAY: 3000,
MAX_RETRIES: 2, MAX_RETRIES: 2,
VERSION: '1.6.2', VERSION: '1.6.2',
API_TIMEOUT_MS: 60000, API_TIMEOUT_MS: 60000,
@ -62,7 +64,8 @@
// Streaming-complete hardening // Streaming-complete hardening
// SETTLE_CHECK_MS is the "stable window" after last text change; // SETTLE_CHECK_MS is the "stable window" after last text change;
// SETTLE_POLL_MS is how often we re-check the code block. REQUIRE_TERMINATOR: true, // SETTLE_POLL_MS is how often we re-check the code block.
REQUIRE_TERMINATOR: true,
SETTLE_CHECK_MS: 800, SETTLE_CHECK_MS: 800,
SETTLE_POLL_MS: 200, SETTLE_POLL_MS: 200,
@ -820,7 +823,10 @@
const el = getVisibleInputCandidate(); const el = getVisibleInputCandidate();
const btn = findSendButton(); const btn = findSendButton();
const btnReady = !btn || (!btn.disabled && btn.getAttribute('aria-disabled') !== 'true'); const btnReady = !btn || (!btn.disabled && btn.getAttribute('aria-disabled') !== 'true');
const busy = document.querySelector('[aria-busy="true"], [data-state="loading"], [disabled]'); const busy = document.querySelector(
'[aria-busy="true"], [data-state="loading"], ' +
'button[disabled], button[aria-disabled="true"]'
);
if (el && btnReady && !busy) return true; if (el && btnReady && !busy) return true;
await ExecutionManager.delay(pollMs); await ExecutionManager.delay(pollMs);
} }