fix(cli): show install notice when whisper needs to be installed

When whisper-cpp isn't found, show an info message before the spinner:
"whisper-cpp not found — installing automatically..."
Then the spinner shows "Installing whisper-cpp (this may take a moment)..."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-03-26 18:03:30 +00:00
committed by Vance Ingalls
co-authored by Claude Opus 4.6
parent a5f960f4f8
commit 49cf4409eb
+11 -1
View File
@@ -605,8 +605,18 @@ export default defineCommand({
initialValue: true,
});
if (!clack.isCancel(transcribeChoice) && transcribeChoice) {
const { findWhisper } = await import("../whisper/manager.js");
const needsInstall = findWhisper() === undefined;
if (needsInstall) {
clack.log.info(c.dim("whisper-cpp not found — installing automatically..."));
}
const spin = clack.spinner();
spin.start("Setting up transcription...");
spin.start(
needsInstall
? "Installing whisper-cpp (this may take a moment)..."
: "Preparing transcription...",
);
try {
const { ensureWhisper, ensureModel } = await import("../whisper/manager.js");
await ensureWhisper({