Files
nanobot/webui/src/components/thread/SubagentThread.tsx
T
chengyongru 30e43aec82 refactor(webui): separate presentation views and expand component gallery (#6179)
* refactor(webui): organize shared components with an internal gallery

* refactor(webui): decouple views and expand component gallery

* fix(docker): include channel sources in WebUI build

* refactor(webui): cover all channel interfaces in gallery

* docs(webui): remove manual paragraph wrapping
2026-10-14 00:11:00 +08:00

18 lines
796 B
TypeScript

import { SubagentThreadView } from "@/components/thread/SubagentThreadView";
import { useSubagentThread } from "@/components/thread/useSubagentThread";
import type { SubagentTaskSnapshot } from "@/lib/types";
interface SubagentThreadProps {
token: string;
sessionKey: string;
task: SubagentTaskSnapshot;
historyEnabled: boolean;
isStreaming: boolean;
}
export function SubagentThread({ token, sessionKey, task, historyEnabled, isStreaming }: SubagentThreadProps) {
const { messages, loading, failed, activeTurnId, retry } = useSubagentThread({ token, sessionKey, task, historyEnabled });
return <SubagentThreadView messages={messages} loading={loading} failed={failed} isStreaming={isStreaming}
activeTurnId={activeTurnId} runStartedAt={task.created_at} onRetry={retry} />;
}