fix oauth-ai-chat

This commit is contained in:
2025-07-17 19:18:54 +09:00
parent 67bb6e0028
commit ae8c7392b5
5 changed files with 25 additions and 334 deletions

View File

@@ -22,6 +22,10 @@ export default function App() {
const [showAskAI, setShowAskAI] = useState(false)
const [showTestUI, setShowTestUI] = useState(false)
// Simple detection: if the URL contains a date+hash pattern, it's likely an AI post
const isAiPost = !pageContext.isTopPage && pageContext.rkey &&
/^\d{4}-\d{2}-\d{2}-[a-f0-9]{8}$/.test(pageContext.rkey)
// Environment-based feature flags
const ENABLE_TEST_UI = import.meta.env.VITE_ENABLE_TEST_UI === 'true'
const ENABLE_DEBUG = import.meta.env.VITE_ENABLE_DEBUG === 'true'
@@ -354,6 +358,7 @@ Answer:`
return (
<div className="app">
{!isAiPost && (
<header className="oauth-app-header">
<div className="oauth-header-content">
{user && (
@@ -394,6 +399,7 @@ Answer:`
</div>
</div>
</header>
)}
<div className="main-content">
<div className="content-area">