@invergent/agent-chat-react 1.5.2 → 1.5.4

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
@@ -106,6 +106,7 @@ 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;
@@ -132,7 +133,7 @@ interface AgentChatTableArtifactSpec {
132
133
  caption?: string | null;
133
134
  }
134
135
  interface AgentChatChartArtifactSpec {
135
- vega_lite: Record<string, unknown>;
136
+ chart_js: Record<string, unknown>;
136
137
  caption?: string | null;
137
138
  }
138
139
  interface AgentChatHtmlArtifactSpec {
@@ -292,6 +293,17 @@ interface AgentChatAdapter {
292
293
  sessionId: string;
293
294
  path: string;
294
295
  }): Promise<void>;
296
+ /**
297
+ * Build a same-origin URL the browser can navigate to (or anchor at via
298
+ * ``<a href download>``) to download the workspace file. The adapter
299
+ * is responsible for embedding any auth credential the server expects
300
+ * — typically as a query-string token, since cross-origin/anchor
301
+ * downloads can't carry custom headers.
302
+ */
303
+ getWorkspaceDownloadUrl(input: {
304
+ sessionId: string;
305
+ path: string;
306
+ }): string;
295
307
  openEventStream(input: {
296
308
  sessionId: string;
297
309
  after: number;
@@ -300,6 +312,7 @@ interface AgentChatAdapter {
300
312
  interface AgentChatRuntimeApi {
301
313
  messages: AgentChatMessage[];
302
314
  isRunning: boolean;
315
+ isLoadingHistory: boolean;
303
316
  tokenUsage: AgentChatTokenUsage;
304
317
  retryIndicator: AgentChatRetryIndicator | null;
305
318
  send(content: string): Promise<void>;
@@ -370,9 +383,17 @@ interface SessionTreePanelProps {
370
383
  sessionListLimit?: number;
371
384
  /** Treat the root as hidden, so its children appear as top-level rows. */
372
385
  hideRoot?: boolean;
386
+ /** Suppress the header row (icon + title + running count badge). */
387
+ hideHeader?: boolean;
388
+ /**
389
+ * Fetch the tenant's full session list via ``adapter.listSessions`` and
390
+ * merge it with the per-session tree. Off by default; the panel renders
391
+ * only the tree of ``sessionId`` unless this is set.
392
+ */
393
+ loadList?: boolean;
373
394
  onSessionSelect?: (sessionId: string) => void;
374
395
  onSessionDelete?: (sessionId: string) => void;
375
396
  }
376
- declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
397
+ declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
377
398
 
378
399
  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,6 +106,7 @@ 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;
@@ -132,7 +133,7 @@ interface AgentChatTableArtifactSpec {
132
133
  caption?: string | null;
133
134
  }
134
135
  interface AgentChatChartArtifactSpec {
135
- vega_lite: Record<string, unknown>;
136
+ chart_js: Record<string, unknown>;
136
137
  caption?: string | null;
137
138
  }
138
139
  interface AgentChatHtmlArtifactSpec {
@@ -292,6 +293,17 @@ interface AgentChatAdapter {
292
293
  sessionId: string;
293
294
  path: string;
294
295
  }): Promise<void>;
296
+ /**
297
+ * Build a same-origin URL the browser can navigate to (or anchor at via
298
+ * ``<a href download>``) to download the workspace file. The adapter
299
+ * is responsible for embedding any auth credential the server expects
300
+ * — typically as a query-string token, since cross-origin/anchor
301
+ * downloads can't carry custom headers.
302
+ */
303
+ getWorkspaceDownloadUrl(input: {
304
+ sessionId: string;
305
+ path: string;
306
+ }): string;
295
307
  openEventStream(input: {
296
308
  sessionId: string;
297
309
  after: number;
@@ -300,6 +312,7 @@ interface AgentChatAdapter {
300
312
  interface AgentChatRuntimeApi {
301
313
  messages: AgentChatMessage[];
302
314
  isRunning: boolean;
315
+ isLoadingHistory: boolean;
303
316
  tokenUsage: AgentChatTokenUsage;
304
317
  retryIndicator: AgentChatRetryIndicator | null;
305
318
  send(content: string): Promise<void>;
@@ -370,9 +383,17 @@ interface SessionTreePanelProps {
370
383
  sessionListLimit?: number;
371
384
  /** Treat the root as hidden, so its children appear as top-level rows. */
372
385
  hideRoot?: boolean;
386
+ /** Suppress the header row (icon + title + running count badge). */
387
+ hideHeader?: boolean;
388
+ /**
389
+ * Fetch the tenant's full session list via ``adapter.listSessions`` and
390
+ * merge it with the per-session tree. Off by default; the panel renders
391
+ * only the tree of ``sessionId`` unless this is set.
392
+ */
393
+ loadList?: boolean;
373
394
  onSessionSelect?: (sessionId: string) => void;
374
395
  onSessionDelete?: (sessionId: string) => void;
375
396
  }
376
- declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
397
+ declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
377
398
 
378
399
  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 };