From 01b2e650f3d96275a9e94ca1396dffb037e70639 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Sun, 12 Jul 2026 12:02:52 +0530 Subject: [PATCH] minor(gui): A lot of UI Improvements --- apps/gui/src/components/config/ConfigView.tsx | 109 +++- .../config/ProviderInstancesConfig.tsx | 54 +- apps/gui/src/components/play/PlayView.tsx | 9 +- apps/gui/src/components/play/PromptModal.tsx | 565 +++++++++++------- .../src/components/play/PromptSwitcher.tsx | 47 ++ apps/gui/src/components/ui/badge.tsx | 2 +- apps/gui/src/components/ui/card.tsx | 2 +- apps/gui/src/components/ui/dialog.tsx | 2 +- 8 files changed, 520 insertions(+), 270 deletions(-) create mode 100644 apps/gui/src/components/play/PromptSwitcher.tsx diff --git a/apps/gui/src/components/config/ConfigView.tsx b/apps/gui/src/components/config/ConfigView.tsx index 3153137..3e9961a 100644 --- a/apps/gui/src/components/config/ConfigView.tsx +++ b/apps/gui/src/components/config/ConfigView.tsx @@ -39,7 +39,9 @@ export function ConfigView() { const [config, setConfig] = useState(null); const [instances, setInstances] = useState([]); const [mappings, setMappings] = useState>({}); - const [availableProviders, setAvailableProviders] = useState([]); + const [availableProviders, setAvailableProviders] = useState< + ModelProviderMeta[] + >([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(""); @@ -74,10 +76,13 @@ export function ConfigView() { loadAll(); }, [loadAll]); - const handleUpdateMapping = async (task: string, providerInstanceId: string) => { + const handleUpdateMapping = async ( + task: string, + providerInstanceId: string, + ) => { if (task === "embeddings" && mappings[task] !== providerInstanceId) { const confirmChange = window.confirm( - "Changing the embeddings provider will delete all existing embeddings and regenerate them from scratch. Are you sure you want to do this?" + "Changing the embeddings provider will delete all existing embeddings and regenerate them from scratch. Are you sure you want to do this?", ); if (!confirmChange) return; } @@ -98,9 +103,17 @@ export function ConfigView() { return (
-

Configuration

- - {config === null && loading &&

Loading configuration...

} +

+ Configuration +

+

+ Manage Model Instances +

+ {config === null && loading && ( +

+ Loading configuration... +

+ )} {error && (
{error} @@ -108,7 +121,13 @@ export function ConfigView() { )} {config && ( -
+
-

Task Provider Routing

+

+ Task Provider Routing +

Configure which LLM Provider Key Instance should handle each specific simulation task. Mappings default to the currently{" "} @@ -128,12 +149,42 @@ export function ConfigView() {

{[ - { key: "actor-prose", label: "Actor Prose Generation", desc: "Generates roleplay/narrative prose for Non-Player Characters.", type: "generative" }, - { key: "llm-validator", label: "LLM Validator", desc: "Arbitrates and validates proposed actions against the world state rules.", type: "generative" }, - { key: "intent-decoder", label: "Intent Decoder", desc: "Splits raw prose actions into structured intents (Player and NPC).", type: "generative" }, - { key: "timedelta", label: "TimeDelta Generator", desc: "Calculates the duration of character actions to advance the game clock.", type: "generative" }, - { key: "handoff", label: "Memory Handoff Engine", desc: "Promotes entities' working memories to the long-term Ledger via LLM summarization and pruning.", type: "generative" }, - { key: "embeddings", label: "Text Embeddings Generator", desc: "Generates vector embeddings for long-term memory retrieval.", type: "embedding" }, + { + key: "actor-prose", + label: "Actor Prose Generation", + desc: "Generates roleplay/narrative prose for Non-Player Characters.", + type: "generative", + }, + { + key: "llm-validator", + label: "LLM Validator", + desc: "Arbitrates and validates proposed actions against the world state rules.", + type: "generative", + }, + { + key: "intent-decoder", + label: "Intent Decoder", + desc: "Splits raw prose actions into structured intents (Player and NPC).", + type: "generative", + }, + { + key: "timedelta", + label: "TimeDelta Generator", + desc: "Calculates the duration of character actions to advance the game clock.", + type: "generative", + }, + { + key: "handoff", + label: "Memory Handoff Engine", + desc: "Promotes entities' working memories to the long-term Ledger via LLM summarization and pruning.", + type: "generative", + }, + { + key: "embeddings", + label: "Text Embeddings Generator", + desc: "Generates vector embeddings for long-term memory retrieval.", + type: "embedding", + }, ].map((task) => (
{task.label} - {task.desc} + + {task.desc} +