import { ElevationProvider } from "$lib/components/ui/elevation";
import { AgentAvatar } from "$lib/components/ai/agent-avatar";
} from "$lib/components/ai/message";
} from "$lib/components/ai/prompt-input";
import { PromptInputAgent } from "$lib/components/ai/prompt-input-agent";
import { Reasoning, ReasoningContent, ReasoningTrigger } from "$lib/components/ai/reasoning";
import { Suggestion } from "$lib/components/ai/suggestion";
import { Button } from "$lib/components/ui/button";
import { Card } from "$lib/components/ui/card";
import * as InsetPanel from "$lib/components/ui/inset-panel";
import * as Item from "$lib/components/ui/item";
import * as Tabs from "$lib/components/ui/tabs";
import IconPlaceholder from "$lib/components/icon-placeholder/icon-placeholder.svelte";
const sectionLabel = "mt-[22px] mb-2.5 text-[15px] text-foreground-2";
const panels = ["agent", "index"];
<ElevationProvider mode="layered">
<div class="flex min-h-svh items-start justify-center gap-6 bg-background p-6 text-foreground">
{#each panels as value, n (value)}
<div class={n === 0 ? "w-full max-w-[440px]" : "hidden w-full max-w-[440px] min-[960px]:block"}>
<Tabs.Root {value} class="h-[calc(100svh-3rem)] max-h-[900px] w-full max-w-[440px] gap-0">
<InsetPanel.Root class="h-full">
<InsetPanel.Header class="px-3.5">
<Tabs.List variant="pills">
<Tabs.Trigger value={t.toLowerCase()}>{t}</Tabs.Trigger>
<InsetPanel.Body class="flex flex-col">
<Tabs.Content value="agent" class="flex min-h-0 flex-1 flex-col">
<div class="min-h-0 flex-1 overflow-y-auto px-5 py-4">
<div class="flex items-center justify-between gap-2">
<Reasoning defaultOpen={false} duration={4} class="min-w-0 flex-1">
<ReasoningTrigger getThinkingMessage={() => reasoning.label} />
<ReasoningContent content={reasoning.text} />
<Button aria-label="More" size="icon-xs" type="button" variant="ghost">
lucide="MoreHorizontalIcon"
hugeicons="MoreHorizontalCircle01Icon"
phosphor="DotsThreeOutlineIcon"
<div class="mt-3 flex flex-col gap-[18px]">
<Message from="assistant">
<MessageResponse content={reply} />
<MessageContent>{userMessage}</MessageContent>
<Message from="assistant">
<div class="flex items-center gap-2 text-sm text-muted-foreground">
<AgentAvatar seed={agent.id} color={agent.color} size={19} tile={false} />
<MessageContent>{agentReply}</MessageContent>
<div class="flex flex-col gap-2">
{#each suggestions as s (s.title)}
<Suggestion suggestion={s.title} variant="card" class="w-full bg-card">
<div class="px-2.5 pb-2.5">
<PromptInput onSubmit={() => {}} class="[&_[data-slot=input-group]]:bg-muted">
<PromptInputAgent {agent} />
<PromptInputTextarea placeholder={composerPlaceholder} />
<PromptInputSubmit class="size-10" size="icon-sm" variant="secondary" />
<Tabs.Content value="index" class="flex min-h-0 flex-1 flex-col">
<div class="min-h-0 flex-1 overflow-y-auto px-[18px] pt-[18px] pb-6">
<div class="flex items-center justify-between">
<span class="text-xl font-medium">{index.name}</span>
hugeicons="PencilEdit01Icon"
phosphor="PencilSimpleIcon"
<div class={sectionLabel}>Stack</div>
<Card class="gap-0 py-0">
{#each index.stack as row, i (row.title)}
{#if i > 0}<Item.Separator class="my-0" />{/if}
<Item.Media variant="icon">
{#if row.icon === "domain"}
{:else if row.icon === "email"}
phosphor="EnvelopeSimpleIcon"
{:else if row.icon === "fees"}
hugeicons="CreditCardIcon"
phosphor="CreditCardIcon"
remixicon="RiBankCardLine"
hugeicons="ServerStackIcon"
phosphor="HardDrivesIcon"
remixicon="RiHardDriveLine"
<Item.Title>{row.title}</Item.Title>
<Item.Description>{row.note}</Item.Description>
<Button elevation="raised" size="sm" type="button" variant="outline">{row.action}</Button>
<div class={sectionLabel}>Important links</div>
<Card class="gap-0 py-0">
{#each index.links as row, i (row.title)}
{#if i > 0}<Item.Separator class="my-0" />{/if}
<Item.Title>{row.title}</Item.Title>
<Item.Description>{row.note}</Item.Description>
lucide="ChevronRightIcon"
tabler="IconChevronRight"
hugeicons="ArrowRight01Icon"
phosphor="CaretRightIcon"
remixicon="RiArrowRightSLine"
class="size-4 text-muted-foreground"
<div class={sectionLabel}>Agents</div>
<Card class="gap-0 py-0">
{#each index.agents as row, i (row.id)}
{#if i > 0}<Item.Separator class="my-0" />{/if}
<AgentAvatar seed={row.id} color={row.color} size={40} />
<Item.Title>{row.name}</Item.Title>
<Item.Description>{row.note}</Item.Description>
{#each ["tasks", "library"] as v (v)}
<Tabs.Content value={v} class="p-5 text-sm text-muted-foreground">