Files
picoclaw/web/frontend/src/routes/__root.tsx
T
wenjie c513ad22d7 fix(web): refactor pico chat flow and fix proxied websocket URLs (#1639)
- move chat controller, state, protocol, history, and websocket logic into a dedicated chat feature module
- improve chat reconnection, session hydration, and send gating based on actual websocket state
- preserve gateway status during transient SSE disconnects and update stop state immediately
- generate wss websocket URLs behind HTTPS proxies and add backend tests for forwarded proto handling
2026-03-16 16:25:16 +08:00

22 lines
539 B
TypeScript

import { Outlet, createRootRoute } from "@tanstack/react-router"
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
import { useEffect } from "react"
import { AppLayout } from "@/components/app-layout"
import { initializeChatStore } from "@/features/chat/controller"
const RootLayout = () => {
useEffect(() => {
initializeChatStore()
}, [])
return (
<AppLayout>
<Outlet />
<TanStackRouterDevtools />
</AppLayout>
)
}
export const Route = createRootRoute({ component: RootLayout })