14 lines
850 B
TypeScript
14 lines
850 B
TypeScript
"use client";
|
|
// Compatibility wrapper for the paused video entry. Image chat observes the run
|
|
// once and renders its activity in the corresponding assistant message.
|
|
import { CanvasAgentProgressMessage } from "./canvas-agent-progress";
|
|
import { useCanvasAgentRun, type CanvasAgentRunOptions } from "./use-canvas-agent-run";
|
|
import { canvasAgentProgress } from "@/lib/ai/canvas-agent-runtime/progress";
|
|
export function CanvasAgentRunPanel(props: CanvasAgentRunOptions & { onResume: (runId: string) => void }) {
|
|
const task = useCanvasAgentRun(props);
|
|
if (!task.run) return null;
|
|
return <CanvasAgentProgressMessage progress={canvasAgentProgress(task.run)} run={task.run} busy={props.busy}
|
|
stopping={task.stopPending} sending={task.sending} onCancel={() => void task.control("cancel")}
|
|
onResume={() => props.onResume(task.run!.id)} />;
|
|
}
|