refactor: Cleanup
refactor: Cleanup refactor: Cleanup refactor: Cleanup
This commit is contained in:
parent
97642211a9
commit
7f5284d597
|
|
@ -103,6 +103,7 @@
|
|||
|
||||
let pasteLongTextToFileLength = $derived.by(() => {
|
||||
const n = Number(currentConfig.pasteLongTextToFileLen);
|
||||
|
||||
return Number.isNaN(n) ? Number(SETTING_CONFIG_DEFAULT.pasteLongTextToFileLen) : n;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export type {
|
|||
ApiRouterModelsUnloadResponse
|
||||
} from './api';
|
||||
|
||||
// Chat types - interfaces only (enums are in $lib/enums)
|
||||
// Chat types
|
||||
export type {
|
||||
ChatUploadedFile,
|
||||
ChatAttachmentDisplayItem,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export function parseMcpServerSettings(rawServers: unknown): MCPServerSettingsEn
|
|||
if (!rawServers) return [];
|
||||
|
||||
let parsed: unknown;
|
||||
|
||||
if (typeof rawServers === 'string') {
|
||||
const trimmed = rawServers.trim();
|
||||
if (!trimmed) return [];
|
||||
|
|
@ -34,6 +35,7 @@ export function parseMcpServerSettings(rawServers: unknown): MCPServerSettingsEn
|
|||
parsed = JSON.parse(trimmed);
|
||||
} catch (error) {
|
||||
console.warn('[MCP] Failed to parse mcpServers JSON, ignoring value:', error);
|
||||
|
||||
return [];
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue