fix(tagger): separate JoyTag confidence threshold

Store confidence thresholds per tagger model so JoyTag no longer inherits WD tuning. Refresh the active threshold when switching models, guard stale threshold saves, and keep UI Lab mocks in sync.

Also tightens the onboarding model selector so the segmented control no longer stretches across the row.
This commit is contained in:
2026-07-03 09:21:39 +01:00
parent f1116c6c26
commit 68932b55c5
7 changed files with 82 additions and 35 deletions
+6 -1
View File
@@ -2159,6 +2159,7 @@ pub struct SetTaggerModelParams {
#[derive(Deserialize)]
pub struct SetTaggerThresholdParams {
pub threshold: f32,
pub model: Option<TaggerModel>,
}
#[derive(Deserialize)]
@@ -2258,7 +2259,11 @@ pub async fn set_tagger_threshold(
params: SetTaggerThresholdParams,
) -> Result<f32, String> {
let app_dir = app.path().app_data_dir().map_err(|e| e.to_string())?;
tagger::set_tagger_threshold(&app_dir, params.threshold).map_err(|e| e.to_string())
match params.model {
Some(model) => tagger::set_tagger_threshold_for_model(&app_dir, model, params.threshold),
None => tagger::set_tagger_threshold(&app_dir, params.threshold),
}
.map_err(|e| e.to_string())
}
#[tauri::command]