refactor(ui): remove unused helper exports

This commit is contained in:
Vincent Koc
2026-06-18 10:40:55 +08:00
parent 51d211e666
commit 79718d9e01
3 changed files with 0 additions and 41 deletions

View File

@@ -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<File, "name" | "type">): boolean {
if (file.type.startsWith("video/")) {
return false;

View File

@@ -84,24 +84,6 @@ const PATH_ALIASES: Record<string, Tab> = {
"/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<Record<Tab, Tab>> = {
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<string, Tab>([
...Object.entries(TAB_PATHS).map(([tab, path]) => [path, tab as Tab] as const),
...Object.entries(PATH_ALIASES),

View File

@@ -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;