@erdoai/ui 0.1.69 → 0.1.70
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.cjs +35 -11
- package/dist/index.d.cts +51 -54
- package/dist/index.d.ts +51 -54
- package/dist/index.js +35 -11
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { ErdoClient, ContentItem, InvokeResult, LogEntry, ToolGroup, InvocationStatus as InvocationStatus$1,
|
|
4
|
+
import { ErdoClient, ContentItem, InvokeResult, LogEntry, ToolGroup, InvocationStatus as InvocationStatus$1, AgentStreamState, SSEEvent, Thread } from '@erdoai/types';
|
|
5
5
|
export { ContentItem } from '@erdoai/types';
|
|
6
6
|
import * as RechartsPrimitive from 'recharts';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
@@ -131,9 +131,10 @@ interface ErdoProviderConfig {
|
|
|
131
131
|
*/
|
|
132
132
|
onSuggestionClick?: (suggestion: string) => void;
|
|
133
133
|
/**
|
|
134
|
-
* Enable the
|
|
135
|
-
* When true,
|
|
136
|
-
*
|
|
134
|
+
* Enable the agent event system (flat content model).
|
|
135
|
+
* When true, routes step_started/step_finished and message content events
|
|
136
|
+
* through handleAgentEvent into AgentStreamState.
|
|
137
|
+
* When false (default), uses legacy path-based event routing (bot service).
|
|
137
138
|
*/
|
|
138
139
|
useAgentEvents?: boolean;
|
|
139
140
|
}
|
|
@@ -842,6 +843,7 @@ interface ContentProps {
|
|
|
842
843
|
components?: Record<string, React__default.ComponentType<any>>;
|
|
843
844
|
}
|
|
844
845
|
declare function Content({ content, className, components }: ContentProps): react_jsx_runtime.JSX.Element | null;
|
|
846
|
+
declare function normalizeUIGenerationChunks(value: unknown): ContentChunk[] | null;
|
|
845
847
|
|
|
846
848
|
interface ErdoUIProps {
|
|
847
849
|
/** Result from an Erdo invocation */
|
|
@@ -1005,8 +1007,8 @@ interface ThinkingContentProps {
|
|
|
1005
1007
|
className?: string;
|
|
1006
1008
|
}
|
|
1007
1009
|
/**
|
|
1008
|
-
* Renders Claude's thinking/reasoning content
|
|
1009
|
-
*
|
|
1010
|
+
* Renders Claude's thinking/reasoning content as subtle inline text.
|
|
1011
|
+
* No container/chrome; supports redacted (encrypted) thinking blocks.
|
|
1010
1012
|
*/
|
|
1011
1013
|
declare function ThinkingContent({ item, className }: ThinkingContentProps): react_jsx_runtime.JSX.Element;
|
|
1012
1014
|
|
|
@@ -1085,7 +1087,7 @@ interface CollapsibleCodeBlockProps {
|
|
|
1085
1087
|
/**
|
|
1086
1088
|
* A collapsible code block with syntax highlighting.
|
|
1087
1089
|
*/
|
|
1088
|
-
declare
|
|
1090
|
+
declare const CollapsibleCodeBlock: React$1.NamedExoticComponent<CollapsibleCodeBlockProps>;
|
|
1089
1091
|
|
|
1090
1092
|
interface SqlContentProps {
|
|
1091
1093
|
item: ContentItem;
|
|
@@ -1102,8 +1104,7 @@ interface CodegenContentProps {
|
|
|
1102
1104
|
}
|
|
1103
1105
|
/**
|
|
1104
1106
|
* Renders code generation content with step-by-step explanation, code, and warnings.
|
|
1105
|
-
*
|
|
1106
|
-
* Expects parsedJson to be populated upstream (via normalizeContent or SSE handler).
|
|
1107
|
+
* Prefers canonical `content` (parsed object); falls back to legacy `parsedJson` (DB string path).
|
|
1107
1108
|
*/
|
|
1108
1109
|
declare function CodegenContent({ item, className }: CodegenContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1109
1110
|
|
|
@@ -1113,6 +1114,7 @@ interface CodeexecContentProps {
|
|
|
1113
1114
|
}
|
|
1114
1115
|
/**
|
|
1115
1116
|
* Renders code execution output (stdout, stderr, warnings).
|
|
1117
|
+
* Prefers canonical `content`; falls back to legacy `parsedJson`.
|
|
1116
1118
|
*/
|
|
1117
1119
|
declare function CodeexecContent({ item, className }: CodeexecContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1118
1120
|
|
|
@@ -1282,8 +1284,8 @@ interface MemoryContentProps {
|
|
|
1282
1284
|
declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
|
|
1283
1285
|
|
|
1284
1286
|
interface StepTreeContentProps {
|
|
1285
|
-
/** The
|
|
1286
|
-
|
|
1287
|
+
/** The agent stream state containing all steps and content */
|
|
1288
|
+
agentState: AgentStreamState;
|
|
1287
1289
|
/** Optional Content component for rendering ui_generation/codegen */
|
|
1288
1290
|
ContentComponent?: React__default.ComponentType<{
|
|
1289
1291
|
content: ContentItem;
|
|
@@ -1296,7 +1298,7 @@ interface StepTreeContentProps {
|
|
|
1296
1298
|
*
|
|
1297
1299
|
* Used for both streaming and reload paths to ensure consistent rendering.
|
|
1298
1300
|
*/
|
|
1299
|
-
declare function StepTreeContent({
|
|
1301
|
+
declare function StepTreeContent({ agentState, ContentComponent, className }: StepTreeContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1300
1302
|
|
|
1301
1303
|
/** Node structure from UI generation content */
|
|
1302
1304
|
interface UINode {
|
|
@@ -1513,8 +1515,8 @@ interface UseThreadReturn {
|
|
|
1513
1515
|
error: Error | null;
|
|
1514
1516
|
/** Active messages being streamed (with parsedJson populated) */
|
|
1515
1517
|
activeMessages: MessageWithContents[];
|
|
1516
|
-
/**
|
|
1517
|
-
|
|
1518
|
+
/** Agent stream state (flat content model) */
|
|
1519
|
+
agentState: AgentStreamState;
|
|
1518
1520
|
/**
|
|
1519
1521
|
* Flattened, filtered contents ready for rendering with the Content component.
|
|
1520
1522
|
* Only includes visible content (user_visibility === 'visible').
|
|
@@ -1811,54 +1813,49 @@ declare function handleSSEEvent(eventType: string, event: SSEEventData, path: st
|
|
|
1811
1813
|
declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent | OutputContent, content: string): MessageContent | OutputContent;
|
|
1812
1814
|
|
|
1813
1815
|
/**
|
|
1814
|
-
* Agent Event Handler
|
|
1816
|
+
* Agent Event Handler (flat content model)
|
|
1815
1817
|
*
|
|
1816
|
-
*
|
|
1817
|
-
*
|
|
1818
|
-
*
|
|
1818
|
+
* Replaces the nested step content model (handle-step-events.ts) with a flat model:
|
|
1819
|
+
* - Steps are structural nodes (no content on them)
|
|
1820
|
+
* - Content is always message content with optional stepId for location
|
|
1821
|
+
* - No step_content event type
|
|
1822
|
+
* - One tree, one rendering pass
|
|
1819
1823
|
*/
|
|
1820
1824
|
|
|
1825
|
+
/** Create initial empty agent state. */
|
|
1826
|
+
declare function createInitialAgentState(): AgentStreamState;
|
|
1821
1827
|
/**
|
|
1822
|
-
*
|
|
1823
|
-
|
|
1824
|
-
declare function isStepEvent(event: SSEEvent): boolean;
|
|
1825
|
-
/**
|
|
1826
|
-
* Creates initial state for step-based streaming.
|
|
1828
|
+
* Handle an agent SSE event and return updated state.
|
|
1829
|
+
* Pure function — does not mutate input state.
|
|
1827
1830
|
*/
|
|
1828
|
-
declare function
|
|
1831
|
+
declare function handleAgentEvent(state: AgentStreamState, event: SSEEvent): AgentStreamState;
|
|
1832
|
+
declare function completeStreamingContent(state: AgentStreamState): AgentStreamState;
|
|
1829
1833
|
/**
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1834
|
+
* Returns true when the agent state contains assistant content that will
|
|
1835
|
+
* visibly render (actual text/JSON from the assistant, not structural steps).
|
|
1836
|
+
*
|
|
1837
|
+
* Specifically checks for content nodes with:
|
|
1838
|
+
* - Non-empty text (from message content delta)
|
|
1839
|
+
* - Parsed JSON chunks (incremental JSON streaming)
|
|
1840
|
+
* - A final result (from message content result)
|
|
1841
|
+
*
|
|
1842
|
+
* Excludes tool_invocation / tool_result / agent_invocation content types
|
|
1843
|
+
* which are structural, not user-visible assistant output.
|
|
1844
|
+
*
|
|
1845
|
+
* Does NOT count step tree rows (tool_call, agent steps) — those are structural
|
|
1846
|
+
* indicators, not assistant content. This ensures typing stays visible until the
|
|
1847
|
+
* first actual text/chart/output token arrives.
|
|
1848
|
+
*
|
|
1849
|
+
* Use this to gate typing indicators: keep typing visible until this returns true.
|
|
1832
1850
|
*/
|
|
1833
|
-
declare function
|
|
1851
|
+
declare function hasRenderableAssistantOutput(state: AgentStreamState): boolean;
|
|
1834
1852
|
/**
|
|
1835
|
-
*
|
|
1853
|
+
* Convert AgentStreamState into ContentItem[] for rendering.
|
|
1836
1854
|
*
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1839
|
-
*
|
|
1840
|
-
* - Sub-agent tool_calls → tool_invocation while running, tool_result when done
|
|
1841
|
-
* (sub-agent internals are NOT shown — AgentProgress handles progress labels)
|
|
1855
|
+
* Single forward pass over state.nodes in event-arrival order. Renders
|
|
1856
|
+
* assistant content (text, JSON) while skipping tool artifacts (rendered
|
|
1857
|
+
* exclusively by StepTreeContent's buildStepTree).
|
|
1842
1858
|
*/
|
|
1843
|
-
declare function
|
|
1844
|
-
|
|
1845
|
-
interface AgentMessageBridgeState {
|
|
1846
|
-
assistantMessageID: string | null;
|
|
1847
|
-
}
|
|
1848
|
-
declare function createInitialAgentMessageBridgeState(): AgentMessageBridgeState;
|
|
1849
|
-
declare function applyStreamingEventToMessageState(params: {
|
|
1850
|
-
useAgentEvents: boolean;
|
|
1851
|
-
eventType: string;
|
|
1852
|
-
eventData: SSEEventData;
|
|
1853
|
-
path: string[];
|
|
1854
|
-
threadID: string;
|
|
1855
|
-
bridgeState: AgentMessageBridgeState;
|
|
1856
|
-
stepState: StepStreamState;
|
|
1857
|
-
activeMessagesByID: Record<string, MessageWithContents>;
|
|
1858
|
-
}): {
|
|
1859
|
-
bridgeState: AgentMessageBridgeState;
|
|
1860
|
-
stepState: StepStreamState;
|
|
1861
|
-
stateModified: boolean;
|
|
1862
|
-
};
|
|
1859
|
+
declare function agentStateToContents(state: AgentStreamState): ContentItem[];
|
|
1863
1860
|
|
|
1864
|
-
export {
|
|
1861
|
+
export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createInitialAgentState, extractContentItems, formatValue, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { ErdoClient, ContentItem, InvokeResult, LogEntry, ToolGroup, InvocationStatus as InvocationStatus$1,
|
|
4
|
+
import { ErdoClient, ContentItem, InvokeResult, LogEntry, ToolGroup, InvocationStatus as InvocationStatus$1, AgentStreamState, SSEEvent, Thread } from '@erdoai/types';
|
|
5
5
|
export { ContentItem } from '@erdoai/types';
|
|
6
6
|
import * as RechartsPrimitive from 'recharts';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
@@ -131,9 +131,10 @@ interface ErdoProviderConfig {
|
|
|
131
131
|
*/
|
|
132
132
|
onSuggestionClick?: (suggestion: string) => void;
|
|
133
133
|
/**
|
|
134
|
-
* Enable the
|
|
135
|
-
* When true,
|
|
136
|
-
*
|
|
134
|
+
* Enable the agent event system (flat content model).
|
|
135
|
+
* When true, routes step_started/step_finished and message content events
|
|
136
|
+
* through handleAgentEvent into AgentStreamState.
|
|
137
|
+
* When false (default), uses legacy path-based event routing (bot service).
|
|
137
138
|
*/
|
|
138
139
|
useAgentEvents?: boolean;
|
|
139
140
|
}
|
|
@@ -842,6 +843,7 @@ interface ContentProps {
|
|
|
842
843
|
components?: Record<string, React__default.ComponentType<any>>;
|
|
843
844
|
}
|
|
844
845
|
declare function Content({ content, className, components }: ContentProps): react_jsx_runtime.JSX.Element | null;
|
|
846
|
+
declare function normalizeUIGenerationChunks(value: unknown): ContentChunk[] | null;
|
|
845
847
|
|
|
846
848
|
interface ErdoUIProps {
|
|
847
849
|
/** Result from an Erdo invocation */
|
|
@@ -1005,8 +1007,8 @@ interface ThinkingContentProps {
|
|
|
1005
1007
|
className?: string;
|
|
1006
1008
|
}
|
|
1007
1009
|
/**
|
|
1008
|
-
* Renders Claude's thinking/reasoning content
|
|
1009
|
-
*
|
|
1010
|
+
* Renders Claude's thinking/reasoning content as subtle inline text.
|
|
1011
|
+
* No container/chrome; supports redacted (encrypted) thinking blocks.
|
|
1010
1012
|
*/
|
|
1011
1013
|
declare function ThinkingContent({ item, className }: ThinkingContentProps): react_jsx_runtime.JSX.Element;
|
|
1012
1014
|
|
|
@@ -1085,7 +1087,7 @@ interface CollapsibleCodeBlockProps {
|
|
|
1085
1087
|
/**
|
|
1086
1088
|
* A collapsible code block with syntax highlighting.
|
|
1087
1089
|
*/
|
|
1088
|
-
declare
|
|
1090
|
+
declare const CollapsibleCodeBlock: React$1.NamedExoticComponent<CollapsibleCodeBlockProps>;
|
|
1089
1091
|
|
|
1090
1092
|
interface SqlContentProps {
|
|
1091
1093
|
item: ContentItem;
|
|
@@ -1102,8 +1104,7 @@ interface CodegenContentProps {
|
|
|
1102
1104
|
}
|
|
1103
1105
|
/**
|
|
1104
1106
|
* Renders code generation content with step-by-step explanation, code, and warnings.
|
|
1105
|
-
*
|
|
1106
|
-
* Expects parsedJson to be populated upstream (via normalizeContent or SSE handler).
|
|
1107
|
+
* Prefers canonical `content` (parsed object); falls back to legacy `parsedJson` (DB string path).
|
|
1107
1108
|
*/
|
|
1108
1109
|
declare function CodegenContent({ item, className }: CodegenContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1109
1110
|
|
|
@@ -1113,6 +1114,7 @@ interface CodeexecContentProps {
|
|
|
1113
1114
|
}
|
|
1114
1115
|
/**
|
|
1115
1116
|
* Renders code execution output (stdout, stderr, warnings).
|
|
1117
|
+
* Prefers canonical `content`; falls back to legacy `parsedJson`.
|
|
1116
1118
|
*/
|
|
1117
1119
|
declare function CodeexecContent({ item, className }: CodeexecContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1118
1120
|
|
|
@@ -1282,8 +1284,8 @@ interface MemoryContentProps {
|
|
|
1282
1284
|
declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
|
|
1283
1285
|
|
|
1284
1286
|
interface StepTreeContentProps {
|
|
1285
|
-
/** The
|
|
1286
|
-
|
|
1287
|
+
/** The agent stream state containing all steps and content */
|
|
1288
|
+
agentState: AgentStreamState;
|
|
1287
1289
|
/** Optional Content component for rendering ui_generation/codegen */
|
|
1288
1290
|
ContentComponent?: React__default.ComponentType<{
|
|
1289
1291
|
content: ContentItem;
|
|
@@ -1296,7 +1298,7 @@ interface StepTreeContentProps {
|
|
|
1296
1298
|
*
|
|
1297
1299
|
* Used for both streaming and reload paths to ensure consistent rendering.
|
|
1298
1300
|
*/
|
|
1299
|
-
declare function StepTreeContent({
|
|
1301
|
+
declare function StepTreeContent({ agentState, ContentComponent, className }: StepTreeContentProps): react_jsx_runtime.JSX.Element | null;
|
|
1300
1302
|
|
|
1301
1303
|
/** Node structure from UI generation content */
|
|
1302
1304
|
interface UINode {
|
|
@@ -1513,8 +1515,8 @@ interface UseThreadReturn {
|
|
|
1513
1515
|
error: Error | null;
|
|
1514
1516
|
/** Active messages being streamed (with parsedJson populated) */
|
|
1515
1517
|
activeMessages: MessageWithContents[];
|
|
1516
|
-
/**
|
|
1517
|
-
|
|
1518
|
+
/** Agent stream state (flat content model) */
|
|
1519
|
+
agentState: AgentStreamState;
|
|
1518
1520
|
/**
|
|
1519
1521
|
* Flattened, filtered contents ready for rendering with the Content component.
|
|
1520
1522
|
* Only includes visible content (user_visibility === 'visible').
|
|
@@ -1811,54 +1813,49 @@ declare function handleSSEEvent(eventType: string, event: SSEEventData, path: st
|
|
|
1811
1813
|
declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent | OutputContent, content: string): MessageContent | OutputContent;
|
|
1812
1814
|
|
|
1813
1815
|
/**
|
|
1814
|
-
* Agent Event Handler
|
|
1816
|
+
* Agent Event Handler (flat content model)
|
|
1815
1817
|
*
|
|
1816
|
-
*
|
|
1817
|
-
*
|
|
1818
|
-
*
|
|
1818
|
+
* Replaces the nested step content model (handle-step-events.ts) with a flat model:
|
|
1819
|
+
* - Steps are structural nodes (no content on them)
|
|
1820
|
+
* - Content is always message content with optional stepId for location
|
|
1821
|
+
* - No step_content event type
|
|
1822
|
+
* - One tree, one rendering pass
|
|
1819
1823
|
*/
|
|
1820
1824
|
|
|
1825
|
+
/** Create initial empty agent state. */
|
|
1826
|
+
declare function createInitialAgentState(): AgentStreamState;
|
|
1821
1827
|
/**
|
|
1822
|
-
*
|
|
1823
|
-
|
|
1824
|
-
declare function isStepEvent(event: SSEEvent): boolean;
|
|
1825
|
-
/**
|
|
1826
|
-
* Creates initial state for step-based streaming.
|
|
1828
|
+
* Handle an agent SSE event and return updated state.
|
|
1829
|
+
* Pure function — does not mutate input state.
|
|
1827
1830
|
*/
|
|
1828
|
-
declare function
|
|
1831
|
+
declare function handleAgentEvent(state: AgentStreamState, event: SSEEvent): AgentStreamState;
|
|
1832
|
+
declare function completeStreamingContent(state: AgentStreamState): AgentStreamState;
|
|
1829
1833
|
/**
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1834
|
+
* Returns true when the agent state contains assistant content that will
|
|
1835
|
+
* visibly render (actual text/JSON from the assistant, not structural steps).
|
|
1836
|
+
*
|
|
1837
|
+
* Specifically checks for content nodes with:
|
|
1838
|
+
* - Non-empty text (from message content delta)
|
|
1839
|
+
* - Parsed JSON chunks (incremental JSON streaming)
|
|
1840
|
+
* - A final result (from message content result)
|
|
1841
|
+
*
|
|
1842
|
+
* Excludes tool_invocation / tool_result / agent_invocation content types
|
|
1843
|
+
* which are structural, not user-visible assistant output.
|
|
1844
|
+
*
|
|
1845
|
+
* Does NOT count step tree rows (tool_call, agent steps) — those are structural
|
|
1846
|
+
* indicators, not assistant content. This ensures typing stays visible until the
|
|
1847
|
+
* first actual text/chart/output token arrives.
|
|
1848
|
+
*
|
|
1849
|
+
* Use this to gate typing indicators: keep typing visible until this returns true.
|
|
1832
1850
|
*/
|
|
1833
|
-
declare function
|
|
1851
|
+
declare function hasRenderableAssistantOutput(state: AgentStreamState): boolean;
|
|
1834
1852
|
/**
|
|
1835
|
-
*
|
|
1853
|
+
* Convert AgentStreamState into ContentItem[] for rendering.
|
|
1836
1854
|
*
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1839
|
-
*
|
|
1840
|
-
* - Sub-agent tool_calls → tool_invocation while running, tool_result when done
|
|
1841
|
-
* (sub-agent internals are NOT shown — AgentProgress handles progress labels)
|
|
1855
|
+
* Single forward pass over state.nodes in event-arrival order. Renders
|
|
1856
|
+
* assistant content (text, JSON) while skipping tool artifacts (rendered
|
|
1857
|
+
* exclusively by StepTreeContent's buildStepTree).
|
|
1842
1858
|
*/
|
|
1843
|
-
declare function
|
|
1844
|
-
|
|
1845
|
-
interface AgentMessageBridgeState {
|
|
1846
|
-
assistantMessageID: string | null;
|
|
1847
|
-
}
|
|
1848
|
-
declare function createInitialAgentMessageBridgeState(): AgentMessageBridgeState;
|
|
1849
|
-
declare function applyStreamingEventToMessageState(params: {
|
|
1850
|
-
useAgentEvents: boolean;
|
|
1851
|
-
eventType: string;
|
|
1852
|
-
eventData: SSEEventData;
|
|
1853
|
-
path: string[];
|
|
1854
|
-
threadID: string;
|
|
1855
|
-
bridgeState: AgentMessageBridgeState;
|
|
1856
|
-
stepState: StepStreamState;
|
|
1857
|
-
activeMessagesByID: Record<string, MessageWithContents>;
|
|
1858
|
-
}): {
|
|
1859
|
-
bridgeState: AgentMessageBridgeState;
|
|
1860
|
-
stepState: StepStreamState;
|
|
1861
|
-
stateModified: boolean;
|
|
1862
|
-
};
|
|
1859
|
+
declare function agentStateToContents(state: AgentStreamState): ContentItem[];
|
|
1863
1860
|
|
|
1864
|
-
export {
|
|
1861
|
+
export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createInitialAgentState, extractContentItems, formatValue, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|