Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
refactor(web): adapt chat page for extracted shared hooks
Naiyuan Qingbece8f0545dd
diff --git a/apps/web/components/pages/chat-page.tsx b/apps/web/components/pages/chat-page.tsxindex 585286a809..db365885c6 100644--- a/apps/web/components/pages/chat-page.tsx+++ b/apps/web/components/pages/chat-page.tsx@@ -5,7 +5,7 @@ import { Loading } from "@multica/ui/components/ui/loading";import { ChatView } from "@multica/ui/components/chat-view";import { DevicePairing } from "@multica/ui/components/device-pairing";import { useGatewayConnection } from "@multica/hooks/use-gateway-connection";-import { useChat } from "@multica/hooks/use-chat";+import { useGatewayChat } from "@multica/hooks/use-gateway-chat";const ChatPage = () => {const { pageState, connectionState, identity, error, client, pairingKey, connect, disconnect } =@@ -45,7 +45,6 @@ const ChatPage = () => {);};-/** Thin wrapper that wires useChat hook to the shared ChatView */function ConnectedChat({client,hubId,@@ -57,8 +56,7 @@ function ConnectedChat({agentId: string;onDisconnect: () => void;}) {- const chat = useChat({ client, hubId, agentId });-+ const chat = useGatewayChat({ client, hubId, agentId });return <ChatView {...chat} onDisconnect={onDisconnect} />;}diff --git a/packages/ui/src/components/message-list.tsx b/packages/ui/src/components/message-list.tsxindex 1772f94626..aa8d321fa0 100644--- a/packages/ui/src/components/message-list.tsx+++ b/packages/ui/src/components/message-list.tsx@@ -55,7 +55,7 @@ export const MessageList = memo(function MessageList({ messages, streamingIds }:}, [messages])return (- <div className="relative p-6 max-w-4xl mx-auto">+ <div className="relative p-6 px-10 max-w-4xl mx-auto">{messages.map((msg) => {// ToolResult messages → render as tool execution itemif (msg.role === "toolResult") {