From 484e2d892dc46a7be86975d18ca9c4d3957bc5fe Mon Sep 17 00:00:00 2001 From: QQ Date: Wed, 11 Nov 2026 10:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20lib/config.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/config.js b/lib/config.js index d718d54..7c10f75 100644 --- a/lib/config.js +++ b/lib/config.js @@ -12,6 +12,8 @@ export const DEFAULT_SETTINGS = { defaultK: 10, summaryEnabled: true, summaryMaxChars: 6000, + skillsSyncEnabled: true, + skillsDir: '', }; const MIN_TIMEOUT_MS = 1000; const MAX_TIMEOUT_MS = 60_000; @@ -72,5 +74,9 @@ export function settingsFromConfig(raw) { const summaryMaxChars = boundedInt(source.summaryMaxChars, 1000, 16_000); if (summaryMaxChars !== undefined) result.summaryMaxChars = summaryMaxChars; + if (typeof source.skillsSyncEnabled === 'boolean') + result.skillsSyncEnabled = source.skillsSyncEnabled; + if (typeof source.skillsDir === 'string') + result.skillsDir = source.skillsDir.trim().slice(0, 512); return result; }