From 3575dec2eec7196e0ff67763f8332170534a556c Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 7 Oct 2025 23:05:27 +0000 Subject: [PATCH] Update src/ai-repo-commander.user.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Increase API timeout from 30s to 60s ✅ Prevent scanning when paused Recommended (nice to have): 3. ✅ Make API timeout configurable 4. ✅ Optimize timing values based on your successful test --- src/ai-repo-commander.user.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ai-repo-commander.user.js b/src/ai-repo-commander.user.js index 59bbbf4..1d337d0 100644 --- a/src/ai-repo-commander.user.js +++ b/src/ai-repo-commander.user.js @@ -32,9 +32,12 @@ DEBUG_WATCH_MS: 120000, DEBUG_MAX_LINES: 400, DEBUG_SHOW_PANEL: true, - DEBOUNCE_DELAY: 5000, // bot-typing protection + + // Timing & API + DEBOUNCE_DELAY: 3000, // was 5000 MAX_RETRIES: 2, VERSION: '1.4.0', + API_TIMEOUT_MS: 60000, // NEW: configurable API timeout PROCESS_EXISTING: false, ASSISTANT_ONLY: true, @@ -52,10 +55,10 @@ POST_PASTE_DELAY_MS: 250, SUBMIT_MODE: 'button_first', // 'button_first' | 'enter_only' | 'smart' - // Streaming-complete hardening (DeepSeek #2) + // Streaming-complete hardening REQUIRE_TERMINATOR: true, // require trailing '---' line - SETTLE_CHECK_MS: 1500, // time to see the block remain unchanged - SETTLE_POLL_MS: 300, // poll interval for stability + SETTLE_CHECK_MS: 800, // was 1500 + SETTLE_POLL_MS: 200, // was 300 // Runtime toggles RUNTIME: { PAUSED: false } @@ -285,6 +288,9 @@ +

Config JSON

@@ -435,12 +441,12 @@ }); // Set initial UI states - const pauseBtn = root.querySelector('.rc-pause'); pauseBtn.textContent = this.cfg.RUNTIME.PAUSED ? 'Resume' : 'Pause'; if (this.cfg.RUNTIME.PAUSED) { pauseBtn.style.background = '#f59e0b'; pauseBtn.style.color = '#111827'; } + } _renderRow(e) { @@ -846,7 +852,7 @@ url: command.url, headers: { 'X-Bridge-Key': bridgeKey, 'Content-Type': 'application/json' }, data: JSON.stringify(command), - timeout: 30000, + timeout: CONFIG.API_TIMEOUT_MS || 60000, onload: (response) => (response.status >= 200 && response.status < 300) ? resolve(response) : reject(new Error(`API Error ${response.status}: ${response.statusText}`)),