Merge claudedo/9a0fd00eaf164f3883e4a9e7e28ac99f

This commit is contained in:
mika kuns
2026-07-29 09:15:06 +02:00
9 changed files with 142 additions and 2 deletions
@@ -4,6 +4,7 @@ using ClaudeDo.Localization;
using ClaudeDo.Ui.Services;
using ClaudeDo.Ui.ViewModels.Agent;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace ClaudeDo.Ui.ViewModels.Modals.Settings;
@@ -27,6 +28,27 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
public ObservableCollection<SelectableSkillViewModel> SessionSkills { get; } = new();
public ObservableCollection<AccentPresetSwatchViewModel> AccentPresetSwatches { get; } = new();
private Action<string>? _persistAccent;
public void InitAccentPresets(string saved, Action<string> persist)
{
_persistAccent = persist;
var current = AccentPresets.Find(saved);
AccentPresetSwatches.Clear();
foreach (var p in AccentPresets.All)
AccentPresetSwatches.Add(new AccentPresetSwatchViewModel(p, p.Name == current.Name));
}
[RelayCommand]
private void SelectAccentPreset(AccentPreset preset)
{
foreach (var s in AccentPresetSwatches)
s.IsSelected = s.Preset.Name == preset.Name;
AccentPresetService.Apply(preset);
_persistAccent?.Invoke(preset.Name);
}
/// <summary>One editable row per model alias: the effort and turn budget a run gets under that
/// model. Supplies the global defaults; list- and task-level max-turns overrides still win.</summary>
public ObservableCollection<ModelPresetRowViewModel> ModelPresets { get; } = new();
@@ -36,6 +36,11 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
appSettings.Language = code;
appSettings.Save();
});
General.InitAccentPresets(appSettings.AccentPreset, preset =>
{
appSettings.AccentPreset = preset;
appSettings.Save();
});
Worktrees = new WorktreesSettingsTabViewModel(worker);
Files = new FilesSettingsTabViewModel(worker);
Prime = prime;