GUI Avalonia multipiattaforma in solo C# e rinomina in agent-wiki-ui
Sostituisce WinForms, WebView2 e ui.html con una GUI Avalonia (XAML, ViewModel, tema chiaro/scuro) e un renderer markdown che trasforma l'albero di Markdig in controlli. Un solo progetto net10.0 per Windows e Linux, con publish single-file compresso. L'avvio di claude è in un solo punto (Core/Claude.cs) condiviso da CLI e GUI. Il nome dell'app viene dall'AssemblyName; ChatStore migra la cartella dati LlmRun alla nuova. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9c6a679e6a
commit
941d02110d
13 files changed
+966
-50
No files matched your search
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace AgentWikiUi.Gui;
|
||||
|
||||
class ObservableObject : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
protected bool Set<T>(ref T field, T value, [CallerMemberName] string? name = null)
|
||||
{
|
||||
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
|
||||
field = value;
|
||||
Raise(name);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void Raise([CallerMemberName] string? name = null) => PropertyChanged?.Invoke(this, new(name));
|
||||
}
|
||||
|
||||
class RelayCommand<T>(Action<T?> run, Func<bool>? canRun = null) : ICommand
|
||||
{
|
||||
public event EventHandler? CanExecuteChanged;
|
||||
public bool CanExecute(object? parameter) => canRun?.Invoke() ?? true;
|
||||
public void Execute(object? parameter) => run(parameter is T t ? t : default);
|
||||
public void Refresh() => CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
Reference in new issue
Block a user