Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| console.info(`Downloading Whisper model from ${descriptor.url}...`); | ||
| const response = await fetch<Uint8Array>(descriptor.url, { | ||
| method: 'GET', | ||
| responseType: ResponseType.Binary | ||
| }); |
There was a problem hiding this comment.
Register HTTP plugin before fetching models
The runtime downloader uses @tauri-apps/api/http.fetch to pull the Whisper model, but the backend still lacks the tauri-plugin-http dependency and .plugin(tauri_plugin_http::init()) call, so this call will immediately reject with “plugin http not initialized” and the model never downloads. Without a working download path, fresh installs ship without any model and transcription will always fail.
Useful? React with 👍 / 👎.
| const baseDir = await appDataDir(); | ||
| if (!baseDir) { | ||
| throw new Error('Failed to determine application data directory for model download.'); | ||
| } | ||
| const modelsDir = await join(baseDir, 'models'); |
There was a problem hiding this comment.
Allow fs access to appDataDir used for model storage
The code stores the model under appDataDir()/models, but the current tauri.conf.json only whitelists $RESOURCE/* and $APPCACHE/*. Calls to createDir/writeBinaryFile with an appDataDir path will be rejected by the file scope and the model will never persist. Extend the FS allowlist to $APPDATA/* or switch to a scoped directory before downloading.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6902e0f3eb24832cb59b96449f043684