GUI: impostazioni di modello ed effort in un riquadro in alto a destra
Modello ed effort lasciano il composer e passano in un riquadro a comparsa aperto dal pulsante in alto a destra, simmetrico a quello della barra laterale. Il composer resta con campo di testo e pulsante Invia sulla stessa riga. Eliminati i suggerimenti della schermata iniziale. MVP.md e la matrice di TESTING.md sono aggiornati di conseguenza. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84fefda219
commit
fee788134d
5 files changed
+43
-67
No files matched your search
@@ -21,8 +21,6 @@ class ChatItem(string id, string title, DateTime updated, bool active)
|
||||
public bool IsActive { get; } = active;
|
||||
}
|
||||
|
||||
record Suggestion(string Title, string Subtitle, string Prompt);
|
||||
|
||||
class MainViewModel : ObservableObject
|
||||
{
|
||||
static readonly ModelOption Default = new("Predefinito", "");
|
||||
@@ -33,20 +31,11 @@ class MainViewModel : ObservableObject
|
||||
public ModelOption[] ModelChoices { get; } = [Default, .. Catalog.Models, Custom];
|
||||
public string[] EffortChoices { get; } = ["Predefinito", .. Catalog.Efforts];
|
||||
|
||||
public Suggestion[] Suggestions { get; } =
|
||||
[
|
||||
new("Spiega il progetto", "Panoramica e struttura", "Spiega cosa fa questo progetto e come è organizzato."),
|
||||
new("Scrivi uno script", "PowerShell, Python, C#…", "Scrivi uno script PowerShell che "),
|
||||
new("Rivedi del codice", "Bug, leggibilità, prestazioni", "Rivedi questo codice e suggerisci miglioramenti:\n\n"),
|
||||
new("Riassumi un testo", "Punti chiave in breve", "Riassumi in modo chiaro questo testo:\n\n"),
|
||||
];
|
||||
|
||||
public ICommand NewChatCommand => newChat;
|
||||
public ICommand CopyCommand { get; }
|
||||
public ICommand SendCommand { get; }
|
||||
public ICommand OpenCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
public ICommand SuggestCommand { get; }
|
||||
public ICommand ToggleSidebarCommand { get; }
|
||||
|
||||
/// <summary>Conferma di eliminazione, fornita dalla finestra.</summary>
|
||||
@@ -75,7 +64,6 @@ class MainViewModel : ObservableObject
|
||||
CopyCommand = new RelayCommand<string>(t => { if (t is not null) _ = CopyText(t); });
|
||||
OpenCommand = new RelayCommand<ChatItem>(c => { if (c is not null) OpenChat(c.Id); });
|
||||
DeleteCommand = new RelayCommand<ChatItem>(c => { if (c is not null) _ = DeleteAsync(c); });
|
||||
SuggestCommand = new RelayCommand<Suggestion>(s => { if (s is not null) { Input = s.Prompt; FocusInput?.Invoke(); } });
|
||||
ToggleSidebarCommand = new RelayCommand<object>(_ => SidebarOpen = !SidebarOpen);
|
||||
Messages.CollectionChanged += (_, _) => { Raise(nameof(HasMessages)); Raise(nameof(ShowEmpty)); };
|
||||
|
||||
|
||||
Reference in new issue
Block a user