@invergent/agent-chat-react 1.5.3 → 1.5.5
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/artifact-chart-X53FKRDZ.js +153 -0
- package/dist/artifact-chart-X53FKRDZ.js.map +1 -0
- package/dist/chunk-QSC4UIVT.js +11 -0
- package/dist/chunk-QSC4UIVT.js.map +1 -0
- package/dist/index.cjs +520 -183
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +267 -126
- package/dist/index.js.map +1 -1
- package/package.json +3 -6
- package/dist/artifact-chart-7J6GOR4M.js +0 -88
- package/dist/artifact-chart-7J6GOR4M.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -106,12 +106,14 @@ interface AgentChatRuntimeEvent {
|
|
|
106
106
|
interface AgentChatState {
|
|
107
107
|
messages: AgentChatMessage[];
|
|
108
108
|
isRunning: boolean;
|
|
109
|
+
isLoadingHistory: boolean;
|
|
109
110
|
tokenUsage: AgentChatTokenUsage;
|
|
110
111
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
111
112
|
lastEventId: number;
|
|
112
113
|
sessionDone: boolean;
|
|
113
114
|
hadDeltas: boolean;
|
|
114
115
|
terminal: boolean;
|
|
116
|
+
workspaceRefreshKey: number;
|
|
115
117
|
}
|
|
116
118
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
117
119
|
interface AgentChatArtifactMeta {
|
|
@@ -132,7 +134,7 @@ interface AgentChatTableArtifactSpec {
|
|
|
132
134
|
caption?: string | null;
|
|
133
135
|
}
|
|
134
136
|
interface AgentChatChartArtifactSpec {
|
|
135
|
-
|
|
137
|
+
chart_js: Record<string, unknown>;
|
|
136
138
|
caption?: string | null;
|
|
137
139
|
}
|
|
138
140
|
interface AgentChatHtmlArtifactSpec {
|
|
@@ -311,8 +313,10 @@ interface AgentChatAdapter {
|
|
|
311
313
|
interface AgentChatRuntimeApi {
|
|
312
314
|
messages: AgentChatMessage[];
|
|
313
315
|
isRunning: boolean;
|
|
316
|
+
isLoadingHistory: boolean;
|
|
314
317
|
tokenUsage: AgentChatTokenUsage;
|
|
315
318
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
319
|
+
workspaceRefreshKey: number;
|
|
316
320
|
send(content: string): Promise<void>;
|
|
317
321
|
stop(): Promise<void>;
|
|
318
322
|
retry(): Promise<void>;
|
|
@@ -381,9 +385,17 @@ interface SessionTreePanelProps {
|
|
|
381
385
|
sessionListLimit?: number;
|
|
382
386
|
/** Treat the root as hidden, so its children appear as top-level rows. */
|
|
383
387
|
hideRoot?: boolean;
|
|
388
|
+
/** Suppress the header row (icon + title + running count badge). */
|
|
389
|
+
hideHeader?: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* Fetch the tenant's full session list via ``adapter.listSessions`` and
|
|
392
|
+
* merge it with the per-session tree. Off by default; the panel renders
|
|
393
|
+
* only the tree of ``sessionId`` unless this is set.
|
|
394
|
+
*/
|
|
395
|
+
loadList?: boolean;
|
|
384
396
|
onSessionSelect?: (sessionId: string) => void;
|
|
385
397
|
onSessionDelete?: (sessionId: string) => void;
|
|
386
398
|
}
|
|
387
|
-
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
399
|
+
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
388
400
|
|
|
389
401
|
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|
package/dist/index.d.ts
CHANGED
|
@@ -106,12 +106,14 @@ interface AgentChatRuntimeEvent {
|
|
|
106
106
|
interface AgentChatState {
|
|
107
107
|
messages: AgentChatMessage[];
|
|
108
108
|
isRunning: boolean;
|
|
109
|
+
isLoadingHistory: boolean;
|
|
109
110
|
tokenUsage: AgentChatTokenUsage;
|
|
110
111
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
111
112
|
lastEventId: number;
|
|
112
113
|
sessionDone: boolean;
|
|
113
114
|
hadDeltas: boolean;
|
|
114
115
|
terminal: boolean;
|
|
116
|
+
workspaceRefreshKey: number;
|
|
115
117
|
}
|
|
116
118
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
117
119
|
interface AgentChatArtifactMeta {
|
|
@@ -132,7 +134,7 @@ interface AgentChatTableArtifactSpec {
|
|
|
132
134
|
caption?: string | null;
|
|
133
135
|
}
|
|
134
136
|
interface AgentChatChartArtifactSpec {
|
|
135
|
-
|
|
137
|
+
chart_js: Record<string, unknown>;
|
|
136
138
|
caption?: string | null;
|
|
137
139
|
}
|
|
138
140
|
interface AgentChatHtmlArtifactSpec {
|
|
@@ -311,8 +313,10 @@ interface AgentChatAdapter {
|
|
|
311
313
|
interface AgentChatRuntimeApi {
|
|
312
314
|
messages: AgentChatMessage[];
|
|
313
315
|
isRunning: boolean;
|
|
316
|
+
isLoadingHistory: boolean;
|
|
314
317
|
tokenUsage: AgentChatTokenUsage;
|
|
315
318
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
319
|
+
workspaceRefreshKey: number;
|
|
316
320
|
send(content: string): Promise<void>;
|
|
317
321
|
stop(): Promise<void>;
|
|
318
322
|
retry(): Promise<void>;
|
|
@@ -381,9 +385,17 @@ interface SessionTreePanelProps {
|
|
|
381
385
|
sessionListLimit?: number;
|
|
382
386
|
/** Treat the root as hidden, so its children appear as top-level rows. */
|
|
383
387
|
hideRoot?: boolean;
|
|
388
|
+
/** Suppress the header row (icon + title + running count badge). */
|
|
389
|
+
hideHeader?: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* Fetch the tenant's full session list via ``adapter.listSessions`` and
|
|
392
|
+
* merge it with the per-session tree. Off by default; the panel renders
|
|
393
|
+
* only the tree of ``sessionId`` unless this is set.
|
|
394
|
+
*/
|
|
395
|
+
loadList?: boolean;
|
|
384
396
|
onSessionSelect?: (sessionId: string) => void;
|
|
385
397
|
onSessionDelete?: (sessionId: string) => void;
|
|
386
398
|
}
|
|
387
|
-
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
399
|
+
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
388
400
|
|
|
389
401
|
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|