refactor(config): consolidate commit types into CommitTypeRegistry
Replaces six scattered "chore" literals across TaskEntity, ListEntity, WorkerHub, ListsIslandViewModel, ListNavItemViewModel and the inline commit type list in ListSettingsModalViewModel.
This commit is contained in:
@@ -14,7 +14,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
|
||||
[ObservableProperty] private string _name = "";
|
||||
[ObservableProperty] private string _workingDir = "";
|
||||
[ObservableProperty] private string _defaultCommitType = "chore";
|
||||
[ObservableProperty] private string _defaultCommitType = CommitTypeRegistry.DefaultType;
|
||||
|
||||
[ObservableProperty] private string _selectedModel = ModelRegistry.ListDefaultSentinel;
|
||||
[ObservableProperty] private string _systemPrompt = "";
|
||||
@@ -23,10 +23,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
public ObservableCollection<string> ModelOptions { get; } = new(
|
||||
new[] { ModelRegistry.ListDefaultSentinel }.Concat(ModelRegistry.Aliases));
|
||||
|
||||
public ObservableCollection<string> CommitTypeOptions { get; } = new()
|
||||
{
|
||||
"chore", "feat", "fix", "refactor", "docs", "test", "ci", "perf", "style", "build",
|
||||
};
|
||||
public ObservableCollection<string> CommitTypeOptions { get; } = new(CommitTypeRegistry.Types);
|
||||
|
||||
public ObservableCollection<AgentInfo> Agents { get; } = new();
|
||||
|
||||
@@ -47,7 +44,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
ListId = listId;
|
||||
Name = name;
|
||||
WorkingDir = workingDir ?? "";
|
||||
DefaultCommitType = string.IsNullOrWhiteSpace(defaultCommitType) ? "chore" : defaultCommitType;
|
||||
DefaultCommitType = string.IsNullOrWhiteSpace(defaultCommitType) ? CommitTypeRegistry.DefaultType : defaultCommitType;
|
||||
|
||||
Agents.Clear();
|
||||
Agents.Add(new AgentInfo("(none)", "", ""));
|
||||
|
||||
Reference in New Issue
Block a user