Skip to content

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.

Studio: restyle Library and System storage sections as a usage overview (#15083)

Michael Han46d43efd32b7
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.ts
index 00570bec886..b05dcfa3bb0 100644
--- a/studio/frontend/scripts/check-bundle-budget.ts
+++ b/studio/frontend/scripts/check-bundle-budget.ts
@@ -422,8 +422,13 @@ export const BUDGET = {
// 2,090,854 B transfer against 1492952a09, Node 22, 99 chunks). Raised by that on top of #15084 and #15025.
// The pinned Run settings footer adds 25 B raw / 49 B transfer to the eager model picker (6,932,829 -> 6,932,854 B
// raw, 2,088,616 -> 2,088,665 B transfer against 2c2e04474b, Node 26, unchanged at 99 chunks). Raised by that.
- transferBytes: 2_091_117,
- rawBytes: 6_942_060,
+ // Storage overview in Library and System settings (#15083) adds 360 B raw / 56 B transfer, its strings in the
+ // eager en locale plus 46 B in the settings chunk; the overview itself is a lazy chunk (6,932,829 -> 6,933,189 B
+ // raw, 2,088,616 -> 2,088,672 B transfer against cfc593f0bd, Node 26, unchanged at 99 chunks). Raised by that.
+ // Its "System and Engine" page title adds 11 B raw / 34 B transfer to the eager en locale (6,933,189 -> 6,933,200 B
+ // raw, 2,088,699 -> 2,088,733 B transfer merged with f49cbdf535, Node 26, 99 chunks). Raised by that.
+ transferBytes: 2_091_207,
+ rawBytes: 6_942_431,
};
// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering the
diff --git a/studio/frontend/src/features/settings/components/cache-storage-rows.tsx b/studio/frontend/src/features/settings/components/cache-storage-rows.tsx
index 5a0202b57d1..9275cba3e0c 100644
--- a/studio/frontend/src/features/settings/components/cache-storage-rows.tsx
+++ b/studio/frontend/src/features/settings/components/cache-storage-rows.tsx
@@ -17,6 +17,8 @@ import {
} from "@/features/hub/stores/inventory-events";
import { type TranslationKey, useT } from "@/i18n";
import { toast } from "@/lib/toast";
+import { Delete02Icon } from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
import { useCallback, useEffect, useRef, useState } from "react";
import {
type CacheEntry,
@@ -26,7 +28,7 @@ import {
loadCacheInventory,
purgeCaches,
} from "../api/caches";
-import { SettingsRow } from "./settings-row";
+import { SettingsCardRow } from "./storage-overview";
/** Decimal units, matching the disk readings the Storage section already shows. */
export function formatCacheSize(bytes: number): string {
@@ -101,13 +103,11 @@ function presentCaches(inventory: CacheInventory | null): CacheEntry[] {
return inventory.caches.filter((entry) => entry.present);
}
-export function CacheStorageRows() {
+export function useCacheStorage() {
const t = useT();
const [inventory, setInventory] = useState<CacheInventory | null>(null);
const [loading, setLoading] = useState(true);
const [loadError, setLoadError] = useState<string | null>(null);
- const [expanded, setExpanded] = useState(false);
- const [target, setTarget] = useState<PurgeTarget | null>(null);
const [clearing, setClearing] = useState(false);
// A measurement installs itself only while it is the newest one asked for.
@@ -156,7 +156,7 @@ export function CacheStorageRows() {
const bulkKeys = inventory ? bulkPurgeKeys(inventory) : [];
const reclaimable = inventory?.reclaimableBytes ?? 0;
- const runPurge = async (keys: readonly CacheKey[]) => {
+ const runPurge = async (keys: readonly CacheKey[]): Promise<boolean> => {
setClearing(true);
const request = ++latestRequest.current;
try {
@@ -169,23 +169,24 @@ export function CacheStorageRows() {
bumpInventoryVersion();
measuredVersion.current = getInventoryVersion();
}
- setTarget(null);
const failures = outcome.results.flatMap((result) => result.errors);
if (failures.length > 0) {
toast.warning(t("settings.resources.storage.caches.partial"), {
description: failures[0],
});
- return;
+ return true;
}
toast.success(
t("settings.resources.storage.caches.cleared", {
size: formatCacheSize(outcome.freedBytes),
}),
);
+ return true;
} catch (error) {
toast.error(t("settings.resources.storage.caches.clearFailed"), {
description: error instanceof Error ? error.message : undefined,
});
+ return false;
} finally {
setClearing(false);
// Whatever measurement this superseded will not clear it.
@@ -193,6 +194,38 @@ export function CacheStorageRows() {
}
};
+ return {
+ inventory,
+ loading,
+ loadError,
+ clearing,
+ entries,
+ bulkKeys,
+ reclaimable,
+ refresh,
+ runPurge,
+ };
+}
+
+export type CacheStorage = ReturnType<typeof useCacheStorage>;
+
+export function CacheStorageRows({ cache }: { cache: CacheStorage }) {
+ const t = useT();
+ const {
+ inventory,
+ loading,
+ loadError,
+ clearing,
+ entries,
+ bulkKeys,
+ reclaimable,
+ } = cache;
+ const [expanded, setExpanded] = useState(false);
+ const [target, setTarget] = useState<PurgeTarget | null>(null);
+ const runPurge = async (keys: readonly CacheKey[]) => {
+ if (await cache.runPurge(keys)) setTarget(null);
+ };
+
const confirmTitle =
target?.kind === "single"
? t("settings.resources.storage.caches.confirmOneTitle", {
@@ -210,7 +243,7 @@ export function CacheStorageRows() {
return (
<>
- <SettingsRow
+ <SettingsCardRow
label={t("settings.resources.storage.caches.label")}
description={
loadError
@@ -224,43 +257,31 @@ export function CacheStorageRows() {
}
hint={t("settings.resources.storage.caches.hint")}
>
- <div className="flex items-center gap-2">
- <Button
- variant="ghost"
- size="sm"
- className="h-8"
- disabled={loading || clearing}
- onClick={() => void refresh({ refresh: true })}
- >
- {t("settings.resources.storage.caches.recheckAction")}
- </Button>
- <Button
- variant="ghost"
- size="sm"
- className="h-8"
- disabled={loading || clearing}
- onClick={() => setExpanded((open) => !open)}
- >
- {expanded
- ? t("settings.resources.storage.caches.hideDetailsAction")
- : t("settings.resources.storage.caches.detailsAction")}
- </Button>
- <Button
- variant="destructive"
- size="sm"
- className="h-8"
- disabled={
- loading || clearing || loadError !== null || bulkKeys.length === 0
- }
- onClick={() => setTarget({ kind: "bulk" })}
- >
- {t("settings.resources.storage.caches.clearAction")}
- </Button>
- </div>
- </SettingsRow>
+ <Button
+ variant="outline"
+ size="sm"
+ disabled={loading || clearing}
+ onClick={() => setExpanded((open) => !open)}
+ >
+ {expanded
+ ? t("settings.resources.storage.caches.hideDetailsAction")
+ : t("settings.resources.storage.caches.detailsAction")}
+ </Button>
+ <Button
+ variant="destructive"
+ size="sm"
+ disabled={
+ loading || clearing || loadError !== null || bulkKeys.length === 0
+ }
+ onClick={() => setTarget({ kind: "bulk" })}
+ >
+ <HugeiconsIcon icon={Delete02Icon} className="size-3.5" />
+ {t("settings.resources.storage.caches.clearAction")}
+ </Button>
+ </SettingsCardRow>
{expanded ? (
- <div className="flex flex-col pl-3.5">
+ <div className="flex flex-col pb-2">
{entries.length === 0 ? (
<p className="py-2 text-xs text-muted-foreground">
{t("settings.resources.storage.caches.empty")}
@@ -269,7 +290,7 @@ export function CacheStorageRows() {
entries.map((entry) => (
<div
key={entry.key}
- className="flex flex-wrap items-center justify-between gap-2 border-t border-border/60 py-2"
+ className="flex flex-wrap items-center justify-between gap-2 border-t border-border/60 py-2.5"
>
<div className="flex min-w-0 flex-col gap-0.5">
<span className="text-sm text-foreground">
diff --git a/studio/frontend/src/features/settings/components/storage-overview.tsx b/studio/frontend/src/features/settings/components/storage-overview.tsx
new file mode 100644
index 00000000000..e69e949d6ec
--- /dev/null
+++ b/studio/frontend/src/features/settings/components/storage-overview.tsx
@@ -0,0 +1,164 @@
+// 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 {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { cn } from "@/lib/utils";
+import { InformationCircleIcon } from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
+import type { ReactNode } from "react";
+
+export const STORAGE_COLORS = {
+ yellow: "bg-amber-400 dark:bg-[#f7d35f]",
+ purple: "bg-violet-500 dark:bg-[#a971f2]",
+ orange: "bg-orange-600 dark:bg-[#eb6e3a]",
+ green: "bg-green-600 dark:bg-[#6fc77a]",
+ blue: "bg-sky-500 dark:bg-sky-400",
+ other: "bg-[#767676] dark:bg-[#8e8e8e]",
+ free: "bg-muted-foreground/15",
+} as const;
+
+export interface StorageSegment {
+ key: string;
+ label: string;
+ bytes: number;
+ value: string;
+ /** Background utility for the bar slice and the legend dot. */
+ color: string;
+}
+
+export function StorageOverview({
+ label,
+ heading,
+ action,
+ segments,
+ totalBytes,
+ footer,
+}: {
+ label?: string;
+ heading: ReactNode;
+ action?: ReactNode;
+ segments: StorageSegment[];
+ /** Width of the whole bar; defaults to the sum, so the slices fill it. */
+ totalBytes?: number;
+ footer?: ReactNode;
+}) {
+ const sum = segments.reduce(
+ (acc, segment) => acc + Math.max(0, segment.bytes),
+ 0,
+ );
+ const scale = Math.max(totalBytes ?? sum, sum);
+ return (
+ <div data-settings-label={label} className="flex flex-col gap-4 py-3">
+ <div className="flex min-h-8 items-center justify-between gap-3">
+ <p className="text-sm font-semibold text-foreground">{heading}</p>
+ {action}
+ </div>
+ {/* A rounded rectangle, not a pill, by design. */}
+ <div className="flex h-6 overflow-hidden rounded-sm bg-muted">
+ {scale > 0
+ ? segments.map((segment) =>
+ segment.bytes > 0 ? (
+ <div
+ key={segment.key}
+ className={cn("min-w-1", segment.color)}
+ style={{ width: `${(segment.bytes / scale) * 100}%` }}
+ />
+ ) : null,
+ )
+ : null}
+ </div>
+ <div className="flex flex-wrap gap-x-8 gap-y-3">
+ {segments.map((segment) => (
+ <div key={segment.key} className="flex flex-col gap-1">
+ <span className="flex items-center gap-2 text-sm text-foreground/80">
+ <span
+ className={cn("size-2.5 shrink-0 rounded-full", segment.color)}
+ />
+ {segment.label}
+ </span>
+ <span className="text-sm tabular-nums text-muted-foreground">
+ {segment.value}
+ </span>
+ </div>
+ ))}
+ </div>
+ {footer ? (
+ <div className="text-xs text-muted-foreground">{footer}</div>
+ ) : null}
+ </div>
+ );
+}
+
+export function SettingsCard({
+ children,
+ className,
+}: { children: ReactNode; className?: string }) {
+ return (
+ <div
+ className={cn(
+ "my-2 flex flex-col rounded-xl border border-border/60 px-3 sm:px-4",
+ className,
+ )}
+ >
+ {children}
+ </div>
+ );
+}
+
+export function SettingsCardRow({
+ label,
+ description,
+ hint,
+ children,
+}: {
+ label: string;
+ description?: ReactNode;
+ hint?: string;
+ children?: ReactNode;
+}) {
+ return (
+ <div
+ data-settings-label={label}
+ className="flex flex-col border-border/60 py-3.5 not-first:border-t"
+ >
+ <div className="flex flex-wrap items-center justify-between gap-x-6 gap-y-2">
+ <div className="flex min-w-0 flex-1 basis-60 flex-col gap-1">
+ <span className="text-sm font-medium text-foreground">
+ {label}
+ {hint ? (
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <button
+ type="button"
+ aria-label={hint}
+ className="ml-1.5 inline-flex align-baseline rounded-full text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ >
+ <HugeiconsIcon
+ icon={InformationCircleIcon}
+ className="size-[var(--ui-icon-size-hint)]"
+ />
+ </button>
+ </TooltipTrigger>
+ <TooltipContent className="max-w-[calc(300px*var(--ui-space-scale,1))] text-ui-11 leading-snug">
+ {hint}
+ </TooltipContent>
+ </Tooltip>
+ ) : null}
+ </span>
+ {description ? (
+ <div className="min-w-0 text-xs text-muted-foreground">
+ {description}
+ </div>
+ ) : null}
+ </div>
+ {children ? (
+ <div className="flex shrink-0 items-center gap-2">{children}</div>
+ ) : null}
+ </div>
+ </div>
+ );
+}
diff --git a/studio/frontend/src/features/settings/tabs/library-tab.tsx b/studio/frontend/src/features/settings/tabs/library-tab.tsx
index e1e29597354..72e77cc60ec 100644
--- a/studio/frontend/src/features/settings/tabs/library-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/library-tab.tsx
@@ -25,7 +25,6 @@ import {
LIBRARY_TABS,
type LibraryLocation,
type LibrarySearch,
- LibraryStorageBar,
type LibrarySettings,
type LibraryTab as LibraryTabId,
type LibraryTabVisibility,
@@ -47,14 +46,18 @@ import {
import { useIsAccountOwner } from "@/features/auth";
import { FolderBrowser } from "@/features/model-picker";
import { type TranslationKey, useLocale, useT } from "@/i18n";
-import { ChevronRightStandardIcon } from "@/lib/chevron-icons";
import { notifyGalleryChanged } from "@/lib/gallery-flags";
import { toast } from "@/lib/toast";
-import { HugeiconsIcon } from "@hugeicons/react";
import { useNavigate } from "@tanstack/react-router";
import { useEffect, useRef, useState } from "react";
import { SettingsRow } from "../components/settings-row";
import { SettingsSection } from "../components/settings-section";
+import {
+ STORAGE_COLORS,
+ SettingsCard,
+ SettingsCardRow,
+ StorageOverview,
+} from "../components/storage-overview";
import { useSettingsDialogStore } from "../stores/settings-dialog-store";
type ToggleKey = {
@@ -132,6 +135,14 @@ function ChoiceSelect({
);
}
+const CATEGORY_COLORS: Record<string, string> = {
+ files: STORAGE_COLORS.yellow,
+ images: STORAGE_COLORS.purple,
+ videos: STORAGE_COLORS.orange,
+ audio: STORAGE_COLORS.green,
+ fineTunes: STORAGE_COLORS.blue,
+};
+
function StorageSection() {
const t = useT();
const locale = useLocale();
@@ -174,43 +185,66 @@ function StorageSection() {
<p className="py-3 text-sm text-muted-foreground">{t("settings.library.storageError")}</p>
) : (
<>
- <div className="flex flex-col gap-2 py-3">
- <p className="text-sm font-medium text-foreground">
- {t("settings.library.storageUsed", { size: size(storage.totalBytes) })}
- </p>
- <LibraryStorageBar libraryBytes={storage.diskBytes} disk={storage.disk} />
- </div>
+ <StorageOverview
+ heading={t("settings.library.storageUsed", { size: size(storage.totalBytes) })}
+ action={
+ <Button variant="outline" size="sm" onClick={refreshLibraryStorage}>
+ {t("settings.library.storageRefresh")}
+ </Button>
+ }
+ segments={[
+ ...storage.categories.map((entry) => ({
+ key: entry.category,
+ label: t(STORAGE_LABELS[entry.category]),
+ bytes: entry.bytes,
+ value: size(entry.bytes),
+ color: CATEGORY_COLORS[entry.category],
+ })),
+ ...(storage.hiddenBytes > 0
+ ? [
+ {
+ key: "hidden",
+ label: t("settings.library.storageHiddenLabel"),
+ bytes: storage.hiddenBytes,
+ value: size(storage.hiddenBytes),
+ color: STORAGE_COLORS.other,
+ },
+ ]
+ : []),
+ ]}
+ footer={
+ storage.disk && storage.disk.totalBytes > 0
+ ? t("settings.library.storageDisk", {
+ free: size(storage.disk.freeBytes),
+ total: size(storage.disk.totalBytes),
+ })
+ : null
+ }
+ />
{storage.categories.length === 0 && storage.hiddenBytes === 0 && (
<p className="pb-3 text-sm text-muted-foreground">{t("settings.library.storageEmpty")}</p>
)}
{storage.categories.length > 0 && (
- <div className="mb-3 flex flex-col overflow-hidden rounded-lg border border-border/60">
+ <SettingsCard>
{storage.categories.map((entry) => (
- <button
+ <SettingsCardRow
key={entry.category}
- type="button"
- onClick={() => open(entry.link)}
- className="flex items-center gap-3 border-border/60 px-4 py-3 text-left transition-colors not-first:border-t hover:bg-muted/60"
+ label={t(STORAGE_LABELS[entry.category])}
+ description={`${size(entry.bytes)} · ${
+ entry.count === 1
+ ? t("settings.library.itemCountOne")
+ : t("settings.library.itemCount", { count: entry.count.toLocaleString() })
+ }`}
>
- <span className="flex min-w-0 flex-1 flex-col gap-0.5">
- <span className="text-sm font-medium text-foreground">
- {t(STORAGE_LABELS[entry.category])}
- </span>
- <span className="text-xs text-muted-foreground">
- {size(entry.bytes)}
- {" · "}
- {entry.count === 1
- ? t("settings.library.itemCountOne")
- : t("settings.library.itemCount", { count: entry.count.toLocaleString() })}
- </span>
- </span>
- <HugeiconsIcon icon={ChevronRightStandardIcon} className="size-4 shrink-0 text-muted-foreground" />
- </button>
+ <Button variant="outline" size="sm" onClick={() => open(entry.link)}>
+ {t("settings.library.storageOpen")}
+ </Button>
+ </SettingsCardRow>
))}
- </div>
+ </SettingsCard>
)}
{storage.hiddenBytes > 0 && (
- <p className="pb-3 text-xs text-muted-foreground">
+ <p className="py-2 text-xs text-muted-foreground">
{t("settings.library.storageHidden", { size: size(storage.hiddenBytes) })}
</p>
)}
diff --git a/studio/frontend/src/features/settings/tabs/resources-tab.tsx b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
index 880064b5643..b6599056dc5 100644
--- a/studio/frontend/src/features/settings/tabs/resources-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
@@ -10,7 +10,6 @@ import {
} from "@/components/monitor-details";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
-import { Input } from "@/components/ui/input";
import { Progress } from "@/components/ui/progress";
import { Switch } from "@/components/ui/switch";
import { formatBytes } from "@/features/hub";
@@ -52,18 +51,28 @@ import {
import { InferenceEnginesSection } from "@/features/model-picker/components/inference-engines";
import { useSettingsDialogStore } from "../stores/settings-dialog-store";
import { useIsAccountOwner } from "@/features/auth";
-import { CacheStorageRows } from "../components/cache-storage-rows";
+import {
+ CacheStorageRows,
+ useCacheStorage,
+} from "../components/cache-storage-rows";
import { DeveloperModeSection } from "../components/developer-mode-section";
import { EngineVersionsSection } from "../components/engine-versions-section";
import { LlamaBackendSection } from "../components/llama-backend-section";
import { ModelMemorySection } from "../components/model-memory-section";
import { SettingsRow } from "../components/settings-row";
import { SettingsSection } from "../components/settings-section";
+import {
+ STORAGE_COLORS,
+ SettingsCard,
+ SettingsCardRow,
+ type StorageSegment,
+ StorageOverview,
+} from "../components/storage-overview";
import { useMonitorOverlayStore } from "../stores/monitor-overlay-store";
import { useSettingsPanelPrefsStore } from "../stores/settings-panel-prefs-store";
-import { ArrowUpRight01Icon, Copy01Icon } from "@hugeicons/core-free-icons";
+import { ArrowUpRight01Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
-import { FolderOpenIcon, LayersIcon } from "lucide-react";
+import { LayersIcon } from "lucide-react";
const POLL_MS = 3000;
@@ -307,6 +316,7 @@ export function ResourcesTab() {
const [hfCacheLoaded, setHfCacheLoaded] = useState(false);
const [cacheBrowserOpen, setCacheBrowserOpen] = useState(false);
const [cacheSaving, setCacheSaving] = useState(false);
+ const cache = useCacheStorage();
const displayedGpu = systemInfo.gpu?.available
? systemInfo.gpu
: (systemInfo.inference_gpu ?? systemInfo.gpu);
@@ -528,6 +538,72 @@ export function ResourcesTab() {
.join(" · ")
: null;
const unknownLabel = t("settings.resources.environment.unknown");
+ // Disk readings are decimal GB, as are cache sizes once divided by 1e9.
+ // A models folder on another drive takes the Hugging Face caches under it (hub, Xet, ...) off the system disk.
+ const modelsRoot = hfCache?.cacheHome.replace(/[\\/]+$/, "");
+ const onSystemDisk = (paths: string[]) =>
+ !(
+ metrics.modelsDisk &&
+ modelsRoot &&
+ paths.some(
+ (path) =>
+ path === modelsRoot ||
+ path.startsWith(`${modelsRoot}/`) ||
+ path.startsWith(`${modelsRoot}\\`),
+ )
+ );
+ const systemEntries = cache.entries.filter(
+ (entry) =>
+ !(metrics.modelsDisk && entry.key === "hf_hub") &&
+ onSystemDisk(entry.paths),
+ );
+ const modelsDiskGb =
+ (systemEntries.find((entry) => entry.key === "hf_hub")?.sizeBytes ?? 0) /
+ 1e9;
+ const cachesDiskGb =
+ systemEntries
+ .filter((entry) => entry.key !== "hf_hub")
+ .reduce((sum, entry) => sum + entry.sizeBytes, 0) / 1e9;
+ const otherDiskGb = Math.max(
+ 0,
+ metrics.diskUsed - modelsDiskGb - cachesDiskGb,
+ );
+ const cacheValue = (diskGb: number) =>
+ cache.inventory ? formatGb(diskGb) : t("common.loading");
+ const storageSegments: StorageSegment[] = [
+ ...(metrics.modelsDisk
+ ? []
+ : [
+ {
+ key: "models",
+ label: t("settings.resources.storage.segmentModels"),
+ bytes: modelsDiskGb,
+ value: cacheValue(modelsDiskGb),
+ color: STORAGE_COLORS.yellow,
+ },
+ ]),
+ {
+ key: "caches",
+ label: t("settings.resources.storage.segmentCaches"),
+ bytes: cachesDiskGb,
+ value: cacheValue(cachesDiskGb),
+ color: STORAGE_COLORS.purple,
+ },
+ {
+ key: "other",
+ label: t("settings.resources.storage.segmentOther"),
+ bytes: otherDiskGb,
+ value: formatGb(otherDiskGb),
+ color: STORAGE_COLORS.other,
+ },
+ {
+ key: "free",
+ label: t("settings.resources.storage.segmentFree"),
+ bytes: metrics.diskFree,
+ value: formatGb(metrics.diskFree),
+ color: STORAGE_COLORS.free,
+ },
+ ];
const unifiedPool = metrics.vramShared > 0 && metrics.vramDedicated === 0;
const vramCapacityLabel =
metrics.vramShared > 0 && !unifiedPool
@@ -1070,105 +1146,83 @@ export function ResourcesTab() {
ref={storageSectionRef}
title={t("settings.resources.storage.title")}
>
- <InfoRow
+ <StorageOverview
label={t("settings.resources.storage.systemDisk")}
- value={t("settings.resources.storage.diskUsage", {
+ heading={t("settings.resources.storage.systemUsed", {
used: formatGb(metrics.diskUsed),
total: formatGb(metrics.diskTotal),
})}
- detail={t("settings.resources.storage.diskFree", {
- free: formatGb(metrics.diskFree),
- })}
- />
- {metrics.modelsDisk && (
- <InfoRow
- label={t("settings.resources.storage.modelsDisk")}
- value={t("settings.resources.storage.diskUsage", {
- used: formatGb(metrics.modelsDiskUsed),
- total: formatGb(metrics.modelsDisk.total_gb),
- })}
- detail={t("settings.resources.storage.diskFree", {
- free: formatGb(metrics.modelsDisk.free_gb),
- })}
- />
- )}
- <SettingsRow
- label={t("settings.resources.storage.modelsFolder")}
- description={t("settings.resources.storage.modelsFolderDescription")}
- hint={t("settings.resources.storage.modelsFolderHint")}
- className="max-[840px]:flex-col max-[840px]:items-stretch max-[840px]:gap-2"
- below={
- cacheLocationDetail || hfCache?.isCustom ? (
- <div className="w-[calc(392px*var(--ui-space-scale,1))] min-w-0 max-[840px]:w-full">
- <div className="flex min-w-0 items-center justify-between gap-2 pl-3.5 pr-1 text-xs text-muted-foreground">
- {cacheLocationDetail ? (
- <span
- title={cacheLocationDetail}
- className="min-w-0 truncate"
- >
- {cacheLocationDetail}
- </span>
- ) : null}
- {hfCache?.isCustom ? (
- <Button
- variant="link"
- size="xs"
- className="h-auto px-0 text-xs"
- disabled={cacheSaving}
- onClick={() => void saveCacheFolder(null)}
- >
- {t("settings.resources.storage.resetAction")}
- </Button>
- ) : null}
- </div>
- </div>
- ) : null
+ action={
+ <Button
+ variant="outline"
+ size="sm"
+ disabled={cache.loading || cache.clearing}
+ onClick={() => void cache.refresh({ refresh: true })}
+ >
+ {t("settings.resources.storage.refreshAction")}
+ </Button>
}
- >
- <div className="grid w-[calc(392px*var(--ui-space-scale,1))] min-w-0 grid-cols-[minmax(0,1fr)_auto] gap-x-2 max-[840px]:w-full">
- <div className="relative min-w-0">
- <Input
- readOnly
- aria-label={t("settings.resources.storage.modelsFolder")}
- value={modelsFolderPath}
- title={hfCache?.cacheHome}
- className="h-8 w-full pr-7 font-mono text-xs"
- />
- <button
- type="button"
- disabled={!hfCache}
- onClick={() => void handleCacheFolder()}
- aria-label={
- isTauri
- ? t("settings.resources.storage.openAction")
- : t("settings.resources.storage.copyAction")
- }
- title={
- isTauri
- ? t("settings.resources.storage.openAction")
- : t("settings.resources.storage.copyAction")
- }
- className="absolute right-1.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
+ totalBytes={metrics.diskTotal}
+ segments={storageSegments}
+ footer={
+ metrics.modelsDisk
+ ? t("settings.resources.storage.modelsDiskSummary", {
+ used: formatGb(metrics.modelsDiskUsed),
+ total: formatGb(metrics.modelsDisk.total_gb),
+ free: formatGb(metrics.modelsDisk.free_gb),
+ })
+ : null
+ }
+ />
+ <SettingsCard>
+ <SettingsCardRow
+ label={t("settings.resources.storage.modelsFolder")}
+ hint={t("settings.resources.storage.modelsFolderHint")}
+ description={
+ <span className="flex min-w-0 flex-col gap-0.5">
+ <span
+ title={hfCache?.cacheHome}
+ className="truncate font-mono text-ui-11"
+ >
+ {modelsFolderPath}
+ </span>
+ {cacheLocationDetail ? (
+ <span className="truncate">{cacheLocationDetail}</span>
+ ) : null}
+ </span>
+ }
+ >
+ {hfCache?.isCustom ? (
+ <Button
+ variant="ghost"
+ size="sm"
+ disabled={cacheSaving}
+ onClick={() => void saveCacheFolder(null)}
>
- {isTauri ? (
- <FolderOpenIcon className="size-3.5" />
- ) : (
- <HugeiconsIcon icon={Copy01Icon} className="size-3.5" />
- )}
- </button>
- </div>
+ {t("settings.resources.storage.resetAction")}
+ </Button>
+ ) : null}
+ <Button
+ variant="outline"
+ size="sm"
+ disabled={!hfCache}
+ onClick={() => void handleCacheFolder()}
+ >
+ {isTauri
+ ? t("settings.resources.storage.openAction")
+ : t("settings.resources.storage.copyAction")}
+ </Button>
<Button
variant="outline"
size="sm"
- className="h-8"
disabled={!hfCache?.editable || cacheSaving}
onClick={() => void changeCacheFolder()}
>
{t("settings.resources.storage.changeAction")}
</Button>
- </div>
- </SettingsRow>
- <CacheStorageRows />
+ </SettingsCardRow>
+ <CacheStorageRows cache={cache} />
+ </SettingsCard>
</SettingsSection>
<FolderBrowser
@@ -1183,10 +1237,7 @@ export function ResourcesTab() {
{isOwner ? <DeveloperModeSection /> : null}
- <EnvironmentSection
- systemInfo={systemInfo}
- backendLabel={backendLabel}
- />
+ <EnvironmentSection systemInfo={systemInfo} backendLabel={backendLabel} />
</div>
);
}
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index 1798315f4fe..f4b537de657 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -1043,6 +1043,9 @@ export const ar = {
storageDisk: "{free} متاحة من {total} على هذا القرص",
storageEmpty: "لا يوجد شيء مخزّن في المكتبة بعد.",
storageHidden: "{size} مخفية في إعدادات المحتوى",
+ storageHiddenLabel: "مخفي",
+ storageRefresh: "تحديث",
+ storageOpen: "فتح",
storageError: "تعذّرت قراءة تخزين المكتبة.",
locationsSection: "الملفات على القرص",
locationsDescription: "المكان الذي يحفظ فيه Unsloth كل نوع من الملفات. مجلدات المكتبة تسميات داخل Unsloth وليست مجلدات على القرص. تبقى النماذج المضبوطة والتصديرات في مكانها لأن التدريب والمحادثات تشير إليها بمسارها.",
@@ -2308,7 +2311,7 @@ export const ar = {
},
},
resources: {
- title: "النظام",
+ title: "النظام والمحرك",
description: "راقب عتاد خادم Unsloth هذا ومساحة تخزينه.",
liveUpdates: "التحديثات المباشرة",
floatingWindow: "نافذة عائمة",
@@ -2462,6 +2465,13 @@ export const ar = {
storage: {
title: "التخزين",
systemDisk: "قرص النظام",
+ systemUsed: "{used} مستخدم من {total} على قرص النظام",
+ modelsDiskSummary: "محرك مجلد النماذج: {used} مستخدم من {total}، {free} متاح",
+ segmentModels: "النماذج",
+ segmentCaches: "ذاكرات التخزين المؤقت",
+ segmentOther: "أخرى",
+ segmentFree: "متاح",
+ refreshAction: "تحديث",
modelsDisk: "قرص النماذج",
diskUsage: "{used} مستخدم / {total}",
diskFree: "{free} متاح",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index 4737d6a6a73..d007f691042 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -1048,6 +1048,9 @@ export const de = {
storageDisk: "{free} frei von {total} auf diesem Laufwerk",
storageEmpty: "In der Bibliothek ist noch nichts gespeichert.",
storageHidden: "{size} in den Inhaltseinstellungen ausgeblendet",
+ storageHiddenLabel: "Ausgeblendet",
+ storageRefresh: "Aktualisieren",
+ storageOpen: "Öffnen",
storageError: "Der Speicher der Bibliothek konnte nicht gelesen werden.",
locationsSection: "Dateien auf dem Datenträger",
locationsDescription: "Wo Unsloth jede Dateiart speichert. Bibliotheksordner sind Beschriftungen in Unsloth, keine Ordner auf dem Datenträger. Feinabstimmungen und Exporte bleiben, wo sie sind, da Training und Chats sie über ihren Pfad finden.",
@@ -2337,7 +2340,7 @@ export const de = {
},
},
resources: {
- title: "System",
+ title: "System und Engine",
description:
"Überwachen Sie Hardware und Speicher dieses Unsloth-Servers.",
liveUpdates: "Live-Updates",
@@ -2494,6 +2497,13 @@ export const de = {
storage: {
title: "Speicher",
systemDisk: "Systemfestplatte",
+ systemUsed: "{used} von {total} auf der Systemfestplatte belegt",
+ modelsDiskSummary: "Laufwerk des Modellordners: {used} von {total} belegt, {free} frei",
+ segmentModels: "Modelle",
+ segmentCaches: "Caches",
+ segmentOther: "Sonstiges",
+ segmentFree: "Frei",
+ refreshAction: "Aktualisieren",
modelsDisk: "Modell-Datenträger",
diskUsage: "{used} belegt / {total}",
diskFree: "{free} frei",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index 80930b9fcec..08d9ba6bdda 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -1101,6 +1101,9 @@ export const en = {
storageDisk: "{free} free of {total} on this disk",
storageEmpty: "Nothing is stored in the Library yet.",
storageHidden: "{size} hidden in Content settings",
+ storageHiddenLabel: "Hidden",
+ storageRefresh: "Refresh",
+ storageOpen: "Open",
storageError: "Could not read Library storage.",
locationsSection: "Files on disk",
locationsDescription: "Where Unsloth keeps each kind of file. Library folders are labels inside Unsloth, not folders on disk. Fine-tunes and exports stay where they are, since training and chats refer to them by path.",
@@ -2371,7 +2374,7 @@ export const en = {
},
},
resources: {
- title: "System",
+ title: "System and Engine",
description: "Monitor this Unsloth server's hardware and storage.",
liveUpdates: "Live updates",
floatingWindow: "Floating window",
@@ -2525,6 +2528,13 @@ export const en = {
storage: {
title: "Storage",
systemDisk: "System disk",
+ systemUsed: "{used} used of {total} on the system disk",
+ modelsDiskSummary: "Models folder drive: {used} used of {total}, {free} free",
+ segmentModels: "Models",
+ segmentCaches: "Caches",
+ segmentOther: "Other",
+ segmentFree: "Free",
+ refreshAction: "Refresh",
modelsDisk: "Models disk",
diskUsage: "{used} used / {total}",
diskFree: "{free} free",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index 1c6322487ec..c54ae92ab80 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -1047,6 +1047,9 @@ export const es = {
storageDisk: "{free} libres de {total} en este disco",
storageEmpty: "Todavía no hay nada guardado en la Biblioteca.",
storageHidden: "{size} ocultos en los ajustes de Contenido",
+ storageHiddenLabel: "Oculto",
+ storageRefresh: "Actualizar",
+ storageOpen: "Abrir",
storageError: "No se pudo leer el almacenamiento de la Biblioteca.",
locationsSection: "Archivos en el disco",
locationsDescription: "Dónde guarda Unsloth cada tipo de archivo. Las carpetas de la biblioteca son etiquetas dentro de Unsloth, no carpetas en el disco. Los ajustes finos y las exportaciones se quedan donde están, porque el entrenamiento y los chats los encuentran por su ruta.",
@@ -2332,7 +2335,7 @@ export const es = {
},
},
resources: {
- title: "Sistema",
+ title: "Sistema y motor",
description:
"Monitorea el hardware y el almacenamiento de este servidor de Unsloth.",
liveUpdates: "Actualizaciones en vivo",
@@ -2489,6 +2492,13 @@ export const es = {
storage: {
title: "Almacenamiento",
systemDisk: "Disco del sistema",
+ systemUsed: "{used} usados de {total} en el disco del sistema",
+ modelsDiskSummary: "Unidad de la carpeta de modelos: {used} usados de {total}, {free} libres",
+ segmentModels: "Modelos",
+ segmentCaches: "Cachés",
+ segmentOther: "Otros",
+ segmentFree: "Libre",
+ refreshAction: "Actualizar",
modelsDisk: "Disco de modelos",
diskUsage: "{used} en uso / {total}",
diskFree: "Libre: {free}",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index 9c6d3b16217..02d7c9087b0 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -1048,6 +1048,9 @@ export const fr = {
storageDisk: "{free} libres sur {total} sur ce disque",
storageEmpty: "Rien n'est encore stocké dans la Bibliothèque.",
storageHidden: "{size} masqués dans les réglages du contenu",
+ storageHiddenLabel: "Masqué",
+ storageRefresh: "Actualiser",
+ storageOpen: "Ouvrir",
storageError: "Impossible de lire le stockage de la Bibliothèque.",
locationsSection: "Fichiers sur le disque",
locationsDescription: "Où Unsloth conserve chaque type de fichier. Les dossiers de la bibliothèque sont des étiquettes dans Unsloth, pas des dossiers sur le disque. Les affinages et les exports restent en place, car l'entraînement et les chats les retrouvent par leur chemin.",
@@ -2336,7 +2339,7 @@ export const fr = {
},
},
resources: {
- title: "Système",
+ title: "Système et moteur",
description:
"Surveillez le matériel et le stockage de ce serveur Unsloth.",
liveUpdates: "Mises à jour en direct",
@@ -2493,6 +2496,13 @@ export const fr = {
storage: {
title: "Stockage",
systemDisk: "Disque système",
+ systemUsed: "{used} utilisés sur {total} sur le disque système",
+ modelsDiskSummary: "Disque du dossier des modèles : {used} utilisés sur {total}, {free} libres",
+ segmentModels: "Modèles",
+ segmentCaches: "Caches",
+ segmentOther: "Autres",
+ segmentFree: "Libre",
+ refreshAction: "Actualiser",
modelsDisk: "Disque des modèles",
diskUsage: "Espace utilisé : {used} / Total : {total}",
diskFree: "Espace libre : {free}",
diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.ts
index 9fe7695fab9..da7ddf8d1da 100644
--- a/studio/frontend/src/i18n/locales/he.ts
+++ b/studio/frontend/src/i18n/locales/he.ts
@@ -1128,6 +1128,9 @@ export const he = {
storageDisk: "{free} פנויים מתוך {total} בדיסק זה",
storageEmpty: "עדיין לא מאוחסן דבר בספרייה.",
storageHidden: "{size} מוסתרים בהגדרות התוכן",
+ storageHiddenLabel: "מוסתר",
+ storageRefresh: "רענון",
+ storageOpen: "פתיחה",
storageError: "לא ניתן לקרוא את אחסון הספרייה.",
locationsSection: "קבצים בדיסק",
locationsDescription:
@@ -2402,7 +2405,7 @@ export const he = {
},
},
resources: {
- title: "מערכת",
+ title: "מערכת ומנוע",
description: "עקוב אחר החומרה והאחסון של שרת Unsloth זה.",
liveUpdates: "עדכונים בזמן אמת",
floatingWindow: "חלון צף",
@@ -2571,6 +2574,13 @@ export const he = {
storage: {
title: "אחסון",
systemDisk: "דיסק מערכת",
+ systemUsed: "{used} בשימוש מתוך {total} בדיסק המערכת",
+ modelsDiskSummary: "כונן תיקיית המודלים: {used} בשימוש מתוך {total}, {free} פנויים",
+ segmentModels: "מודלים",
+ segmentCaches: "מטמונים",
+ segmentOther: "אחר",
+ segmentFree: "פנוי",
+ refreshAction: "רענון",
modelsDisk: "דיסק המודלים",
diskUsage: "{used} בשימוש / {total}",
diskFree: "{free} פנוי",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index b21def95af8..31879dc1b9f 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -1047,6 +1047,9 @@ export const hi = {
storageDisk: "इस डिस्क पर {total} में से {free} खाली",
storageEmpty: "लाइब्रेरी में अभी कुछ भी सेव नहीं है।",
storageHidden: "{size} सामग्री सेटिंग्स में छिपा है",
+ storageHiddenLabel: "छिपा हुआ",
+ storageRefresh: "रीफ़्रेश करें",
+ storageOpen: "खोलें",
storageError: "लाइब्रेरी का स्टोरेज नहीं पढ़ा जा सका।",
locationsSection: "डिस्क पर फ़ाइलें",
locationsDescription: "Unsloth हर तरह की फ़ाइल कहाँ रखता है। लाइब्रेरी फ़ोल्डर Unsloth के अंदर लेबल हैं, डिस्क पर फ़ोल्डर नहीं। फ़ाइन-ट्यून और एक्सपोर्ट अपनी जगह रहते हैं, क्योंकि ट्रेनिंग और चैट उन्हें पाथ से ढूँढते हैं।",
@@ -2314,7 +2317,7 @@ export const hi = {
},
},
resources: {
- title: "सिस्टम",
+ title: "सिस्टम और इंजन",
description: "इस Unsloth सर्वर के हार्डवेयर और स्टोरेज की निगरानी करें।",
liveUpdates: "लाइव अपडेट",
floatingWindow: "फ्लोटिंग विंडो",
@@ -2468,6 +2471,13 @@ export const hi = {
storage: {
title: "स्टोरेज",
systemDisk: "सिस्टम डिस्क",
+ systemUsed: "सिस्टम डिस्क पर {total} में से {used} उपयोग में",
+ modelsDiskSummary: "मॉडल फ़ोल्डर ड्राइव: {total} में से {used} उपयोग में, {free} खाली",
+ segmentModels: "मॉडल",
+ segmentCaches: "कैश",
+ segmentOther: "अन्य",
+ segmentFree: "खाली",
+ refreshAction: "रीफ़्रेश करें",
modelsDisk: "मॉडल डिस्क",
diskUsage: "{used} उपयोग में / {total}",
diskFree: "{free} खाली",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index c696c90930e..8192fee39ac 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -949,6 +949,9 @@ export const it = {
storageDisk: "{free} liberi su {total} in questo disco",
storageEmpty: "Nella Libreria non c'è ancora nulla.",
storageHidden: "{size} nascosti nelle impostazioni Contenuti",
+ storageHiddenLabel: "Nascosti",
+ storageRefresh: "Aggiorna",
+ storageOpen: "Apri",
storageError: "Impossibile leggere lo spazio della Libreria.",
locationsSection: "File sul disco",
locationsDescription: "Dove Unsloth conserva ogni tipo di file. Le cartelle della libreria sono etichette dentro Unsloth, non cartelle sul disco. I fine-tuning e le esportazioni restano dove sono, perché addestramento e chat li trovano tramite il percorso.",
@@ -2241,7 +2244,7 @@ export const it = {
},
},
resources: {
- title: "Sistema",
+ title: "Sistema e motore",
description:
"Monitora hardware e archiviazione di questo server Unsloth.",
liveUpdates: "Aggiornamenti in tempo reale",
@@ -2398,6 +2401,13 @@ export const it = {
storage: {
title: "Archiviazione",
systemDisk: "Disco di sistema",
+ systemUsed: "{used} usati su {total} sul disco di sistema",
+ modelsDiskSummary: "Unità della cartella modelli: {used} usati su {total}, {free} liberi",
+ segmentModels: "Modelli",
+ segmentCaches: "Cache",
+ segmentOther: "Altro",
+ segmentFree: "Libero",
+ refreshAction: "Aggiorna",
modelsDisk: "Disco dei modelli",
diskUsage: "In uso: {used} / Totale: {total}",
diskFree: "Disponibili: {free}",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index e3e0d357d66..6a80e6713a4 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -1045,6 +1045,9 @@ export const ja = {
storageDisk: "このディスクの空き容量 {free} / {total}",
storageEmpty: "ライブラリにはまだ何も保存されていません。",
storageHidden: "コンテンツ設定で非表示: {size}",
+ storageHiddenLabel: "非表示",
+ storageRefresh: "更新",
+ storageOpen: "開く",
storageError: "ライブラリのストレージを読み込めませんでした。",
locationsSection: "ディスク上のファイル",
locationsDescription: "Unsloth が各種ファイルを保存している場所です。ライブラリのフォルダは Unsloth 内のラベルで、ディスク上のフォルダではありません。ファインチューニングとエクスポートは、学習とチャットがパスで参照するため移動できません。",
@@ -2288,7 +2291,7 @@ export const ja = {
},
},
resources: {
- title: "システム",
+ title: "システムとエンジン",
description: "この Unsloth サーバーのハードウェアとストレージを監視します。",
liveUpdates: "リアルタイム更新",
floatingWindow: "フローティングウィンドウ",
@@ -2444,6 +2447,13 @@ export const ja = {
storage: {
title: "ストレージ",
systemDisk: "システムディスク",
+ systemUsed: "システムディスク {total} のうち {used} を使用中",
+ modelsDiskSummary: "モデルフォルダのドライブ: {total} のうち {used} を使用中、空き {free}",
+ segmentModels: "モデル",
+ segmentCaches: "キャッシュ",
+ segmentOther: "その他",
+ segmentFree: "空き",
+ refreshAction: "更新",
modelsDisk: "モデルディスク",
diskUsage: "{used} 使用中 / {total}",
diskFree: "{free} 空き",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index 48a8497073d..cda60440a5e 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -1043,6 +1043,9 @@ export const ko = {
storageDisk: "이 디스크의 여유 공간 {free} / {total}",
storageEmpty: "라이브러리에 아직 저장된 항목이 없습니다.",
storageHidden: "콘텐츠 설정에서 숨김: {size}",
+ storageHiddenLabel: "숨김",
+ storageRefresh: "새로 고침",
+ storageOpen: "열기",
storageError: "라이브러리 저장 공간을 읽지 못했습니다.",
locationsSection: "디스크의 파일",
locationsDescription: "Unsloth가 각 종류의 파일을 저장하는 위치입니다. 라이브러리 폴더는 Unsloth 안의 라벨이며 디스크의 폴더가 아닙니다. 파인튜닝 모델과 내보내기는 학습과 채팅이 경로로 참조하므로 그대로 유지됩니다.",
@@ -2302,7 +2305,7 @@ export const ko = {
},
},
resources: {
- title: "시스템",
+ title: "시스템 및 엔진",
description: "이 Unsloth 서버의 하드웨어와 저장소를 모니터링합니다.",
liveUpdates: "실시간 업데이트",
floatingWindow: "플로팅 창",
@@ -2456,6 +2459,13 @@ export const ko = {
storage: {
title: "저장소",
systemDisk: "시스템 디스크",
+ systemUsed: "시스템 디스크 {total} 중 {used} 사용 중",
+ modelsDiskSummary: "모델 폴더 드라이브: {total} 중 {used} 사용 중, {free} 남음",
+ segmentModels: "모델",
+ segmentCaches: "캐시",
+ segmentOther: "기타",
+ segmentFree: "여유 공간",
+ refreshAction: "새로 고침",
modelsDisk: "모델 디스크",
diskUsage: "{used} 사용 중 / {total}",
diskFree: "{free} 여유",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index 13f10b0881b..e6b0708eada 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -1046,6 +1046,9 @@ export const ptBR = {
storageDisk: "{free} livres de {total} neste disco",
storageEmpty: "Ainda não há nada armazenado na Biblioteca.",
storageHidden: "{size} ocultos nas configurações de Conteúdo",
+ storageHiddenLabel: "Oculto",
+ storageRefresh: "Atualizar",
+ storageOpen: "Abrir",
storageError: "Não foi possível ler o armazenamento da Biblioteca.",
locationsSection: "Arquivos no disco",
locationsDescription: "Onde o Unsloth guarda cada tipo de arquivo. As pastas da biblioteca são rótulos dentro do Unsloth, não pastas no disco. Ajustes finos e exportações ficam onde estão, pois o treinamento e os chats os encontram pelo caminho.",
@@ -2322,7 +2325,7 @@ export const ptBR = {
},
},
resources: {
- title: "Sistema",
+ title: "Sistema e motor",
description: "Monitore o hardware e o armazenamento deste servidor Unsloth.",
liveUpdates: "Atualizações ao vivo",
floatingWindow: "Janela flutuante",
@@ -2477,6 +2480,13 @@ export const ptBR = {
storage: {
title: "Armazenamento",
systemDisk: "Disco do sistema",
+ systemUsed: "{used} usados de {total} no disco do sistema",
+ modelsDiskSummary: "Unidade da pasta de modelos: {used} usados de {total}, {free} livres",
+ segmentModels: "Modelos",
+ segmentCaches: "Caches",
+ segmentOther: "Outros",
+ segmentFree: "Livre",
+ refreshAction: "Atualizar",
modelsDisk: "Disco dos modelos",
diskUsage: "{used} usados / {total}",
diskFree: "{free} livres",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index 71741fd1208..e65d4d15e02 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -1046,6 +1046,9 @@ export const ru = {
storageDisk: "Свободно {free} из {total} на этом диске",
storageEmpty: "В Библиотеке пока ничего нет.",
storageHidden: "{size} скрыто в настройках содержимого",
+ storageHiddenLabel: "Скрыто",
+ storageRefresh: "Обновить",
+ storageOpen: "Открыть",
storageError: "Не удалось прочитать хранилище Библиотеки.",
locationsSection: "Файлы на диске",
locationsDescription: "Где Unsloth хранит файлы каждого типа. Папки библиотеки являются метками внутри Unsloth, а не папками на диске. Дообученные модели и экспорты остаются на месте: обучение и чаты находят их по пути.",
@@ -2318,7 +2321,7 @@ export const ru = {
},
},
resources: {
- title: "Система",
+ title: "Система и движок",
description: "Мониторинг оборудования и хранилища этого сервера Unsloth.",
liveUpdates: "Обновления в реальном времени",
floatingWindow: "Плавающее окно",
@@ -2474,6 +2477,13 @@ export const ru = {
storage: {
title: "Хранилище",
systemDisk: "Системный диск",
+ systemUsed: "Занято {used} из {total} на системном диске",
+ modelsDiskSummary: "Диск папки моделей: занято {used} из {total}, свободно {free}",
+ segmentModels: "Модели",
+ segmentCaches: "Кэши",
+ segmentOther: "Другое",
+ segmentFree: "Свободно",
+ refreshAction: "Обновить",
modelsDisk: "Диск моделей",
diskUsage: "{used} использовано / {total}",
diskFree: "{free} свободно",
diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.ts
index 95a4ea693c6..7cb0b9d1833 100644
--- a/studio/frontend/src/i18n/locales/sv.ts
+++ b/studio/frontend/src/i18n/locales/sv.ts
@@ -1154,6 +1154,9 @@ export const sv = {
storageDisk: "{free} ledigt av {total} på den här disken",
storageEmpty: "Inget lagras i biblioteket ännu.",
storageHidden: "{size} dolt i innehållsinställningarna",
+ storageHiddenLabel: "Dolt",
+ storageRefresh: "Uppdatera",
+ storageOpen: "Öppna",
storageError: "Det gick inte att läsa bibliotekets lagring.",
locationsSection: "Filer på disk",
locationsDescription:
@@ -2474,7 +2477,7 @@ export const sv = {
},
},
resources: {
- title: "System",
+ title: "System och motor",
description: "Övervaka maskinvara och lagring på denna Unsloth-server.",
liveUpdates: "Direktuppdateringar",
floatingWindow: "Flytande fönster",
@@ -2648,6 +2651,13 @@ export const sv = {
storage: {
title: "Lagring",
systemDisk: "Systemdisk",
+ systemUsed: "{used} av {total} används på systemdisken",
+ modelsDiskSummary: "Enheten för modellmappen: {used} av {total} används, {free} ledigt",
+ segmentModels: "Modeller",
+ segmentCaches: "Cacheminnen",
+ segmentOther: "Övrigt",
+ segmentFree: "Ledigt",
+ refreshAction: "Uppdatera",
modelsDisk: "Modelldisk",
diskUsage: "{used} används / {total}",
diskFree: "{free} ledigt",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index a9db0f9d320..7620484183e 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -1041,6 +1041,9 @@ export const zhCN = {
storageDisk: "此磁盘可用 {free},共 {total}",
storageEmpty: "资料库中还没有任何内容。",
storageHidden: "内容设置中已隐藏 {size}",
+ storageHiddenLabel: "已隐藏",
+ storageRefresh: "刷新",
+ storageOpen: "打开",
storageError: "无法读取资料库存储空间。",
locationsSection: "磁盘上的文件",
locationsDescription: "Unsloth 存放各类文件的位置。资料库文件夹只是 Unsloth 内的标签,不是磁盘上的文件夹。微调模型和导出文件保持原位,因为训练和对话会按路径引用它们。",
@@ -2280,7 +2283,7 @@ export const zhCN = {
},
},
resources: {
- title: "系统",
+ title: "系统与引擎",
description: "监控此 Unsloth 服务器的硬件和存储。",
liveUpdates: "实时更新",
floatingWindow: "悬浮窗口",
@@ -2430,6 +2433,13 @@ export const zhCN = {
storage: {
title: "存储",
systemDisk: "系统磁盘",
+ systemUsed: "系统磁盘已用 {used},共 {total}",
+ modelsDiskSummary: "模型文件夹所在磁盘:已用 {used},共 {total},可用 {free}",
+ segmentModels: "模型",
+ segmentCaches: "缓存",
+ segmentOther: "其他",
+ segmentFree: "可用",
+ refreshAction: "刷新",
modelsDisk: "模型磁盘",
diskUsage: "已用 {used} / {total}",
diskFree: "{free} 可用",
diff --git a/studio/frontend/tests/cache-rows-model-folder.test.ts b/studio/frontend/tests/cache-rows-model-folder.test.ts
index de2d1b66ce4..878fbec7e84 100644
--- a/studio/frontend/tests/cache-rows-model-folder.test.ts
+++ b/studio/frontend/tests/cache-rows-model-folder.test.ts
@@ -39,12 +39,14 @@ function loadRows(): Rows {
"@/features/hub/stores/inventory-events": { useInventoryVersion: () => 0 },
"@/i18n": { useT: () => (key: string) => key },
"@/lib/toast": { toast: {} },
+ "@hugeicons/core-free-icons": { Delete02Icon: {} },
+ "@hugeicons/react": { HugeiconsIcon: noop },
"../api/caches": {
bulkPurgeKeys: () => [],
loadCacheInventory: async () => null,
purgeCaches: async () => null,
},
- "./settings-row": { SettingsRow: noop },
+ "./storage-overview": { SettingsCardRow: noop },
});
}
@@ -130,7 +132,10 @@ function driveRows(options: {
},
};
- const rows = loadWithStubs<{ CacheStorageRows: () => unknown }>(ROWS_URL, {
+ const rows = loadWithStubs<{
+ CacheStorageRows: (props: { cache: unknown }) => unknown;
+ useCacheStorage: () => unknown;
+ }>(ROWS_URL, {
react,
"react/jsx-runtime": stubJsxRuntime(),
"@/components/ui/button": { Button: "Button" },
@@ -155,19 +160,21 @@ function driveRows(options: {
error: () => undefined,
},
},
+ "@hugeicons/core-free-icons": { Delete02Icon: {} },
+ "@hugeicons/react": { HugeiconsIcon: "HugeiconsIcon" },
"../api/caches": {
bulkPurgeKeys: () => ["uv"],
loadCacheInventory: options.load,
purgeCaches: options.purge ?? (async () => ({})),
},
- "./settings-row": { SettingsRow: "SettingsRow" },
+ "./storage-overview": { SettingsCardRow: "SettingsCardRow" },
});
return () => {
stateCursor = 0;
refCursor = 0;
callbackCursor = 0;
- const tree = rows.CacheStorageRows();
+ const tree = rows.CacheStorageRows({ cache: rows.useCacheStorage() });
const effect = pending;
pending = null;
effect?.();