From 1e7e391b0da8c47cc67bc32a8d81bc2e410d572f Mon Sep 17 00:00:00 2001 From: Wenaixi Date: Mon, 30 Mar 2026 22:58:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20SCHEDULED=5FHEALTH?= =?UTF-8?q?=5FCHECK=20=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 允许通过 UI API 查看和修改定时健康检查配置 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/ui-modules/config-api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui-modules/config-api.js b/src/ui-modules/config-api.js index eb43add..178831f 100644 --- a/src/ui-modules/config-api.js +++ b/src/ui-modules/config-api.js @@ -115,6 +115,9 @@ export async function handleUpdateConfig(req, res, currentConfig) { if (newConfig.LOG_MAX_FILE_SIZE !== undefined) currentConfig.LOG_MAX_FILE_SIZE = newConfig.LOG_MAX_FILE_SIZE; if (newConfig.LOG_MAX_FILES !== undefined) currentConfig.LOG_MAX_FILES = newConfig.LOG_MAX_FILES; + // Scheduled Health Check settings + if (newConfig.SCHEDULED_HEALTH_CHECK !== undefined) currentConfig.SCHEDULED_HEALTH_CHECK = newConfig.SCHEDULED_HEALTH_CHECK; + // Handle system prompt update if (newConfig.systemPrompt !== undefined) { const promptPath = currentConfig.SYSTEM_PROMPT_FILE_PATH || 'configs/input_system_prompt.txt'; @@ -175,7 +178,8 @@ export async function handleUpdateConfig(req, res, currentConfig) { TLS_SIDECAR_ENABLED: currentConfig.TLS_SIDECAR_ENABLED, TLS_SIDECAR_ENABLED_PROVIDERS: currentConfig.TLS_SIDECAR_ENABLED_PROVIDERS, TLS_SIDECAR_PORT: currentConfig.TLS_SIDECAR_PORT, - TLS_SIDECAR_PROXY_URL: currentConfig.TLS_SIDECAR_PROXY_URL + TLS_SIDECAR_PROXY_URL: currentConfig.TLS_SIDECAR_PROXY_URL, + SCHEDULED_HEALTH_CHECK: currentConfig.SCHEDULED_HEALTH_CHECK }; writeFileSync(configPath, JSON.stringify(configToSave, null, 2), 'utf-8');