Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

fix(models): show size for downloaded models (#1484)

diligentpigcfab1dda9db1
diff --git a/AGENTS.md b/AGENTS.md
index 94d42a42..d2a6c1d3 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -174,14 +174,14 @@ Handy supports command-line parameters on all platforms for integration with scr
**Implementation:** `cli.rs` (definitions), `main.rs` (parsing), `lib.rs` (applying), `signal_handle.rs` (shared logic)
-| Flag | Description |
-| ------------------------ | -------------------------------------------------------------- |
-| `--toggle-transcription` | Toggle recording on/off on a running instance |
-| `--toggle-post-process` | Toggle recording with post-processing on/off |
-| `--cancel` | Cancel the current operation on a running instance |
-| `--start-hidden` | Launch without showing the main window (tray icon visible) |
-| `--no-tray` | Launch without system tray (closing window quits the app) |
-| `--debug` | Enable debug mode with verbose (Trace) logging |
+| Flag | Description |
+| ------------------------ | ---------------------------------------------------------- |
+| `--toggle-transcription` | Toggle recording on/off on a running instance |
+| `--toggle-post-process` | Toggle recording with post-processing on/off |
+| `--cancel` | Cancel the current operation on a running instance |
+| `--start-hidden` | Launch without showing the main window (tray icon visible) |
+| `--no-tray` | Launch without system tray (closing window quits the app) |
+| `--debug` | Enable debug mode with verbose (Trace) logging |
**Key design decisions:**
@@ -213,4 +213,4 @@ See the [Troubleshooting](README.md#troubleshooting) section in README.md.
- **Translations:** Follow [CONTRIBUTING_TRANSLATIONS.md](CONTRIBUTING_TRANSLATIONS.md).
- **Full contributor workflow:** [CONTRIBUTING.md](CONTRIBUTING.md).
-**Commits:** Use conventional commit prefixes (`feat:`, `fix:`, `docs:`, `refactor:`, `chore:`). Focus the message on *why*, not *what*.
+**Commits:** Use conventional commit prefixes (`feat:`, `fix:`, `docs:`, `refactor:`, `chore:`). Focus the message on _why_, not _what_.
diff --git a/README.md b/README.md
index 1be36e03..a8a065a2 100644
--- a/README.md
+++ b/README.md
@@ -217,7 +217,6 @@ Without these tools, Handy falls back to enigo which may have limited compatibil
- Enable **"Audio Feedback"** (also in Advanced) if you still want audible confirmation of recording state
- Users who upgrade from older versions or import settings from other platforms may need to manually apply this change
-
### Platform Support
- **macOS (both Intel and Apple Silicon)**
diff --git a/src/components/onboarding/ModelCard.tsx b/src/components/onboarding/ModelCard.tsx
index d1158dfc..f17e2d2d 100644
--- a/src/components/onboarding/ModelCard.tsx
+++ b/src/components/onboarding/ModelCard.tsx
@@ -4,6 +4,7 @@ import {
Check,
Download,
Globe,
+ HardDrive,
Languages,
Loader2,
Trash2,
@@ -78,6 +79,9 @@ const ModelCard: React.FC<ModelCardProps> = ({
// Get translated model name and description
const displayName = getTranslatedModelName(model, t);
const displayDescription = getTranslatedModelDescription(model, t);
+ const showModelSize =
+ status === "downloadable" || status === "available" || status === "active";
+ const formattedModelSize = formatModelSize(Number(model.size_mb));
const baseClasses =
"flex flex-col rounded-xl px-4 py-3 gap-2 text-left transition-all duration-200";
@@ -217,10 +221,14 @@ const ModelCard: React.FC<ModelCardProps> = ({
<span>{t("modelSelector.capabilities.translate")}</span>
</div>
)}
- {status === "downloadable" && (
+ {showModelSize && (
<span className="flex items-center gap-1.5 ms-auto text-xs text-text/50">
- <Download className="w-3.5 h-3.5" />
- <span>{formatModelSize(Number(model.size_mb))}</span>
+ {status === "downloadable" ? (
+ <Download className="w-3.5 h-3.5" />
+ ) : (
+ <HardDrive className="w-3.5 h-3.5" />
+ )}
+ <span>{formattedModelSize}</span>
</span>
)}
{onDelete && (status === "available" || status === "active") && (
@@ -229,7 +237,7 @@ const ModelCard: React.FC<ModelCardProps> = ({
size="sm"
onClick={handleDelete}
title={t("modelSelector.deleteModel", { modelName: displayName })}
- className="flex items-center gap-1.5 ms-auto text-logo-primary/85 hover:text-logo-primary hover:bg-logo-primary/10"
+ className="flex items-center gap-1.5 text-logo-primary/85 hover:text-logo-primary hover:bg-logo-primary/10"
>
<Trash2 className="w-3.5 h-3.5" />
<span>{t("common.delete")}</span>