import { AgentThread, ChatToolUIs } from "@/components/chat"; import { useAmaSessionEvents } from "../hooks/useAmaSessionEvents"; import { usePersistedSessionEvents } from "../hooks/usePersistedSessionEvents"; import { AmaRuntimeProvider, RelayRuntimeProvider } from "./RelayRuntimeProvider"; interface ChatPanelProps { taskId: string; agentId: string | null; taskDone: boolean; /** The AMA session this task is bound to (new ak runner). Present ⇒ AMA path. */ amaSessionId?: string | null; /** The legacy daemon relay session (old, un-upgraded ak). Absent ama ⇒ tunnel. */ relaySessionId?: string | null; } // Two clients can drive one board at once: a new ak (AMA runner) whose task is // bound to an AMA session, and an old, un-upgraded ak whose legacy daemon relays // over the tunnel. The chat renders each on its own path so neither blanks the // other (see the design's Backward compatibility section). export function ChatPanel({ taskId, agentId, taskDone, amaSessionId, relaySessionId }: ChatPanelProps) { if (!agentId) { return (
No agent assigned. Chat is available when an agent is working on this task.
Chưa có lịch sử hội thoại. Agent chưa bắt đầu thực hiện task này.
Loading runtime history...
{unavailableMessage}
Đang tải lịch sử hoạt động...
Không có lịch sử hoạt động cho phiên làm việc này.