From 79718d9e015cd614fdcb6a05d4cf3c775ff97f29 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Thu, 18 Jun 2026 10:40:55 +0800 Subject: [PATCH] refactor(ui): remove unused helper exports --- ui/src/ui/chat/attachment-support.ts | 4 ---- ui/src/ui/navigation.ts | 18 ------------------ ui/src/ui/thinking.ts | 19 ------------------- 3 files changed, 41 deletions(-) diff --git a/ui/src/ui/chat/attachment-support.ts b/ui/src/ui/chat/attachment-support.ts index 845eef5c39c9..1c2921fe878a 100644 --- a/ui/src/ui/chat/attachment-support.ts +++ b/ui/src/ui/chat/attachment-support.ts @@ -3,10 +3,6 @@ export const CHAT_ATTACHMENT_ACCEPT = "image/*,audio/*,application/pdf,text/*,.csv,.json,.md,.txt,.zip," + ".doc,.docx,.xls,.xlsx,.ppt,.pptx"; -export function isSupportedChatAttachmentMimeType(mimeType: string | null | undefined): boolean { - return typeof mimeType === "string" && !mimeType.startsWith("video/"); -} - export function isSupportedChatAttachmentFile(file: Pick): boolean { if (file.type.startsWith("video/")) { return false; diff --git a/ui/src/ui/navigation.ts b/ui/src/ui/navigation.ts index 8cc40192cf5e..1aac2e123ac3 100644 --- a/ui/src/ui/navigation.ts +++ b/ui/src/ui/navigation.ts @@ -84,24 +84,6 @@ const PATH_ALIASES: Record = { "/dreams": "dreams", }; -/** - * Maps a tab to its parent tab when it should render as an indented sub-item - * under the parent in the sidebar. Sub-items still get their own routes. - */ -export const TAB_PARENTS: Partial> = { - skillWorkshop: "skills", -}; - -export function isChildTab(tab: Tab): boolean { - return Object.hasOwn(TAB_PARENTS, tab); -} - -export function childTabsOf(parent: Tab): Tab[] { - return (Object.entries(TAB_PARENTS) as Array<[Tab, Tab]>) - .filter(([, p]) => p === parent) - .map(([child]) => child); -} - const PATH_TO_TAB = new Map([ ...Object.entries(TAB_PATHS).map(([tab, path]) => [path, tab as Tab] as const), ...Object.entries(PATH_ALIASES), diff --git a/ui/src/ui/thinking.ts b/ui/src/ui/thinking.ts index 135bf4be511a..a516b1c51a69 100644 --- a/ui/src/ui/thinking.ts +++ b/ui/src/ui/thinking.ts @@ -9,25 +9,6 @@ export type ThinkingCatalogEntry = { const BASE_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high"] as const; -export function normalizeThinkingProviderId(provider?: string | null): string { - if (!provider) { - return ""; - } - const normalized = normalizeLowercaseStringOrEmpty(provider); - if (normalized === "z.ai" || normalized === "z-ai") { - return "zai"; - } - if (normalized === "bedrock" || normalized === "aws-bedrock") { - return "amazon-bedrock"; - } - return normalized; -} - -export function isBinaryThinkingProvider(provider?: string | null): boolean { - void provider; - return false; -} - export function normalizeThinkLevel(raw?: string | null): string | undefined { if (!raw) { return undefined;