huskies: merge 595_story_web_ui_settings_page_with_form_based_project_toml_editor

This commit is contained in:
dave
2026-04-17 13:33:19 +00:00
parent 982e65aec5
commit 43ca0cbc59
6 changed files with 1018 additions and 3 deletions
+8 -2
View File
@@ -9,6 +9,7 @@ import { useChatWebSocket } from "../hooks/useChatWebSocket";
import { estimateTokens, getContextWindowSize } from "../utils/chatUtils";
import { ApiKeyDialog } from "./ApiKeyDialog";
import { BotConfigPage } from "./BotConfigPage";
import { SettingsPage } from "./SettingsPage";
import { ChatHeader } from "./ChatHeader";
import type { ChatInputHandle } from "./ChatInput";
import { ChatInput } from "./ChatInput";
@@ -62,7 +63,7 @@ export function Chat({
null,
);
const [showHelp, setShowHelp] = useState(false);
const [view, setView] = useState<"chat" | "bot-config">("chat");
const [view, setView] = useState<"chat" | "bot-config" | "settings">("chat");
const [queuedMessages, setQueuedMessages] = useState<
{ id: string; text: string }[]
>([]);
@@ -376,16 +377,21 @@ export function Chat({
wsConnected={wsConnected}
oauthStatus={oauthStatus}
onShowBotConfig={() => setView("bot-config")}
onShowSettings={() => setView("settings")}
/>
{view === "bot-config" && (
<BotConfigPage onBack={() => setView("chat")} />
)}
{view === "settings" && (
<SettingsPage onBack={() => setView("chat")} />
)}
<div
data-testid="chat-content-area"
style={{
display: view === "bot-config" ? "none" : "flex",
display: view === "chat" ? "flex" : "none",
flex: 1,
minHeight: 0,
flexDirection: isNarrowScreen ? "column" : "row",