File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ interface HomeLayoutProps {
2424export function HomeLayout ( { children } : HomeLayoutProps ) {
2525 const { setContext } = useNavigationContext ( ) ;
2626 const { isAiEnabled } = useDiscovery ( ) ;
27+ // Render the chatbot whenever AI is reachable. If the developer has explicitly
28+ // configured `VITE_AI_BASE_URL`, trust that opt-in even when discovery
29+ // reports AI as disabled (e.g. framework started without `--preset full`).
30+ const aiBaseUrlConfigured = Boolean ( import . meta. env ?. VITE_AI_BASE_URL ) ;
31+ const showChatbot = isAiEnabled || aiBaseUrlConfigured ;
2732
2833 useEffect ( ( ) => {
2934 setContext ( 'home' ) ;
@@ -39,7 +44,7 @@ export function HomeLayout({ children }: HomeLayoutProps) {
3944 </ main >
4045
4146 { /* Global floating chatbot — also available on the home/workspace screen */ }
42- { isAiEnabled && (
47+ { showChatbot && (
4348 < Suspense fallback = { null } >
4449 < ConsoleFloatingChatbot appLabel = "Workspace" objects = { [ ] } />
4550 </ Suspense >
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ export function ConsoleLayout({
5656} : ConsoleLayoutProps ) {
5757 const appLabel = resolveI18nLabel ( activeApp ?. label ) || activeAppName ;
5858 const { isAiEnabled } = useDiscovery ( ) ;
59+ // Trust an explicit `VITE_AI_BASE_URL` opt-in even when discovery reports
60+ // AI as disabled (e.g. framework started without `--preset full`).
61+ const aiBaseUrlConfigured = Boolean ( import . meta. env ?. VITE_AI_BASE_URL ) ;
62+ const showChatbot = isAiEnabled || aiBaseUrlConfigured ;
5963 const { setContext, setCurrentAppName } = useNavigationContext ( ) ;
6064
6165 // Set navigation context to 'app' when this layout mounts
@@ -101,8 +105,9 @@ export function ConsoleLayout({
101105 { children }
102106 </ ConsoleLayoutInner >
103107
104- { /* Global floating chatbot — rendered only when AI service is available */ }
105- { isAiEnabled && (
108+ { /* Global floating chatbot — rendered when AI service is available
109+ OR when `VITE_AI_BASE_URL` has been explicitly configured. */ }
110+ { showChatbot && (
106111 < Suspense fallback = { null } >
107112 < ConsoleFloatingChatbot appLabel = { appLabel } objects = { objects } />
108113 </ Suspense >
You can’t perform that action at this time.
0 commit comments