TaskDetailView now edits Model / SystemPrompt / Agent inline (LostFocus save), matching the modal editor. Both TaskEditorView and TaskDetailView gain a Browse button that opens a .md file picker — external agent paths are preserved on reload via a synthetic AgentInfo entry. Both views also render the per-task subtask checklist (CheckBox + TextBox + remove), with diff-on-save in the editor and inline-save in the detail panel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
851 B
C#
30 lines
851 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.Platform.Storage;
|
|
using ClaudeDo.Ui.ViewModels;
|
|
|
|
namespace ClaudeDo.Ui.Views;
|
|
|
|
public partial class TaskEditorView : Window
|
|
{
|
|
public TaskEditorView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private async void OnBrowseAgent(object? sender, RoutedEventArgs e)
|
|
{
|
|
var files = await StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
|
{
|
|
Title = "Select Agent File",
|
|
AllowMultiple = false,
|
|
FileTypeFilter = new[] { new FilePickerFileType("Agent Files") { Patterns = ["*.md"] } },
|
|
});
|
|
if (files.Count == 0) return;
|
|
var path = files[0].TryGetLocalPath();
|
|
if (path is null) return;
|
|
if (DataContext is TaskEditorViewModel vm)
|
|
vm.SetAgentFromPath(path);
|
|
}
|
|
}
|