feat: create ModelManager component for managing image, text, speech, and TTS models

This commit is contained in:
techjarves committed 2026-06-23 08:10:28 +05:30
1 parent 076f68d9fb
commit 9441fbd5a2
1 file changed
+2 -2
+2 -2
View File
@@ -1103,7 +1103,7 @@ function ModelManager({
};
const handleUnloadModel = async (runtimeOverride = null) => {
const runtime = runtimeOverride || getRuntimeForType(activeModelType);
const runtime = runtimeOverride?.type ? runtimeOverride : getRuntimeForType(activeModelType);
if (!runtime || isUnloading) return;
if (runtime.type === "image") {
@@ -1541,7 +1541,7 @@ function ModelManager({
<div style={{ display: "flex", gap: "8px" }}>
{isActive ? (
<button className="m3-btn m3-btn-error" style={{ height: "36px", padding: "0 16px" }} onClick={handleUnloadModel} disabled={isUnloading}>
<button className="m3-btn m3-btn-error" style={{ height: "36px", padding: "0 16px" }} onClick={() => handleUnloadModel()} disabled={isUnloading}>
{isUnloading ? <RefreshCw className="progress-spinner" size={14} /> : <Trash2 size={14} />}
<span>{isUnloading ? "Unloading" : "Unload"}</span>
</button>