import { useState } from "react"; import { ChatBubble, ThoughtChain, ThoughtChainItem } from "@godxjp/ui/data-display"; import { Text } from "@godxjp/ui/general"; import { AppShell, Flex, PageContainer, Sidebar, type SidebarSectionProp, Topbar, } from "@godxjp/ui/layout"; import { Bot, MessageSquare, Search, Settings, Users } from "lucide-react"; /** * ThoughtChain — the assistant's reasoning, step by step (Ant Design X `ThoughtChain`). * * Each card is one axis at rest: the chain as it appears above an answer, the four statuses, the * three connector strokes, and the standalone `ThoughtChainItem` chip in its three variants. * * The step that collapses is a real disclosure button, so this page is drivable from the keyboard * alone; Ant X's own step is a `
`. * * Composed only from real @godxjp/ui components. */ const sections: SidebarSectionProp[] = [ { label: "アシスタント", items: [ { id: "chat", label: "チャット", icon: MessageSquare }, { id: "agents", label: "エージェント", icon: Bot }, { id: "members", label: "メンバー", icon: Users }, ], }, { label: "管理", items: [{ id: "settings", label: "設定", icon: Settings }] }, ]; export default function ThoughtChainDoc() { const [open, setOpen] = useState(["search"]); return ( {}} product={{ name: "CoreDesk", role: "アシスタント", color: "hsl(var(--primary))" }} /> } topbar={} > {/* IN PLACE: above the answer it explains. */} in place · 回答の前 第4章 支払 — 請求書の支払期日は受領月の翌月末日とする。 ), }, { key: "write", title: "差分をまとめる", status: "loading", blink: true, }, ]} /> 差分は3件でした。金額、支払期日、宛名のうちどれから直しますか。 {/* THE FOUR STATUSES. */} status · loading · success · error · abort 状態は字にもなる。読み上げでは各手順のあとに「完了」「失敗」などが続く。 {/* THE CONNECTOR. */} line · solid · dashed · none {/* THE STANDALONE CHIP. */} ThoughtChainItem · solid · outlined · text 押せる手順は本物のボタンとして描かれる。押せないものは div のまま。要素が実体に従う。 } title="社内規程を検索" description="3件ヒット" status="success" /> } title="再検索" /> } title="詳細を見る" onClick={() => setOpen(["search"])} /> ); }