Skip to content

feat(ui): dynamic language list + auto detection support - #18

Merged
manuc66 merged 1 commit into
mainfrom
vibe/language-auto-detection-5feb34
Oct 6, 2026
Merged

manuc66 merged 1 commit into
mainfrom
vibe/language-auto-detection-5feb34

Conversation

@manuc66

@manuc66 manuc66 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Extend ModelCapabilitySnapshot with Languages and TranslateTargetLanguages from model capabilities
  • Replace hardcoded language list in TranscriptionViewModel with dynamic list populated from the selected model
  • Add auto option to language dropdown when model supports language detection (SupportsLanguageDetect)
  • Handle auto in TranscriptionService by skipping WithLanguage() call (passing NULL to native layer)
  • Fallback to default language list when model capabilities are not yet loaded

Problem

The UI had a hardcoded list of languages (en, fr, de, es, it, pt, ru, zh, ja, ko) that was shown regardless of the selected model actual capabilities. This allowed users to select unsupported languages, causing errors. Additionally, there was no way to enable automatic language detection.

Solution

The language dropdown now dynamically shows:

  1. auto (only if model.SupportsLanguageDetect)
  2. All languages reported by the model via Model.GetCapabilities().Languages
  3. Fallback to the hardcoded list if capabilities have not been loaded yet

When auto is selected, the WithLanguage() call is skipped, which passes NULL to the native transcribe.cpp API - the documented way to enable auto-detection.

Files Changed

  • src/TranscribeCppSharp.Ui/Services/ModelCapabilityProbe.cs: Add Languages and TranslateTargetLanguages to snapshot
  • src/TranscribeCppSharp.Ui/ViewModels/TranscriptionViewModel.cs: Dynamic language list + UpdateAvailableLanguages method
  • src/TranscribeCppSharp.Ui/Services/TranscriptionService.cs: Skip WithLanguage for auto

Closes #

@manuc66
manuc66 marked this pull request as ready for review October 6, 2026 20:58
@manuc66
manuc66 force-pushed the vibe/language-auto-detection-5feb34 branch from e585aca to e5f2d7d Compare October 6, 2026 20:59
@codecov-commenter

codecov-commenter commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.12%. Comparing base (cdb5aa4) to head (6ae9dcb).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   78.12%   78.12%           
=======================================
  Files          74       74           
  Lines        4132     4132           
  Branches      456      456           
=======================================
  Hits         3228     3228           
  Misses        747      747           
  Partials      157      157           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Extend ModelCapabilitySnapshot with Languages and TranslateTargetLanguages
- Update ModelCapabilityProbe to populate languages from model capabilities
- Replace hardcoded language list in TranscriptionViewModel with dynamic list
- Add 'auto' option when model supports language detection
- Handle 'auto' in TranscriptionService by skipping WithLanguage() call
- Fallback to default list when capabilities are not yet loaded

Fixes issue where UI allowed selecting unsupported languages and had no
auto-detection option.

Closes #

Co-authored-by: manuc66 <manuc66@users.noreply.github.com>
@manuc66
manuc66 force-pushed the vibe/language-auto-detection-5feb34 branch from e5f2d7d to 6ae9dcb Compare October 6, 2026 21:04
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@manuc66
manuc66 merged commit a7025b9 into main Oct 6, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants