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
+39
View File
@@ -34,6 +34,7 @@ interface ChatHeaderProps {
onToggleTools: (enabled: boolean) => void;
wsConnected: boolean;
oauthStatus?: OAuthStatus | null;
onShowBotConfig?: () => void;
}
const getContextEmoji = (percentage: number): string => {
@@ -58,6 +59,7 @@ export function ChatHeader({
onToggleTools,
wsConnected,
oauthStatus = null,
onShowBotConfig,
}: ChatHeaderProps) {
const hasModelOptions = availableModels.length > 0 || claudeModels.length > 0;
const [showConfirm, setShowConfirm] = useState(false);
@@ -513,6 +515,43 @@ export function ChatHeader({
🔄 New Session
</button>
{onShowBotConfig && (
<button
type="button"
onClick={onShowBotConfig}
title="Configure bot credentials"
style={{
padding: "6px 12px",
borderRadius: "99px",
border: "none",
fontSize: "0.85em",
backgroundColor: "#2f2f2f",
color: "#888",
cursor: "pointer",
outline: "none",
transition: "all 0.2s",
}}
onMouseOver={(e) => {
e.currentTarget.style.backgroundColor = "#3f3f3f";
e.currentTarget.style.color = "#ccc";
}}
onMouseOut={(e) => {
e.currentTarget.style.backgroundColor = "#2f2f2f";
e.currentTarget.style.color = "#888";
}}
onFocus={(e) => {
e.currentTarget.style.backgroundColor = "#3f3f3f";
e.currentTarget.style.color = "#ccc";
}}
onBlur={(e) => {
e.currentTarget.style.backgroundColor = "#2f2f2f";
e.currentTarget.style.color = "#888";
}}
>
Bot
</button>
)}
{hasModelOptions ? (
<select
value={model}