feat(ui): Listen-Einstellungen — Checkbox fuer serialize_on_file_overlap
Das Flag war bisher nur ueber MCP set_list_config erreichbar. UpdateListConfigDto fuehrt es tri-state (null = gespeicherten Wert behalten), damit nur das Listen-Modal es setzen/loeschen kann und kein anderer Aufrufer es per Omission verliert.
This commit is contained in:
@@ -189,10 +189,12 @@ public sealed partial class AgentConfigEditorViewModel : ViewModelBase, IDisposa
|
||||
catch { }
|
||||
}
|
||||
|
||||
// verifyCommand is a List-only field owned by ListSettingsModalViewModel (not this editor,
|
||||
// which is also reused for Task scope); the caller passes it through so the single
|
||||
// UpdateListConfig call carries the full desired row instead of clobbering it.
|
||||
public async System.Threading.Tasks.Task SaveAsync(string? verifyCommand = null)
|
||||
// verifyCommand and serializeOnFileOverlap are List-only fields owned by
|
||||
// ListSettingsModalViewModel (not this editor, which is also reused for Task scope); the caller
|
||||
// passes them through so the single UpdateListConfig call carries the full desired row instead
|
||||
// of clobbering it.
|
||||
public async System.Threading.Tasks.Task SaveAsync(
|
||||
string? verifyCommand = null, bool? serializeOnFileOverlap = null)
|
||||
{
|
||||
if (TargetId is null) return;
|
||||
var model = string.IsNullOrWhiteSpace(Model) ? null : Model;
|
||||
@@ -204,7 +206,7 @@ public sealed partial class AgentConfigEditorViewModel : ViewModelBase, IDisposa
|
||||
if (_scope == AgentConfigScope.Task)
|
||||
await _worker.UpdateTaskAgentSettingsAsync(new UpdateTaskAgentSettingsDto(TargetId, model, sp, ap, turns, skills));
|
||||
else
|
||||
await _worker.UpdateListConfigAsync(new UpdateListConfigDto(TargetId, model, sp, ap, turns, skills, verifyCommand));
|
||||
await _worker.UpdateListConfigAsync(new UpdateListConfigDto(TargetId, model, sp, ap, turns, skills, verifyCommand, serializeOnFileOverlap));
|
||||
}
|
||||
|
||||
private List<string>? SelectedSessionSkillNames()
|
||||
|
||||
@@ -36,6 +36,9 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
// Optional post-merge verification command (build/test), run in WorkingDir after a merge
|
||||
// lands; a non-zero exit keeps the task out of Done instead of silently reporting merged.
|
||||
[ObservableProperty] private string _verifyCommand = "";
|
||||
// When on, the queue picker holds back a queued task whose declared scope globs overlap a
|
||||
// running/awaiting-merge sibling in this list (ListConfigEntity.SerializeOnFileOverlap).
|
||||
[ObservableProperty] private bool _serializeOnFileOverlap;
|
||||
|
||||
public ObservableCollection<string> CommitTypeOptions { get; } = new(CommitTypeRegistry.Types);
|
||||
|
||||
@@ -71,6 +74,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
await Agent.LoadForListAsync(listId, ct);
|
||||
var cfg = await _worker.GetListConfigAsync(listId);
|
||||
VerifyCommand = cfg?.VerifyCommand ?? "";
|
||||
SerializeOnFileOverlap = cfg?.SerializeOnFileOverlap ?? false;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
@@ -84,7 +88,9 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|
||||
IsManual,
|
||||
FindingsTracked));
|
||||
|
||||
await Agent.SaveAsync(string.IsNullOrWhiteSpace(VerifyCommand) ? null : VerifyCommand);
|
||||
await Agent.SaveAsync(
|
||||
string.IsNullOrWhiteSpace(VerifyCommand) ? null : VerifyCommand,
|
||||
SerializeOnFileOverlap);
|
||||
|
||||
CloseAction?.Invoke();
|
||||
}
|
||||
|
||||
@@ -74,6 +74,13 @@
|
||||
<TextBlock Text="{loc:Tr modals.listSettings.findingsTrackedHint}"
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="4">
|
||||
<CheckBox IsChecked="{Binding SerializeOnFileOverlap, Mode=TwoWay}"
|
||||
Content="{loc:Tr modals.listSettings.serializeOnFileOverlap}"/>
|
||||
<TextBlock Text="{loc:Tr modals.listSettings.serializeOnFileOverlapHint}"
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user