@invergent/agent-chat-react 1.5.5 → 1.5.6

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
@@ -6,6 +6,12 @@ import { Streamdown } from 'streamdown';
6
6
  type AgentChatRole = "user" | "assistant" | "system";
7
7
  type AgentChatMessageStatus = "complete" | "streaming" | "error";
8
8
  type AgentChatSystemKind = "skill_invoked" | "artifact" | "error";
9
+ interface AgentChatImageAttachment {
10
+ /** data: URL (data:image/png;base64,...) or raw base64 string */
11
+ data: string;
12
+ /** MIME type, e.g. "image/png", "image/jpeg" */
13
+ mimeType?: string;
14
+ }
9
15
  interface AgentChatMessage {
10
16
  id: string;
11
17
  role: AgentChatRole;
@@ -17,6 +23,7 @@ interface AgentChatMessage {
17
23
  systemKind?: AgentChatSystemKind;
18
24
  systemMeta?: Record<string, unknown>;
19
25
  errorInfo?: AgentChatErrorInfo;
26
+ images?: AgentChatImageAttachment[];
20
27
  }
21
28
  interface AgentChatToolCallInfo {
22
29
  id: string;
@@ -238,6 +245,7 @@ interface AgentChatAdapter {
238
245
  sendMessage(input: {
239
246
  sessionId: string;
240
247
  content: string;
248
+ images?: AgentChatImageAttachment[];
241
249
  }): Promise<{
242
250
  eventId?: number;
243
251
  status?: string;
@@ -317,7 +325,7 @@ interface AgentChatRuntimeApi {
317
325
  tokenUsage: AgentChatTokenUsage;
318
326
  retryIndicator: AgentChatRetryIndicator | null;
319
327
  workspaceRefreshKey: number;
320
- send(content: string): Promise<void>;
328
+ send(content: string, images?: AgentChatImageAttachment[]): Promise<void>;
321
329
  stop(): Promise<void>;
322
330
  retry(): Promise<void>;
323
331
  markSending(content: string): void;
@@ -398,4 +406,4 @@ interface SessionTreePanelProps {
398
406
  }
399
407
  declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
400
408
 
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 };
409
+ 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 AgentChatImageAttachment, 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
@@ -6,6 +6,12 @@ import { Streamdown } from 'streamdown';
6
6
  type AgentChatRole = "user" | "assistant" | "system";
7
7
  type AgentChatMessageStatus = "complete" | "streaming" | "error";
8
8
  type AgentChatSystemKind = "skill_invoked" | "artifact" | "error";
9
+ interface AgentChatImageAttachment {
10
+ /** data: URL (data:image/png;base64,...) or raw base64 string */
11
+ data: string;
12
+ /** MIME type, e.g. "image/png", "image/jpeg" */
13
+ mimeType?: string;
14
+ }
9
15
  interface AgentChatMessage {
10
16
  id: string;
11
17
  role: AgentChatRole;
@@ -17,6 +23,7 @@ interface AgentChatMessage {
17
23
  systemKind?: AgentChatSystemKind;
18
24
  systemMeta?: Record<string, unknown>;
19
25
  errorInfo?: AgentChatErrorInfo;
26
+ images?: AgentChatImageAttachment[];
20
27
  }
21
28
  interface AgentChatToolCallInfo {
22
29
  id: string;
@@ -238,6 +245,7 @@ interface AgentChatAdapter {
238
245
  sendMessage(input: {
239
246
  sessionId: string;
240
247
  content: string;
248
+ images?: AgentChatImageAttachment[];
241
249
  }): Promise<{
242
250
  eventId?: number;
243
251
  status?: string;
@@ -317,7 +325,7 @@ interface AgentChatRuntimeApi {
317
325
  tokenUsage: AgentChatTokenUsage;
318
326
  retryIndicator: AgentChatRetryIndicator | null;
319
327
  workspaceRefreshKey: number;
320
- send(content: string): Promise<void>;
328
+ send(content: string, images?: AgentChatImageAttachment[]): Promise<void>;
321
329
  stop(): Promise<void>;
322
330
  retry(): Promise<void>;
323
331
  markSending(content: string): void;
@@ -398,4 +406,4 @@ interface SessionTreePanelProps {
398
406
  }
399
407
  declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
400
408
 
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 };
409
+ 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 AgentChatImageAttachment, 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 };