feat(settings): make max-turns ceiling editable in General tab
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
"effort": "Effort",
|
||||
"modelPresets": "Vorgaben pro Modell",
|
||||
"modelPresetsHint": "Effort und Durchlauf-Budget, mit denen eine Sitzung unter diesem Modell läuft. Overrides auf Listen- und Aufgabenebene gewinnen weiterhin.",
|
||||
"maxTurnsCeiling": "Max. Durchläufe – Obergrenze",
|
||||
"maxTurnsCeilingHint": "Harte Obergrenze, auf die jeder aufgelöste Max-Durchläufe-Wert geklemmt wird — Task-, Listen- und Modell-Einstellungen können sie nicht überschreiten.",
|
||||
"maxTurnsCeilingInvalid": "Die Obergrenze für Max. Durchläufe muss mindestens 1 sein.",
|
||||
"permission": "Berechtigung",
|
||||
"maxParallelExecutions": "Max. parallele Ausführungen",
|
||||
"maxParallelExecutionsHint": "Wie viele Aufgaben aus der Warteschlange der Worker gleichzeitig ausführt.",
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
"effort": "Effort",
|
||||
"modelPresets": "Per-model defaults",
|
||||
"modelPresetsHint": "Reasoning effort and turn budget used when a session runs under that model. List- and task-level max-turn overrides still win.",
|
||||
"maxTurnsCeiling": "Max turns ceiling",
|
||||
"maxTurnsCeilingHint": "Hard cap every resolved max-turns value is clamped to — task, list, and per-model settings can't exceed this.",
|
||||
"maxTurnsCeilingInvalid": "Max turns ceiling must be at least 1.",
|
||||
"permission": "Permission",
|
||||
"maxParallelExecutions": "Max parallel executions",
|
||||
"maxParallelExecutionsHint": "How many queued tasks the worker runs at once.",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -145,6 +145,14 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<StackPanel Spacing="4" Margin="0,4,0,0">
|
||||
<TextBlock Classes="eyebrow" Text="{loc:Tr settings.general.maxTurnsCeiling}"/>
|
||||
<NumericUpDown Value="{Binding General.MaxTurnsCeiling, Mode=TwoWay}"
|
||||
Minimum="1" Maximum="200" Increment="10" FormatString="0"
|
||||
HorizontalAlignment="Left" Width="140"/>
|
||||
<TextBlock Text="{loc:Tr settings.general.maxTurnsCeilingHint}"
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr settings.general.maxParallelExecutions}"/>
|
||||
|
||||
Reference in New Issue
Block a user