Add engine update button to auto-translate window#11289
Merged
Conversation
The auto-translate engine combo shows an amber "update available" dot for SE-managed engines (CrispASR/MADLAD and llama.cpp) when the installed binary is outdated, but there was no way to act on it: CrispASR had no update path at all, and llama.cpp only offered a one-time prompt on engine selection. Add an "Update" button after the engine combobox that appears only when the selected engine is installed but outdated, and re-downloads the engine binary: - CrispAsrTranslateDownloadHelper: IsEngineUpdateAvailable() + UpdateEngineAsync() that force-redownloads just the engine binary (models left untouched). - AutoTranslateViewModel: generalized UpdateEngine command + RefreshEngineUpdateButton covering both engines; extracted GetLlamaCppEngineUpdate()/UpdateLlamaCppEngineAsync() so the button and the existing llama.cpp prompt share one code path. - AutoTranslateWindow: update button bound to EngineUpdateButtonIsVisible. Hidden for cloud/API translators and for engines that are not installed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an "Update" button next to the auto-translate engine combobox that re-downloads the engine binary when an update is available for SE-managed engines (CrispASR/MADLAD, llama.cpp). The button mirrors the amber status dot already shown in the combo and is hidden for cloud/API translators or up-to-date engines.
Changes:
- New
CrispAsrTranslateDownloadHelper.IsEngineUpdateAvailable()andUpdateEngineAsync()(CrispASR engine-only force redownload, models untouched). AutoTranslateViewModel: newUpdateEnginecommand,EngineUpdateButtonIsVisibleflag andRefreshEngineUpdateButton(); refactored llama.cpp update path into sharedGetLlamaCppEngineUpdate()/UpdateLlamaCppEngineAsync()used by both the new button and the existing on-select prompt.AutoTranslateWindow: new "Update" button (download icon, "Update available" tooltip) bound toEngineUpdateButtonIsVisible, placed after the engine combo.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/ui/Features/Translate/CrispAsrTranslateDownloadHelper.cs | Adds engine-update detection and engine-only force-redownload helpers for CrispASR/MADLAD. |
| src/ui/Features/Translate/AutoTranslateViewModel.cs | Adds shared update command, visibility flag and refresh helper; extracts shared llama.cpp update logic. |
| src/ui/Features/Translate/AutoTranslateWindow.cs | Adds "Update" button bound to the new visibility flag, placed after the engine combobox. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The auto-translate engine combo shows an amber "update available" status dot for SE-managed engines (CrispASR/MADLAD and llama.cpp) when the installed binary is outdated — but there was previously no way to act on it. CrispASR had no engine-update path at all (
DownloadAsynconly fetched the binary when it was missing), and llama.cpp only offered a one-time Yes/No prompt when the engine was selected.This adds an "Update" button right after the engine combobox that appears only when the selected engine is installed but outdated, and re-downloads the engine binary.
Changes
CrispAsrTranslateDownloadHelper—IsEngineUpdateAvailable()(mirrors the amber dot viaDownloadHashManager.GetSidecarStatus) andUpdateEngineAsync()which force-redownloads just the engine binary, leaving MADLAD models untouched.AutoTranslateViewModel— generalizedUpdateEnginecommand +RefreshEngineUpdateButton()covering both engines; extractedGetLlamaCppEngineUpdate()/UpdateLlamaCppEngineAsync()so the new button and the existing llama.cpp on-select prompt share a single code path (no behavior change to that prompt).AutoTranslateWindow— "Update" button (download icon, "Update available" tooltip) bound toEngineUpdateButtonIsVisible, placed after the engine combobox.The button stays hidden for cloud/API translators (Google, DeepL, ChatGPT, …) and for engines that are not installed.
Verification
Uses existing translated strings
General.Update/General.UpdateAvailable— no new language keys.🤖 Generated with Claude Code