From 36746ed17b2beb5d3af9c68b6e646e8f50c61d24 Mon Sep 17 00:00:00 2001 From: Nexus Dev Date: Fri, 3 Apr 2026 22:33:43 +0000 Subject: [PATCH] feat(34-01): register chatFileRoutes + nexusSettingsRoutes in app.ts, add voiceEnabled to nexus-settings - Add chatFileRoutes(db, storageService) after assistantHandoffRoutes (inside boardMutationGuard) - Add nexusSettingsRoutes() after chatFileRoutes - Extend nexusSettingsSchema with voiceEnabled: z.boolean().default(false) - Update default return values in nexusSettingsService.get() to include voiceEnabled: false - Add voiceEnabled?: boolean to NexusSettings client interface in hardware.ts --- server/src/app.ts | 4 ++++ server/src/services/nexus-settings.ts | 5 +++-- ui/src/api/hardware.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/server/src/app.ts b/server/src/app.ts index c94f1ac3..e851b90f 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -30,6 +30,8 @@ import { assetRoutes } from "./routes/assets.js"; import { accessRoutes } from "./routes/access.js"; import { assistantMemoryRoutes } from "./routes/assistant-memory.js"; import { assistantHandoffRoutes } from "./routes/assistant-handoff.js"; +import { chatFileRoutes } from "./routes/chat-files.js"; +import { nexusSettingsRoutes } from "./routes/nexus-settings.js"; import { pluginRoutes } from "./routes/plugins.js"; import { pluginUiStaticRoutes } from "./routes/plugin-ui-static.js"; import { applyUiBranding } from "./ui-branding.js"; @@ -170,6 +172,8 @@ export async function createApp( api.use(instanceSettingsRoutes(db)); api.use(assistantMemoryRoutes()); api.use(assistantHandoffRoutes(db)); + api.use(chatFileRoutes(db, opts.storageService)); + api.use(nexusSettingsRoutes()); const hostServicesDisposers = new Map void>(); const workerManager = createPluginWorkerManager(); const pluginRegistry = pluginRegistryService(db); diff --git a/server/src/services/nexus-settings.ts b/server/src/services/nexus-settings.ts index a151cc19..53960da8 100644 --- a/server/src/services/nexus-settings.ts +++ b/server/src/services/nexus-settings.ts @@ -8,6 +8,7 @@ export type NexusMode = (typeof NEXUS_MODES)[number]; const nexusSettingsSchema = z.object({ mode: z.enum(NEXUS_MODES).default("both"), + voiceEnabled: z.boolean().default(false), }); type NexusSettings = z.infer; @@ -25,9 +26,9 @@ export function nexusSettingsService() { if (parsed.success) { return parsed.data; } - return { mode: "both" }; + return { mode: "both", voiceEnabled: false }; } catch { - return { mode: "both" }; + return { mode: "both", voiceEnabled: false }; } } diff --git a/ui/src/api/hardware.ts b/ui/src/api/hardware.ts index 4e459bb7..4b1fab09 100644 --- a/ui/src/api/hardware.ts +++ b/ui/src/api/hardware.ts @@ -19,6 +19,7 @@ export type NexusMode = "personal_ai" | "project_builder" | "both"; export interface NexusSettings { mode: NexusMode; + voiceEnabled?: boolean; } export function fetchHardwareInfo(): Promise {