diff --git a/studio/frontend/src/app/routes/__root.tsx b/studio/frontend/src/app/routes/__root.tsx index d7780c6743..323120b6a8 100644 --- a/studio/frontend/src/app/routes/__root.tsx +++ b/studio/frontend/src/app/routes/__root.tsx @@ -2,6 +2,7 @@ // Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 import { Navbar } from "@/components/navbar"; +import { VersionFooter } from "@/components/version-footer"; import { usePlatformStore } from "@/config/env"; import { Outlet, @@ -53,6 +54,7 @@ function RootLayout() { + ); } diff --git a/studio/frontend/src/components/version-footer.tsx b/studio/frontend/src/components/version-footer.tsx new file mode 100644 index 0000000000..6c4f3aec9b --- /dev/null +++ b/studio/frontend/src/components/version-footer.tsx @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 + +import { useEffect, useState } from "react"; +import { cn } from "@/lib/utils"; + +interface HardwareInfo { + gpu: { + gpu_name: string | null; + vram_total_gb: number | null; + vram_free_gb: number | null; + }; + versions: { + unsloth: string | null; + torch: string | null; + transformers: string | null; + cuda: string | null; + }; +} + +export function VersionFooter({ className }: { className?: string }) { + const [version, setVersion] = useState(null); + + useEffect(() => { + fetch("/api/system/hardware") + .then((response) => { + if (!response.ok) throw new Error("Failed to fetch"); + return response.json(); + }) + .then((data: HardwareInfo) => setVersion(data.versions.unsloth)) + .catch(() => {}); + }, []); + + if (!version) { + return null; + } + + return ( +
+ v{version} + + BETA + +
+ ); +} diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx index 1dbff145ee..4cfe427a03 100644 --- a/studio/frontend/src/features/chat/chat-page.tsx +++ b/studio/frontend/src/features/chat/chat-page.tsx @@ -824,7 +824,7 @@ export function ChatPage(): ReactElement { }, [modelSelectorLocked, tour.open]); return ( -
+