From df19edd19ea181fd26ab6dc6b3ee071b34664221 Mon Sep 17 00:00:00 2001 From: QQ Date: Wed, 11 Nov 2026 10:51:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20src/routes.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/routes.ts b/src/routes.ts index 90ad635..f123b60 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -20,6 +20,7 @@ import type { SettingsView, SettingsStore, TokenView } from './store.ts' import type { Reporter } from './reporter.ts' import { renderConfigPage } from './page.ts' import type { CloudMemoryWebRoute } from './context-types.ts' +import type { SkillSyncStats } from './skill-sync.ts' /** Route constants — kept in one place so the client half can reuse them. */ export const ROUTES = { @@ -40,6 +41,8 @@ export interface RouteDeps { store: SettingsStore reporter: Reporter client: () => CloudClient + /** Latest skill-sync stats, when the engine is wired in. */ + skills?: () => SkillSyncStats } /** Collect a request body as UTF-8 text. */ @@ -102,8 +105,13 @@ function statusPayload(deps: RouteDeps): Record { defaultK: view.defaultK, summaryEnabled: view.summaryEnabled, summaryMaxChars: view.summaryMaxChars, + skillsSyncEnabled: view.skillsSyncEnabled, + skillsDir: view.skillsDir, + } + return { + ok: true, settings, tokens, settingsPath: view.statePath, reporter: deps.reporter.snapshot(), + ...(deps.skills === undefined ? {} : { skills: deps.skills() }), } - return { ok: true, settings, tokens, settingsPath: view.statePath, reporter: deps.reporter.snapshot() } } /** Serve the configuration page. */