Talk to wren nodes from the chat's Control tab, opened from Home
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router"
|
||||
import {
|
||||
createFileRoute,
|
||||
Outlet,
|
||||
redirect,
|
||||
useRouterState,
|
||||
} from "@tanstack/react-router"
|
||||
|
||||
import { ControlTrigger } from "@/components/Chat/ChatPanel"
|
||||
import { ConnectionNotice } from "@/components/Common/ConnectionNotice"
|
||||
import ErrorComponent from "@/components/Common/ErrorComponent"
|
||||
import { Footer } from "@/components/Common/Footer"
|
||||
@@ -31,6 +37,7 @@ function Layout() {
|
||||
// Dashboards live in this shell and read live values, so the socket belongs
|
||||
// here rather than only inside the editor.
|
||||
useFlowSocket()
|
||||
const home = useRouterState({ select: (s) => s.location.pathname === "/" })
|
||||
|
||||
return (
|
||||
<SidebarProvider className="bg-card">
|
||||
@@ -40,9 +47,11 @@ function Layout() {
|
||||
served through a portal: it raises the offline notification. */}
|
||||
<ConnectionNotice />
|
||||
{/* The sidebar carries its own collapse control; a phone has no
|
||||
sidebar on screen to carry it. */}
|
||||
sidebar on screen to carry it. Home's chat sits opposite, where
|
||||
the brain view has it on a wider screen. */}
|
||||
<header className="sticky top-0 z-10 flex h-16 shrink-0 items-center gap-2 px-4 md:hidden">
|
||||
<SidebarTrigger className="-ml-1 text-muted-foreground" />
|
||||
{home ? <ControlTrigger className="-mr-1 ml-auto" /> : null}
|
||||
</header>
|
||||
<main className="flex-1 p-4 sm:p-6 md:p-8">
|
||||
<div className="mx-auto max-w-7xl">
|
||||
|
||||
Reference in New Issue
Block a user