2026-10-20 15:32:21 +08:00
|
|
|
import { ThreadHistoryStatus } from "@/components/thread/ThreadHistoryStatus";
|
2026-10-14 00:11:00 +08:00
|
|
|
import { ThreadMessages } from "@/components/thread/ThreadMessages";
|
|
|
|
|
import type { UIMessage } from "@/lib/types";
|
|
|
|
|
|
2026-10-20 15:32:21 +08:00
|
|
|
export function SubagentThreadView({ messages, loading, error, isStreaming, activeTurnId, runStartedAt, onRetry }: {
|
2026-10-14 00:11:00 +08:00
|
|
|
messages: UIMessage[];
|
|
|
|
|
loading: boolean;
|
2026-10-20 15:32:21 +08:00
|
|
|
error: string | null;
|
2026-10-14 00:11:00 +08:00
|
|
|
isStreaming: boolean;
|
|
|
|
|
activeTurnId?: string | null;
|
|
|
|
|
runStartedAt: number;
|
|
|
|
|
onRetry: () => void;
|
|
|
|
|
}) {
|
|
|
|
|
return <>
|
2026-10-20 15:32:21 +08:00
|
|
|
{loading || error ? <ThreadHistoryStatus className="relative" loading={loading} error={error} onRetry={onRetry} /> : null}
|
2026-10-14 00:11:00 +08:00
|
|
|
<ThreadMessages messages={messages} isStreaming={isStreaming} activeTurnId={activeTurnId} runStartedAt={runStartedAt} />
|
|
|
|
|
</>;
|
|
|
|
|
}
|