Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: keep marked out of startup by moving the export format names to their own module (#17250)
Daniel Han44e86a0a7a92
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsxindex 57015449ec6..ff35aeaa8bb 100644--- a/studio/frontend/src/features/chat/chat-page.tsx+++ b/studio/frontend/src/features/chat/chat-page.tsx@@ -127,7 +127,7 @@ import {CONVERSATION_HTML_LABEL,CONVERSATION_PDF_FORMAT,CONVERSATION_PDF_LABEL,-} from "./utils/conversation-html";+} from "./utils/conversation-html-format";import { TrashIcon } from "@/lib/hugeicons-derived";import {ArchiveIcon,diff --git a/studio/frontend/src/features/chat/components/chat-row-menu.ts b/studio/frontend/src/features/chat/components/chat-row-menu.tsindex 9f98538b12a..7965fddd3d8 100644--- a/studio/frontend/src/features/chat/components/chat-row-menu.ts+++ b/studio/frontend/src/features/chat/components/chat-row-menu.ts@@ -15,7 +15,7 @@ import {CONVERSATION_HTML_LABEL,CONVERSATION_PDF_FORMAT,CONVERSATION_PDF_LABEL,-} from "../utils/conversation-html";+} from "../utils/conversation-html-format";import { allRecordedSandboxSessionIds } from "../utils/recorded-sandbox-session";import { liveThreadBranch } from "../utils/live-thread-head";import {diff --git a/studio/frontend/src/features/chat/index.ts b/studio/frontend/src/features/chat/index.tsindex 163cd83f490..138ec88b97f 100644--- a/studio/frontend/src/features/chat/index.ts+++ b/studio/frontend/src/features/chat/index.ts@@ -553,7 +553,7 @@ export {CONVERSATION_HTML_LABEL,CONVERSATION_PDF_FORMAT,CONVERSATION_PDF_LABEL,-} from "./utils/conversation-html";+} from "./utils/conversation-html-format";export {COMBINED_EXPORT_FORMATS_LIST,EXPORT_FORMATS_LIST,diff --git a/studio/frontend/src/features/chat/shared-composer.tsx b/studio/frontend/src/features/chat/shared-composer.tsxindex e28c2e2e847..50b0e52cc55 100644--- a/studio/frontend/src/features/chat/shared-composer.tsx+++ b/studio/frontend/src/features/chat/shared-composer.tsx@@ -97,7 +97,7 @@ import { CONVERSATION_MARKDOWN_LABEL } from "./utils/conversation-markdown";import {CONVERSATION_HTML_LABEL,CONVERSATION_PDF_LABEL,-} from "./utils/conversation-html";+} from "./utils/conversation-html-format";import { pasteClipboardFiles } from "./utils/clipboard-files";import { insertAtCaret, richPasteMarkdown } from "./utils/rich-paste";import { isPlainPasteChord, plainPasteStillCounts } from "./utils/pasted-text";diff --git a/studio/frontend/src/features/chat/thread-sidebar.tsx b/studio/frontend/src/features/chat/thread-sidebar.tsxindex 7a44a1c5782..7d7bff7cbee 100644--- a/studio/frontend/src/features/chat/thread-sidebar.tsx+++ b/studio/frontend/src/features/chat/thread-sidebar.tsx@@ -55,7 +55,7 @@ import { CONVERSATION_MARKDOWN_LABEL } from "./utils/conversation-markdown";import {CONVERSATION_HTML_LABEL,CONVERSATION_PDF_LABEL,-} from "./utils/conversation-html";+} from "./utils/conversation-html-format";import {deleteChatItem,renameChatItem,diff --git a/studio/frontend/src/features/chat/utils/conversation-html-format.ts b/studio/frontend/src/features/chat/utils/conversation-html-format.tsnew file mode 100644index 00000000000..f86ade11318--- /dev/null+++ b/studio/frontend/src/features/chat/utils/conversation-html-format.ts@@ -0,0 +1,12 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// Export format names only: menus import these without pulling the HTML renderer (marked) into startup.+export const CONVERSATION_HTML_FORMAT = "html";+export const CONVERSATION_HTML_LABEL = "HTML";+export const CONVERSATION_HTML_EXTENSION = "html";+export const CONVERSATION_HTML_MIME_TYPE = "text/html";+export const CONVERSATION_PDF_FORMAT = "pdf";+export const CONVERSATION_PDF_LABEL = "PDF";+export const CONVERSATION_PDF_EXTENSION = "pdf";+export const CONVERSATION_PDF_MIME_TYPE = "application/pdf";diff --git a/studio/frontend/src/features/chat/utils/conversation-html.ts b/studio/frontend/src/features/chat/utils/conversation-html.tsindex 96e92b39723..d4acf4a6968 100644--- a/studio/frontend/src/features/chat/utils/conversation-html.ts+++ b/studio/frontend/src/features/chat/utils/conversation-html.ts@@ -7,14 +7,16 @@ import {roleLabel,} from "./conversation-markdown.ts";-export const CONVERSATION_HTML_FORMAT = "html";-export const CONVERSATION_HTML_LABEL = "HTML";-export const CONVERSATION_HTML_EXTENSION = "html";-export const CONVERSATION_HTML_MIME_TYPE = "text/html";-export const CONVERSATION_PDF_FORMAT = "pdf";-export const CONVERSATION_PDF_LABEL = "PDF";-export const CONVERSATION_PDF_EXTENSION = "pdf";-export const CONVERSATION_PDF_MIME_TYPE = "application/pdf";+export {+ CONVERSATION_HTML_EXTENSION,+ CONVERSATION_HTML_FORMAT,+ CONVERSATION_HTML_LABEL,+ CONVERSATION_HTML_MIME_TYPE,+ CONVERSATION_PDF_EXTENSION,+ CONVERSATION_PDF_FORMAT,+ CONVERSATION_PDF_LABEL,+ CONVERSATION_PDF_MIME_TYPE,+} from "./conversation-html-format.ts";export type NamedConversationHtml = {readonly title: string;diff --git a/studio/frontend/tests/startup-lazy-heavy-deps.test.ts b/studio/frontend/tests/startup-lazy-heavy-deps.test.tsindex cb09d481e1e..ff29c2626ef 100644--- a/studio/frontend/tests/startup-lazy-heavy-deps.test.ts+++ b/studio/frontend/tests/startup-lazy-heavy-deps.test.ts@@ -44,3 +44,15 @@ test("the training barrel does not re-export the YAML helpers", () => {test("the chat model runtime is only imported dynamically outside the chat feature", () => {assert.deepEqual(staticValueImporters("@/features/chat/hooks/use-chat-model-runtime"), []);});++const HTML_RENDERER_IMPORT =+ /^\s*(import|export)\s+(?!type\b)[^;]*?\bfrom\s+["'][^"']*\/conversation-html(\.ts)?["']/m;++test("menus take the export format names without the HTML renderer (marked)", () => {+ const importers = sources(SRC)+ .filter((path) => HTML_RENDERER_IMPORT.test(readFileSync(path, "utf8")))+ .map((path) => path.slice(SRC.length).replaceAll("\\", "/"));+ assert.deepEqual(importers, [+ "features/chat/prompt-storage/prompt-storage-dialog.tsx",+ ]);+});