- Archive dormant apps (daemon, desktop, native, tui) and superseded packages/server into repos/ for reference - Archive 21 dead web components (chat page shell, work-os cluster, strays) into repos/web/; keep reused message-rendering primitives in components/chat - Merge @code/work-os into @code/primitives; work.ts absorbed via ./work subpath and barrel export; update all four importers - Add docs/futures.md tracking audio/video (blocked at Flue + provider), web layout cleanup, and message rendering quality - Repoint dev:zopu script to @code/agents (the live Flue server) - Note repos/ reference-code convention in AGENTS.md
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import {
|
|
Conversation,
|
|
ConversationContent,
|
|
ConversationScrollButton,
|
|
} from "@code/ui/components/ai-elements/conversation";
|
|
|
|
import { useChatAgent } from "@/hooks/chat/use-chat-agent";
|
|
|
|
import { ChatComposer } from "./chat-composer";
|
|
import { ChatConversation } from "./chat-conversation";
|
|
import { ChatHeader } from "./chat-header";
|
|
|
|
export const ChatPage = () => {
|
|
const agent = useChatAgent();
|
|
const handleSendMessage = (message: string) => agent.sendMessage(message);
|
|
|
|
return (
|
|
<section className="chat-surface flex h-full min-h-0 flex-col bg-[#fefefe]">
|
|
<ChatHeader status={agent.status} />
|
|
|
|
<main aria-label="Conversation" className="min-h-0 flex-1">
|
|
<Conversation className="ai-conversation-mobile h-full">
|
|
<ConversationContent className="min-h-full w-full gap-0 px-4 pt-4 pb-6">
|
|
<ChatConversation
|
|
historyReady={agent.historyReady}
|
|
messages={agent.messages}
|
|
onSuggestion={(suggestion) => void handleSendMessage(suggestion)}
|
|
status={agent.status}
|
|
/>
|
|
</ConversationContent>
|
|
<ConversationScrollButton
|
|
aria-label="Scroll to latest message"
|
|
className="bottom-3 size-9 rounded-full border border-[#dededb] bg-[#fefefe]/95 shadow-sm backdrop-blur"
|
|
/>
|
|
</Conversation>
|
|
</main>
|
|
|
|
<ChatComposer
|
|
error={agent.error}
|
|
onSend={handleSendMessage}
|
|
status={agent.status}
|
|
/>
|
|
</section>
|
|
);
|
|
};
|