From 13344e2bbf84adace23e828cbac1b0038d3915c1 Mon Sep 17 00:00:00 2001 From: QQ Date: Wed, 11 Nov 2026 10:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20src/config.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.ts b/src/config.ts index b432871..ddc9bfc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -13,6 +13,8 @@ export const DEFAULT_SETTINGS: Settings = { defaultK: 10, summaryEnabled: true, summaryMaxChars: 6000, + skillsSyncEnabled: true, + skillsDir: '', } /** Effective, fully-resolved settings. */ @@ -31,6 +33,10 @@ export interface Settings { summaryEnabled: boolean /** Maximum transcript characters sent for one summary (privacy/cost cap). */ summaryMaxChars: number + /** Bidirectional skill sync between the cloud skill center and the local skills directory. */ + skillsSyncEnabled: boolean + /** Local skills directory override; empty means `$DSH_HOME/skills`. */ + skillsDir: string } /** Raw row config as it comes out of the cordis loader. */ @@ -85,5 +91,7 @@ export function settingsFromConfig(raw: unknown): Partial { if (typeof source.summaryEnabled === 'boolean') result.summaryEnabled = source.summaryEnabled 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 }