Skip to content
35 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Merge main into Artifacts Phase 21import { ArrowUp } from "lucide-react";
2import { Suspense, lazy } from "react";
Chat and workspace agents: channels, DMs and named agents you talk to3
Merge main into Artifacts Phase 24import type { ComposerProps } from "./editor";
Chat and workspace agents: channels, DMs and named agents you talk to5
Merge main into Artifacts Phase 26// The editor (components/chat/editor.tsx) is loaded with the first composer,
7// so pages without one never fetch it.
8const ChatEditor = lazy(() => import("./editor"));
Chat and workspace agents: channels, DMs and named agents you talk to9
10/**
Merge main into Artifacts Phase 211 * Where a message is written: the formatting editor, with what it looks
12 * like for the moment it takes to load. See components/chat/editor.tsx.
Chat and workspace agents: channels, DMs and named agents you talk to13 */
Merge main into Artifacts Phase 214export function Composer(props: ComposerProps) {
15 return (
16 <Suspense fallback={<Loading placeholder={props.placeholder} compact={props.compact} />}>
17 <ChatEditor {...props} />
18 </Suspense>
19 );
20}
Chat and workspace agents: channels, DMs and named agents you talk to21
Merge main into Artifacts Phase 222/** The composer's frame, still, while the editor loads. */
23function Loading({ placeholder, compact }: { placeholder: string; compact?: boolean }) {
Chat and workspace agents: channels, DMs and named agents you talk to24 return (
Merge main into Artifacts Phase 225 <div aria-busy="true" className="rounded-xl border border-line-strong bg-surface">
26 <p className={`px-3.5 text-[0.9375rem] leading-6 text-faint ${compact ? "pt-2.5 pb-1" : "pt-3 pb-1.5"}`}>{placeholder}</p>
27 <div className="flex items-center gap-1 px-2 pb-2">
28 <span className="h-7" />
29 <span aria-hidden="true" className="ml-auto flex size-8 items-center justify-center rounded-lg bg-line text-faint">
30 <ArrowUp size={16} strokeWidth={2.4} />
31 </span>
Chat and workspace agents: channels, DMs and named agents you talk to32 </div>
33 </div>
34 );
35}

This file's history is long; its oldest lines are credited to the oldest commit read.