refactor(worker): remove MessageParser (replaced by StreamAnalyzer)
This commit is contained in:
@@ -12,8 +12,10 @@
|
||||
<TextBox Text="{Binding Name}" PlaceholderText="List name..."/>
|
||||
|
||||
<TextBlock Text="Working Directory" FontWeight="SemiBold"/>
|
||||
<TextBox Text="{Binding WorkingDir}" PlaceholderText="(optional) Absolute path to git repo"/>
|
||||
<!-- TODO: folder picker button using IStorageProvider -->
|
||||
<DockPanel>
|
||||
<Button DockPanel.Dock="Right" Content="Browse..." Click="OnBrowseFolder" Margin="8,0,0,0" VerticalAlignment="Center"/>
|
||||
<TextBox Text="{Binding WorkingDir}" PlaceholderText="(optional) Absolute path to git repo"/>
|
||||
</DockPanel>
|
||||
|
||||
<TextBlock Text="Default Commit Type" FontWeight="SemiBold"/>
|
||||
<ComboBox ItemsSource="{Binding CommitTypes}"
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
using ClaudeDo.Ui.ViewModels;
|
||||
|
||||
namespace ClaudeDo.Ui.Views;
|
||||
|
||||
@@ -8,4 +13,28 @@ public partial class ListEditorView : Window
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void OnBrowseFolder(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = DataContext as ListEditorViewModel;
|
||||
var startPath = !string.IsNullOrWhiteSpace(vm?.WorkingDir) && Directory.Exists(vm.WorkingDir)
|
||||
? vm.WorkingDir
|
||||
: Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||
|
||||
var startLocation = await StorageProvider.TryGetFolderFromPathAsync(new Uri(startPath));
|
||||
|
||||
var result = await StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Select Working Directory",
|
||||
SuggestedStartLocation = startLocation,
|
||||
AllowMultiple = false,
|
||||
});
|
||||
|
||||
if (result.Count > 0)
|
||||
{
|
||||
var path = result[0].TryGetLocalPath();
|
||||
if (path is not null && vm is not null)
|
||||
vm.WorkingDir = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user