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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user