@agents24/chat-react 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { RefObject, ReactNode, UIEvent } from 'react';
2
+ import { ReactNode, RefObject, UIEvent } from 'react';
3
3
 
4
4
  type ChatRunStatus = "queued" | "running" | "completed" | "cancelled" | "failed" | string;
5
5
  type ChatContextWindow = {
@@ -35,30 +35,89 @@ type ChatReasoningStep = {
35
35
  query?: string;
36
36
  sources?: Array<Record<string, unknown>>;
37
37
  };
38
- type ChatToolStatus = "running" | "done" | "error";
39
- type ChatToolActionKey = "search" | "navigate" | "resolve" | "read" | "context" | "links" | "work";
40
- type ChatTextBlock = {
38
+ type ChatToolState = "input-streaming" | "input-available" | "output-available" | "output-error" | "cancelled";
39
+ type ToolPresentation = {
40
+ title?: string | null;
41
+ activity?: string | null;
42
+ detail?: string | null;
43
+ category?: string | null;
44
+ groupKey?: string | null;
45
+ groupLabel?: string | null;
46
+ showOutput?: boolean;
47
+ outputView?: Record<string, unknown> | null;
48
+ [key: string]: unknown;
49
+ };
50
+ type ChatTextPart = {
41
51
  id: string;
52
+ type: "text";
42
53
  kind: "text";
43
- content: string;
54
+ text: string;
55
+ raw?: Record<string, unknown>;
44
56
  };
45
- type ChatToolBlock = {
57
+ type ChatToolPart = {
46
58
  id: string;
59
+ type: `tool-${string}`;
47
60
  kind: "tool";
48
- title: string;
49
- actionLabel: string;
50
- actionKey: ChatToolActionKey;
51
- status: ChatToolStatus;
52
- detail?: string;
61
+ toolName: string;
62
+ toolCallId?: string | null;
63
+ state: ChatToolState;
64
+ input?: unknown;
65
+ output?: unknown;
66
+ errorText?: string | null;
67
+ presentation?: ToolPresentation | null;
68
+ raw: Record<string, unknown>;
53
69
  };
54
- type ChatToolGroupBlock = {
70
+ type ChatReasoningPart = {
55
71
  id: string;
56
- kind: "tool_group";
57
- title: string;
58
- status: ChatToolStatus;
59
- tools: ChatToolBlock[];
72
+ type: "reasoning";
73
+ kind: "reasoning";
74
+ label?: string | null;
75
+ text?: string | null;
76
+ status?: string | null;
77
+ raw: Record<string, unknown>;
78
+ };
79
+ type ChatUiBlocksPart = {
80
+ id: string;
81
+ type: "ui-blocks";
82
+ kind: "ui-blocks";
83
+ state: ChatToolState;
84
+ toolCallId?: string | null;
85
+ contractVersion?: string | null;
86
+ bundle?: Record<string, unknown> | null;
87
+ errorText?: string | null;
88
+ raw: Record<string, unknown>;
89
+ };
90
+ type ChatApprovalPart = {
91
+ id: string;
92
+ type: "approval";
93
+ kind: "approval";
94
+ raw: Record<string, unknown>;
95
+ };
96
+ type ChatErrorPart = {
97
+ id: string;
98
+ type: "error";
99
+ kind: "error";
100
+ errorText: string;
101
+ raw: Record<string, unknown>;
102
+ };
103
+ type ChatDataPart = {
104
+ id: string;
105
+ type: "data";
106
+ kind: "data";
107
+ name: string;
108
+ data: Record<string, unknown>;
109
+ raw: Record<string, unknown>;
110
+ };
111
+ type ChatPart = ChatTextPart | ChatToolPart | ChatReasoningPart | ChatUiBlocksPart | ChatApprovalPart | ChatErrorPart | ChatDataPart;
112
+ type ToolRenderer = (props: {
113
+ part: ChatToolPart;
114
+ message: ChatMessage;
115
+ }) => ReactNode;
116
+ type Agents24ChatRenderOptions = {
117
+ renderPart?: (part: ChatPart, message: ChatMessage) => ReactNode;
118
+ toolRenderers?: Partial<Record<`tool-${string}`, ToolRenderer>>;
119
+ fallbackToolRenderer?: ToolRenderer;
60
120
  };
61
- type ChatMessageBlock = ChatTextBlock | ChatToolBlock | ChatToolGroupBlock;
62
121
  type ChatMessage = {
63
122
  id: string;
64
123
  role: "user" | "assistant";
@@ -66,7 +125,7 @@ type ChatMessage = {
66
125
  content: string;
67
126
  createdAt: Date;
68
127
  isFinal?: boolean;
69
- blocks?: ChatMessageBlock[];
128
+ parts: ChatPart[];
70
129
  attachments?: ChatAttachment[];
71
130
  citations?: ChatCitation[];
72
131
  reasoningSteps?: ChatReasoningStep[];
@@ -149,6 +208,7 @@ type ChatTransport = {
149
208
  threadId: string;
150
209
  limit?: number;
151
210
  beforeTurnIndex?: number | null;
211
+ includeRunEvents?: boolean;
152
212
  signal?: AbortSignal;
153
213
  }) => Promise<ChatThreadDetail>;
154
214
  streamMessage: (input: {
@@ -254,13 +314,15 @@ declare const titleFromMessage: (text: string, files?: Array<{
254
314
  filename?: string;
255
315
  }>) => string;
256
316
  declare const threadActivityDate: (thread: ChatThreadSummary) => string;
257
- declare const assistantTextFromBlocks: (blocks?: Array<Record<string, unknown>>) => string;
317
+ declare const assistantTextFromResponseBlocks: (blocks?: Array<Record<string, unknown>>) => string;
318
+ declare const assistantTextFromParts: (parts?: ChatPart[]) => string;
258
319
  declare const textFromFinalOutput: (value: unknown) => string;
259
- declare const renderBlocksFromResponseBlocks: (blocks?: Array<Record<string, unknown>>, fallbackText?: string) => ChatMessageBlock[];
320
+ declare const toolStateFromStatus: (status?: unknown) => ChatToolState;
321
+ declare const partsFromResponseBlocks: (blocks?: Array<Record<string, unknown>>, fallbackText?: string) => ChatPart[];
260
322
  declare const mergeReasoningSteps: (steps?: ChatReasoningStep[], options?: {
261
323
  finalize?: boolean;
262
324
  }) => ChatReasoningStep[];
263
- declare const reasoningStepsFromBlocks: (blocks?: Array<Record<string, unknown>>) => ChatReasoningStep[];
325
+ declare const reasoningStepsFromParts: (parts?: ChatPart[]) => ChatReasoningStep[];
264
326
  declare const threadDetailToMessages: (thread: ChatThreadDetail) => ChatMessage[];
265
327
  declare const threadPaging: (thread: ChatThreadDetail) => {
266
328
  hasOlderTurns: boolean;
@@ -274,6 +336,16 @@ declare const hasStaleUnfinishedAssistantCache: (thread?: (Partial<ChatThreadSum
274
336
  }) | null) => boolean;
275
337
  declare const activeRunIdFromThreadDetail: (thread?: ChatThreadDetail | null) => string | null;
276
338
 
339
+ declare const DefaultToolPart: ({ part }: {
340
+ part: ChatToolPart;
341
+ }) => react.JSX.Element;
342
+ declare const DefaultChatPart: ({ part, message, renderOptions, }: {
343
+ part: ChatPart;
344
+ message: ChatMessage;
345
+ renderOptions?: Agents24ChatRenderOptions;
346
+ }) => react.JSX.Element;
347
+ declare const renderChatPart: (part: ChatPart, message: ChatMessage, renderOptions?: Agents24ChatRenderOptions) => react.JSX.Element;
348
+
277
349
  declare const parseSseBlock: (block: string) => ChatRuntimeEvent | null;
278
350
  declare const consumeSseResponse: (response: Response, onEvent: (event: ChatRuntimeEvent) => void | Promise<void>) => Promise<ChatStreamResult>;
279
351
 
@@ -284,6 +356,7 @@ type FetchChatTransportRoutes = {
284
356
  threadId: string;
285
357
  limit?: number;
286
358
  beforeTurnIndex?: number | null;
359
+ includeRunEvents?: boolean;
287
360
  }) => string;
288
361
  streamMessage: () => string;
289
362
  attachRun: (input: {
@@ -312,6 +385,11 @@ declare const isScrollable: (element: Pick<HTMLDivElement, "scrollHeight" | "cli
312
385
  declare const isAtTimelineLatestEdge: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight" | "scrollTop">, isTopOrigin: boolean) => boolean;
313
386
  declare const shouldPrefetchOlder: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight" | "scrollTop">) => boolean;
314
387
  declare const getLatestScrollTop: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight">, isTopOrigin: boolean) => number;
388
+ declare const shouldUseTopOriginTimeline: ({ hasOlder, itemCount, topOriginMaxItems, }: {
389
+ hasOlder: boolean;
390
+ itemCount: number;
391
+ topOriginMaxItems?: number;
392
+ }) => boolean;
315
393
  type UseLatestThreadViewportOptions = {
316
394
  itemCount: number;
317
395
  hasOlder: boolean;
@@ -348,4 +426,4 @@ type LatestThreadViewportProps<T> = {
348
426
  };
349
427
  declare function LatestThreadViewport<T>({ items, hasOlder, isLoadingOlder, onLoadOlder, activeStreamKey, className, latestSpacer, trailingSpacer, renderItem, }: LatestThreadViewportProps<T>): react.JSX.Element;
350
428
 
351
- export { type ChatActiveRun, type ChatAttachment, type ChatCitation, type ChatContextWindow, type ChatController, type ChatMessage, type ChatMessageBlock, type ChatReasoningStep, type ChatRunStatus, type ChatRuntimeEvent, type ChatStorageAdapter, type ChatStreamResult, type ChatTextBlock, type ChatThreadDetail, type ChatThreadSummary, type ChatThreadTurn, type ChatToolActionKey, type ChatToolBlock, type ChatToolGroupBlock, type ChatToolStatus, type ChatTransport, DEFAULT_THREAD_PAGE_SIZE, type FetchChatTransportOptions, type FetchChatTransportRoutes, LatestThreadViewport, type LatestThreadViewportProps, type LatestThreadViewportRenderContext, type LatestThreadViewportState, type StoredChatThread, type UseAgents24ChatControllerOptions, type UseLatestThreadViewportOptions, activeRunIdFromThread, activeRunIdFromThreadDetail, assistantTextFromBlocks, consumeSseResponse, createChatId, createFetchChatTransport, getLatestScrollTop, hasStaleUnfinishedAssistantCache, hasUnfinishedAssistantMessage, isAtTimelineLatestEdge, isRunningThreadStatus, isScrollable, latestContextWindowFromThread, mergeReasoningSteps, parseSseBlock, reasoningStepsFromBlocks, renderBlocksFromResponseBlocks, shouldPrefetchOlder, textFromFinalOutput, threadActivityDate, threadDetailToMessages, threadPaging, titleFromMessage, useAgents24ChatController, useLatestThreadViewport };
429
+ export { type Agents24ChatRenderOptions, type ChatActiveRun, type ChatApprovalPart, type ChatAttachment, type ChatCitation, type ChatContextWindow, type ChatController, type ChatDataPart, type ChatErrorPart, type ChatMessage, type ChatPart, type ChatReasoningPart, type ChatReasoningStep, type ChatRunStatus, type ChatRuntimeEvent, type ChatStorageAdapter, type ChatStreamResult, type ChatTextPart, type ChatThreadDetail, type ChatThreadSummary, type ChatThreadTurn, type ChatToolPart, type ChatToolState, type ChatTransport, type ChatUiBlocksPart, DEFAULT_THREAD_PAGE_SIZE, DefaultChatPart, DefaultToolPart, type FetchChatTransportOptions, type FetchChatTransportRoutes, LatestThreadViewport, type LatestThreadViewportProps, type LatestThreadViewportRenderContext, type LatestThreadViewportState, type StoredChatThread, type ToolPresentation, type ToolRenderer, type UseAgents24ChatControllerOptions, type UseLatestThreadViewportOptions, activeRunIdFromThread, activeRunIdFromThreadDetail, assistantTextFromParts, assistantTextFromResponseBlocks, consumeSseResponse, createChatId, createFetchChatTransport, getLatestScrollTop, hasStaleUnfinishedAssistantCache, hasUnfinishedAssistantMessage, isAtTimelineLatestEdge, isRunningThreadStatus, isScrollable, latestContextWindowFromThread, mergeReasoningSteps, parseSseBlock, partsFromResponseBlocks, reasoningStepsFromParts, renderChatPart, shouldPrefetchOlder, shouldUseTopOriginTimeline, textFromFinalOutput, threadActivityDate, threadDetailToMessages, threadPaging, titleFromMessage, toolStateFromStatus, useAgents24ChatController, useLatestThreadViewport };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { RefObject, ReactNode, UIEvent } from 'react';
2
+ import { ReactNode, RefObject, UIEvent } from 'react';
3
3
 
4
4
  type ChatRunStatus = "queued" | "running" | "completed" | "cancelled" | "failed" | string;
5
5
  type ChatContextWindow = {
@@ -35,30 +35,89 @@ type ChatReasoningStep = {
35
35
  query?: string;
36
36
  sources?: Array<Record<string, unknown>>;
37
37
  };
38
- type ChatToolStatus = "running" | "done" | "error";
39
- type ChatToolActionKey = "search" | "navigate" | "resolve" | "read" | "context" | "links" | "work";
40
- type ChatTextBlock = {
38
+ type ChatToolState = "input-streaming" | "input-available" | "output-available" | "output-error" | "cancelled";
39
+ type ToolPresentation = {
40
+ title?: string | null;
41
+ activity?: string | null;
42
+ detail?: string | null;
43
+ category?: string | null;
44
+ groupKey?: string | null;
45
+ groupLabel?: string | null;
46
+ showOutput?: boolean;
47
+ outputView?: Record<string, unknown> | null;
48
+ [key: string]: unknown;
49
+ };
50
+ type ChatTextPart = {
41
51
  id: string;
52
+ type: "text";
42
53
  kind: "text";
43
- content: string;
54
+ text: string;
55
+ raw?: Record<string, unknown>;
44
56
  };
45
- type ChatToolBlock = {
57
+ type ChatToolPart = {
46
58
  id: string;
59
+ type: `tool-${string}`;
47
60
  kind: "tool";
48
- title: string;
49
- actionLabel: string;
50
- actionKey: ChatToolActionKey;
51
- status: ChatToolStatus;
52
- detail?: string;
61
+ toolName: string;
62
+ toolCallId?: string | null;
63
+ state: ChatToolState;
64
+ input?: unknown;
65
+ output?: unknown;
66
+ errorText?: string | null;
67
+ presentation?: ToolPresentation | null;
68
+ raw: Record<string, unknown>;
53
69
  };
54
- type ChatToolGroupBlock = {
70
+ type ChatReasoningPart = {
55
71
  id: string;
56
- kind: "tool_group";
57
- title: string;
58
- status: ChatToolStatus;
59
- tools: ChatToolBlock[];
72
+ type: "reasoning";
73
+ kind: "reasoning";
74
+ label?: string | null;
75
+ text?: string | null;
76
+ status?: string | null;
77
+ raw: Record<string, unknown>;
78
+ };
79
+ type ChatUiBlocksPart = {
80
+ id: string;
81
+ type: "ui-blocks";
82
+ kind: "ui-blocks";
83
+ state: ChatToolState;
84
+ toolCallId?: string | null;
85
+ contractVersion?: string | null;
86
+ bundle?: Record<string, unknown> | null;
87
+ errorText?: string | null;
88
+ raw: Record<string, unknown>;
89
+ };
90
+ type ChatApprovalPart = {
91
+ id: string;
92
+ type: "approval";
93
+ kind: "approval";
94
+ raw: Record<string, unknown>;
95
+ };
96
+ type ChatErrorPart = {
97
+ id: string;
98
+ type: "error";
99
+ kind: "error";
100
+ errorText: string;
101
+ raw: Record<string, unknown>;
102
+ };
103
+ type ChatDataPart = {
104
+ id: string;
105
+ type: "data";
106
+ kind: "data";
107
+ name: string;
108
+ data: Record<string, unknown>;
109
+ raw: Record<string, unknown>;
110
+ };
111
+ type ChatPart = ChatTextPart | ChatToolPart | ChatReasoningPart | ChatUiBlocksPart | ChatApprovalPart | ChatErrorPart | ChatDataPart;
112
+ type ToolRenderer = (props: {
113
+ part: ChatToolPart;
114
+ message: ChatMessage;
115
+ }) => ReactNode;
116
+ type Agents24ChatRenderOptions = {
117
+ renderPart?: (part: ChatPart, message: ChatMessage) => ReactNode;
118
+ toolRenderers?: Partial<Record<`tool-${string}`, ToolRenderer>>;
119
+ fallbackToolRenderer?: ToolRenderer;
60
120
  };
61
- type ChatMessageBlock = ChatTextBlock | ChatToolBlock | ChatToolGroupBlock;
62
121
  type ChatMessage = {
63
122
  id: string;
64
123
  role: "user" | "assistant";
@@ -66,7 +125,7 @@ type ChatMessage = {
66
125
  content: string;
67
126
  createdAt: Date;
68
127
  isFinal?: boolean;
69
- blocks?: ChatMessageBlock[];
128
+ parts: ChatPart[];
70
129
  attachments?: ChatAttachment[];
71
130
  citations?: ChatCitation[];
72
131
  reasoningSteps?: ChatReasoningStep[];
@@ -149,6 +208,7 @@ type ChatTransport = {
149
208
  threadId: string;
150
209
  limit?: number;
151
210
  beforeTurnIndex?: number | null;
211
+ includeRunEvents?: boolean;
152
212
  signal?: AbortSignal;
153
213
  }) => Promise<ChatThreadDetail>;
154
214
  streamMessage: (input: {
@@ -254,13 +314,15 @@ declare const titleFromMessage: (text: string, files?: Array<{
254
314
  filename?: string;
255
315
  }>) => string;
256
316
  declare const threadActivityDate: (thread: ChatThreadSummary) => string;
257
- declare const assistantTextFromBlocks: (blocks?: Array<Record<string, unknown>>) => string;
317
+ declare const assistantTextFromResponseBlocks: (blocks?: Array<Record<string, unknown>>) => string;
318
+ declare const assistantTextFromParts: (parts?: ChatPart[]) => string;
258
319
  declare const textFromFinalOutput: (value: unknown) => string;
259
- declare const renderBlocksFromResponseBlocks: (blocks?: Array<Record<string, unknown>>, fallbackText?: string) => ChatMessageBlock[];
320
+ declare const toolStateFromStatus: (status?: unknown) => ChatToolState;
321
+ declare const partsFromResponseBlocks: (blocks?: Array<Record<string, unknown>>, fallbackText?: string) => ChatPart[];
260
322
  declare const mergeReasoningSteps: (steps?: ChatReasoningStep[], options?: {
261
323
  finalize?: boolean;
262
324
  }) => ChatReasoningStep[];
263
- declare const reasoningStepsFromBlocks: (blocks?: Array<Record<string, unknown>>) => ChatReasoningStep[];
325
+ declare const reasoningStepsFromParts: (parts?: ChatPart[]) => ChatReasoningStep[];
264
326
  declare const threadDetailToMessages: (thread: ChatThreadDetail) => ChatMessage[];
265
327
  declare const threadPaging: (thread: ChatThreadDetail) => {
266
328
  hasOlderTurns: boolean;
@@ -274,6 +336,16 @@ declare const hasStaleUnfinishedAssistantCache: (thread?: (Partial<ChatThreadSum
274
336
  }) | null) => boolean;
275
337
  declare const activeRunIdFromThreadDetail: (thread?: ChatThreadDetail | null) => string | null;
276
338
 
339
+ declare const DefaultToolPart: ({ part }: {
340
+ part: ChatToolPart;
341
+ }) => react.JSX.Element;
342
+ declare const DefaultChatPart: ({ part, message, renderOptions, }: {
343
+ part: ChatPart;
344
+ message: ChatMessage;
345
+ renderOptions?: Agents24ChatRenderOptions;
346
+ }) => react.JSX.Element;
347
+ declare const renderChatPart: (part: ChatPart, message: ChatMessage, renderOptions?: Agents24ChatRenderOptions) => react.JSX.Element;
348
+
277
349
  declare const parseSseBlock: (block: string) => ChatRuntimeEvent | null;
278
350
  declare const consumeSseResponse: (response: Response, onEvent: (event: ChatRuntimeEvent) => void | Promise<void>) => Promise<ChatStreamResult>;
279
351
 
@@ -284,6 +356,7 @@ type FetchChatTransportRoutes = {
284
356
  threadId: string;
285
357
  limit?: number;
286
358
  beforeTurnIndex?: number | null;
359
+ includeRunEvents?: boolean;
287
360
  }) => string;
288
361
  streamMessage: () => string;
289
362
  attachRun: (input: {
@@ -312,6 +385,11 @@ declare const isScrollable: (element: Pick<HTMLDivElement, "scrollHeight" | "cli
312
385
  declare const isAtTimelineLatestEdge: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight" | "scrollTop">, isTopOrigin: boolean) => boolean;
313
386
  declare const shouldPrefetchOlder: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight" | "scrollTop">) => boolean;
314
387
  declare const getLatestScrollTop: (element: Pick<HTMLDivElement, "scrollHeight" | "clientHeight">, isTopOrigin: boolean) => number;
388
+ declare const shouldUseTopOriginTimeline: ({ hasOlder, itemCount, topOriginMaxItems, }: {
389
+ hasOlder: boolean;
390
+ itemCount: number;
391
+ topOriginMaxItems?: number;
392
+ }) => boolean;
315
393
  type UseLatestThreadViewportOptions = {
316
394
  itemCount: number;
317
395
  hasOlder: boolean;
@@ -348,4 +426,4 @@ type LatestThreadViewportProps<T> = {
348
426
  };
349
427
  declare function LatestThreadViewport<T>({ items, hasOlder, isLoadingOlder, onLoadOlder, activeStreamKey, className, latestSpacer, trailingSpacer, renderItem, }: LatestThreadViewportProps<T>): react.JSX.Element;
350
428
 
351
- export { type ChatActiveRun, type ChatAttachment, type ChatCitation, type ChatContextWindow, type ChatController, type ChatMessage, type ChatMessageBlock, type ChatReasoningStep, type ChatRunStatus, type ChatRuntimeEvent, type ChatStorageAdapter, type ChatStreamResult, type ChatTextBlock, type ChatThreadDetail, type ChatThreadSummary, type ChatThreadTurn, type ChatToolActionKey, type ChatToolBlock, type ChatToolGroupBlock, type ChatToolStatus, type ChatTransport, DEFAULT_THREAD_PAGE_SIZE, type FetchChatTransportOptions, type FetchChatTransportRoutes, LatestThreadViewport, type LatestThreadViewportProps, type LatestThreadViewportRenderContext, type LatestThreadViewportState, type StoredChatThread, type UseAgents24ChatControllerOptions, type UseLatestThreadViewportOptions, activeRunIdFromThread, activeRunIdFromThreadDetail, assistantTextFromBlocks, consumeSseResponse, createChatId, createFetchChatTransport, getLatestScrollTop, hasStaleUnfinishedAssistantCache, hasUnfinishedAssistantMessage, isAtTimelineLatestEdge, isRunningThreadStatus, isScrollable, latestContextWindowFromThread, mergeReasoningSteps, parseSseBlock, reasoningStepsFromBlocks, renderBlocksFromResponseBlocks, shouldPrefetchOlder, textFromFinalOutput, threadActivityDate, threadDetailToMessages, threadPaging, titleFromMessage, useAgents24ChatController, useLatestThreadViewport };
429
+ export { type Agents24ChatRenderOptions, type ChatActiveRun, type ChatApprovalPart, type ChatAttachment, type ChatCitation, type ChatContextWindow, type ChatController, type ChatDataPart, type ChatErrorPart, type ChatMessage, type ChatPart, type ChatReasoningPart, type ChatReasoningStep, type ChatRunStatus, type ChatRuntimeEvent, type ChatStorageAdapter, type ChatStreamResult, type ChatTextPart, type ChatThreadDetail, type ChatThreadSummary, type ChatThreadTurn, type ChatToolPart, type ChatToolState, type ChatTransport, type ChatUiBlocksPart, DEFAULT_THREAD_PAGE_SIZE, DefaultChatPart, DefaultToolPart, type FetchChatTransportOptions, type FetchChatTransportRoutes, LatestThreadViewport, type LatestThreadViewportProps, type LatestThreadViewportRenderContext, type LatestThreadViewportState, type StoredChatThread, type ToolPresentation, type ToolRenderer, type UseAgents24ChatControllerOptions, type UseLatestThreadViewportOptions, activeRunIdFromThread, activeRunIdFromThreadDetail, assistantTextFromParts, assistantTextFromResponseBlocks, consumeSseResponse, createChatId, createFetchChatTransport, getLatestScrollTop, hasStaleUnfinishedAssistantCache, hasUnfinishedAssistantMessage, isAtTimelineLatestEdge, isRunningThreadStatus, isScrollable, latestContextWindowFromThread, mergeReasoningSteps, parseSseBlock, partsFromResponseBlocks, reasoningStepsFromParts, renderChatPart, shouldPrefetchOlder, shouldUseTopOriginTimeline, textFromFinalOutput, threadActivityDate, threadDetailToMessages, threadPaging, titleFromMessage, toolStateFromStatus, useAgents24ChatController, useLatestThreadViewport };