wip: remove opencode, searxng, resources; fix user settings read

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 07:27:19 +00:00
co-authored by Claude Opus 4.6
parent 5925ac49a1
commit 7bbcccabf1
46 changed files with 325 additions and 2037 deletions
+2 -14
View File
@@ -1,6 +1,5 @@
import { createRouter } from '../../create-router';
import { readServerSettings, writeServerSettings } from 'officerdb';
import { readResourceConfig } from './resources';
type TtsConfig = {
provider: 'openai' | 'elevenlabs';
@@ -16,19 +15,8 @@ function maskSecret(value: string | undefined): string | undefined {
}
export async function readTtsConfig(): Promise<TtsConfig | undefined> {
const config = await readResourceConfig('text-to-speech');
if (!config.url && !config.provider) {
// Fallback to legacy DB settings
const settings = await readServerSettings();
return settings.tts as TtsConfig | undefined;
}
return {
provider: (config.provider || 'openai') as 'openai' | 'elevenlabs',
url: config.url ?? '',
apiKey: config.api_key || undefined,
model: config.model ?? '',
voice: config.voice ?? '',
};
const settings = await readServerSettings();
return settings.tts as TtsConfig | undefined;
}
export const ttsRouter = createRouter();