huskies: merge 582_story_bot_configuration_page

This commit is contained in:
dave
2026-04-15 17:33:56 +00:00
parent d80fc143c2
commit 2246278845
6 changed files with 495 additions and 2 deletions
+8 -1
View File
@@ -8,6 +8,7 @@ import { useChatSend } from "../hooks/useChatSend";
import { useChatWebSocket } from "../hooks/useChatWebSocket";
import { estimateTokens, getContextWindowSize } from "../utils/chatUtils";
import { ApiKeyDialog } from "./ApiKeyDialog";
import { BotConfigPage } from "./BotConfigPage";
import { ChatHeader } from "./ChatHeader";
import type { ChatInputHandle } from "./ChatInput";
import { ChatInput } from "./ChatInput";
@@ -61,6 +62,7 @@ export function Chat({
null,
);
const [showHelp, setShowHelp] = useState(false);
const [view, setView] = useState<"chat" | "bot-config">("chat");
const [queuedMessages, setQueuedMessages] = useState<
{ id: string; text: string }[]
>([]);
@@ -373,12 +375,17 @@ export function Chat({
onToggleTools={setEnableTools}
wsConnected={wsConnected}
oauthStatus={oauthStatus}
onShowBotConfig={() => setView("bot-config")}
/>
{view === "bot-config" && (
<BotConfigPage onBack={() => setView("chat")} />
)}
<div
data-testid="chat-content-area"
style={{
display: "flex",
display: view === "bot-config" ? "none" : "flex",
flex: 1,
minHeight: 0,
flexDirection: isNarrowScreen ? "column" : "row",