diff --git a/apps/ui/src/builder/AgentBuilder.tsx b/apps/ui/src/builder/AgentBuilder.tsx index bd82ef7f6..cf64d2259 100644 --- a/apps/ui/src/builder/AgentBuilder.tsx +++ b/apps/ui/src/builder/AgentBuilder.tsx @@ -169,7 +169,7 @@ export function AgentBuilder() { {rightTab === 'checkpoint' && isCheckpointEligible ? (
Checkpoint Stream
- +
) : ( diff --git a/apps/ui/src/components/stream/CheckpointStreamPanel.tsx b/apps/ui/src/components/stream/CheckpointStreamPanel.tsx index 1181f596b..f42e26ecf 100644 --- a/apps/ui/src/components/stream/CheckpointStreamPanel.tsx +++ b/apps/ui/src/components/stream/CheckpointStreamPanel.tsx @@ -6,16 +6,18 @@ import { StatusChip } from './StatusChip'; interface Props { defaultThreadId?: string; + agentId?: string; url?: string; } -export function CheckpointStreamPanel({ defaultThreadId = '', url }: Props) { +export function CheckpointStreamPanel({ defaultThreadId = '', agentId, url }: Props) { const [threadId, setThreadId] = useState(defaultThreadId); const [autoScroll, setAutoScroll] = useState(true); const { items, status, error, connected, isPaused, pause, resume, clear, retry, dropped } = useCheckpointStream({ url, threadId: threadId || undefined, + agentId, }); const listRef = useRef(null); @@ -98,7 +100,7 @@ export function CheckpointStreamPanel({ defaultThreadId = '', url }: Props) { /> ))} -

Leave both inputs empty to stream all writes (capped live list).

+

Leave threadId empty to stream all writes (capped live list).

); } diff --git a/apps/ui/src/hooks/useCheckpointStream.ts b/apps/ui/src/hooks/useCheckpointStream.ts index 0003d6d4e..67237d167 100644 --- a/apps/ui/src/hooks/useCheckpointStream.ts +++ b/apps/ui/src/hooks/useCheckpointStream.ts @@ -16,6 +16,7 @@ export interface CheckpointWriteClient { export interface UseCheckpointStreamParams { url?: string; threadId?: string; + agentId?: string; maxItems?: number; autoStart?: boolean; } @@ -27,6 +28,7 @@ interface InitialPayload { items: any[] } // eslint-disable-line @typescript-esl export function useCheckpointStream({ url = 'http://localhost:3010', threadId, + agentId, maxItems = 500, autoStart = true, }: UseCheckpointStreamParams) { @@ -93,12 +95,13 @@ export function useCheckpointStream({ const initPayload: Record = {}; if (threadId) initPayload.threadId = threadId; + if (agentId) initPayload.agentId = agentId; socket.emit('init', initPayload); return () => { socket.disconnect(); }; - }, [url, threadId, isPaused, maxItems]); + }, [url, threadId, agentId, isPaused, maxItems]); useEffect(() => { if (!autoStart) return;