"use client" /** * The Ask Leo conversation itself — transcript, starter cards, composer. * * Extracted from `AskLeoSidebar` when Leo gained a second shell (the floating * window). Both shells render this, so the two views cannot drift: one empty * state, one composer, one set of route-seeded starters. * * Header chrome is deliberately *not* here. The two shells need different * controls — the window adds a drag handle and a minimise button — and the * header is the one part that legitimately differs. The two pieces both headers * need are exported alongside the body: `AskLeoIdentity` and * `AskLeoNewChatButton`. * * Thread state lives here rather than in a provider, which means switching * shells starts a fresh conversation. That matches how panel → full screen has * always behaved, and the panel already resets on close. * * Ambience is not here either. It belongs to `LeoAmbientSurface`, which the * full-screen route mounts as well — a layer only these two shells could reach * is a layer full screen was always going to be missing. * * @see components/ask-leo-sidebar.tsx — docked rail * @see components/ask-leo-window.tsx — floating window * @see components/leo-ambient-surface.tsx — the shared ambience */ import * as React from "react" import { useLocation } from "react-router" import { AskLeoComposer } from "@/components/ask-leo-composer" import { useAskLeo } from "@/components/ask-leo-context" import { LeoAmbientSurface, LeoComposerVeil, } from "@/components/leo-ambient-surface" import { useLeoAmbience } from "@/components/leo-ambience-context" import { LeoThreadMessages } from "@/components/leo-thread-messages" import { StatusBadge } from "@/components/ui/status-badge" import { LeoIcon } from "@/components/ui/leo-icon" import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip" import { ASK_LEO_GENERIC_SUGGESTIONS, getAskLeoRouteContext, } from "@/lib/ask-leo-route-context" import { dispatchLeoNewChat, useLeoNewChat } from "@/lib/leo-new-chat" import { useLeoThread } from "@/lib/use-leo-thread" import { cn } from "@/lib/utils" /** * Identity block shared by both shells: mark, name, beta status, and the * "responses may vary" disclosure that has to appear wherever Leo answers. */ export function AskLeoIdentity({ className }: { className?: string }) { return (