feat(settings): make max-turns ceiling editable in General tab
This commit is contained in:
@@ -17,9 +17,8 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
|
||||
[ObservableProperty] private string _defaultClaudeInstructions = "";
|
||||
[ObservableProperty] private string _defaultModel = ModelRegistry.DefaultAlias;
|
||||
[ObservableProperty] private int _defaultMaxTurns = 40;
|
||||
// Hard ceiling every resolved max-turns value is clamped to before a run starts. Not directly
|
||||
// editable here yet — loaded and echoed back on save so it round-trips, and drives the clamp
|
||||
// hints on the preset rows below and on AgentConfigEditorViewModel.
|
||||
// Hard ceiling every resolved max-turns value is clamped to before a run starts. Drives the
|
||||
// clamp hints on the preset rows below and on AgentConfigEditorViewModel.
|
||||
[ObservableProperty] private int _maxTurnsCeiling = 80;
|
||||
[ObservableProperty] private string _defaultPermissionMode = PermissionModeRegistry.DefaultMode;
|
||||
[ObservableProperty] private int _maxParallelExecutions = 1;
|
||||
@@ -97,6 +96,8 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
|
||||
|
||||
public string? Validate()
|
||||
{
|
||||
if (MaxTurnsCeiling < 1)
|
||||
return Loc.T("settings.general.maxTurnsCeilingInvalid");
|
||||
if (MaxParallelExecutions < 1 || MaxParallelExecutions > 20)
|
||||
return "Max parallel executions must be between 1 and 20.";
|
||||
if (UsageGateFiveHourPct < 0 || UsageGateFiveHourPct > 100)
|
||||
|
||||
Reference in New Issue
Block a user