From 6520e215ba0190cc810a4fcfe3eab8b7e5292041 Mon Sep 17 00:00:00 2001 From: grimsace Date: Tue, 30 Jun 2026 10:43:15 -0500 Subject: [PATCH] ui changes for modularity and npc generation --- llmflow/npc.toml | 12 ++++++++++ viewmodels/mainwindowviewmodel.cs | 12 ++++++++++ views/mainwindow.axaml | 40 ++++++++----------------------- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/llmflow/npc.toml b/llmflow/npc.toml index 665f583..721b160 100644 --- a/llmflow/npc.toml +++ b/llmflow/npc.toml @@ -3,10 +3,22 @@ retry_prefix = "Previous attempts failed. Please try again and ensure you follow # NPC Generation Prompts +[description_from_name_and_level] +question = "Based on the name '{name}' and character level {level}, write a short description for this character." +constraints = "Respond with a descriptive paragraph (2-4 sentences). Do not include any other text or metadata." + [name] question = "Based on the description, what is a fitting name for this character?" constraints = "Respond with only the name." +[name_from_description_and_level] +question = "Based on the description {description} and level {level}, what is a fitting name for this character?" +constraints = "Respond with only the name." + +[name_from_level] +question = "Based on the character level {level}, what is a fitting name for this character?" +constraints = "Respond with only the name." + [ability_score_modifier] question = "Based on the description, how would you rate the {modifierTier} ability score modifier for a level {level} character in {system}?" constraints = "Respond with only a single word: Extreme, High, Moderate, or Low." diff --git a/viewmodels/mainwindowviewmodel.cs b/viewmodels/mainwindowviewmodel.cs index 0b0eddd..d9461c2 100644 --- a/viewmodels/mainwindowviewmodel.cs +++ b/viewmodels/mainwindowviewmodel.cs @@ -53,16 +53,24 @@ namespace finder2e_foundry_converter.ViewModels public ObservableCollection Models { get; } = new(); [ObservableProperty] + [NotifyPropertyChangedFor(nameof(IsNpcSelected))] private string? _selectedCategory; public ObservableCollection Categories { get; } = new() { "NPCs" }; + [ObservableProperty] + private int _selectedLevel = 1; + + public ObservableCollection Levels { get; } = new(); + [ObservableProperty] private string _name = string.Empty; [ObservableProperty] private string _description = string.Empty; + public bool IsNpcSelected => SelectedCategory == "NPCs"; + public ObservableCollection ImageItems { get; } = new(); [ObservableProperty] @@ -77,6 +85,10 @@ namespace finder2e_foundry_converter.ViewModels public MainWindowViewModel() { // Load saved preferences would go here if we had a settings service + for (int i = -1; i <= 24; i++) + { + Levels.Add(i); + } _ = StartModelRefreshLoop(); } diff --git a/views/mainwindow.axaml b/views/mainwindow.axaml index a0c5547..356b360 100644 --- a/views/mainwindow.axaml +++ b/views/mainwindow.axaml @@ -48,38 +48,18 @@ ItemsSource="{Binding Categories}" SelectedItem="{Binding SelectedCategory}"/> -