feat: hardcode wait time and default response as constants

Changes:
- Add DEFAULT_WAIT_SECONDS = 50 (replaces config.default_wait_seconds)
- Add DEFAULT_EMPTY_RESPONSE = 'call this tool... ' (replaces config.default_empty_response)
- Remove wait and empty response fields from WebUI Settings panel
  (only agent_stale_after_seconds remains configurable)
Rationale:
These values are fundamental to the 60s timeout mitigation strategy and
should not be user-configurable. The 50s wait with 5s keepalives is the
optimal balance for staying under the Copilot 60s wall-clock limit while
providing responsive progress feedback.
This commit is contained in:
Brandon Zhang
2026-03-27 15:45:06 +08:00
parent ba91349232
commit 4db402f258
2 changed files with 0 additions and 16 deletions

View File

@@ -112,16 +112,12 @@ export function initStatus() {
export function initConfig() {
const form = document.getElementById('config-form');
const waitInput = document.getElementById('cfg-wait');
const emptyInput = document.getElementById('cfg-empty');
const staleInput = document.getElementById('cfg-stale');
const saveBtn = document.getElementById('cfg-save');
// Populate from state
state.subscribe('config', (cfg) => {
if (!cfg) return;
waitInput.value = cfg.default_wait_seconds;
emptyInput.value = cfg.default_empty_response;
staleInput.value = cfg.agent_stale_after_seconds;
});
@@ -133,8 +129,6 @@ export function initConfig() {
try {
const cfg = await api.updateConfig({
default_wait_seconds: parseInt(waitInput.value, 10) || 10,
default_empty_response: emptyInput.value,
agent_stale_after_seconds: parseInt(staleInput.value, 10) || 30,
});
state.set('config', cfg);