@invergent/agent-chat-react 1.5.4 → 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.cjs +667 -567
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +672 -572
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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;
|
|
@@ -113,6 +120,7 @@ interface AgentChatState {
|
|
|
113
120
|
sessionDone: boolean;
|
|
114
121
|
hadDeltas: boolean;
|
|
115
122
|
terminal: boolean;
|
|
123
|
+
workspaceRefreshKey: number;
|
|
116
124
|
}
|
|
117
125
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
118
126
|
interface AgentChatArtifactMeta {
|
|
@@ -237,6 +245,7 @@ interface AgentChatAdapter {
|
|
|
237
245
|
sendMessage(input: {
|
|
238
246
|
sessionId: string;
|
|
239
247
|
content: string;
|
|
248
|
+
images?: AgentChatImageAttachment[];
|
|
240
249
|
}): Promise<{
|
|
241
250
|
eventId?: number;
|
|
242
251
|
status?: string;
|
|
@@ -315,7 +324,8 @@ interface AgentChatRuntimeApi {
|
|
|
315
324
|
isLoadingHistory: boolean;
|
|
316
325
|
tokenUsage: AgentChatTokenUsage;
|
|
317
326
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
318
|
-
|
|
327
|
+
workspaceRefreshKey: number;
|
|
328
|
+
send(content: string, images?: AgentChatImageAttachment[]): Promise<void>;
|
|
319
329
|
stop(): Promise<void>;
|
|
320
330
|
retry(): Promise<void>;
|
|
321
331
|
markSending(content: string): void;
|
|
@@ -396,4 +406,4 @@ interface SessionTreePanelProps {
|
|
|
396
406
|
}
|
|
397
407
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
398
408
|
|
|
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 };
|
|
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;
|
|
@@ -113,6 +120,7 @@ interface AgentChatState {
|
|
|
113
120
|
sessionDone: boolean;
|
|
114
121
|
hadDeltas: boolean;
|
|
115
122
|
terminal: boolean;
|
|
123
|
+
workspaceRefreshKey: number;
|
|
116
124
|
}
|
|
117
125
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
118
126
|
interface AgentChatArtifactMeta {
|
|
@@ -237,6 +245,7 @@ interface AgentChatAdapter {
|
|
|
237
245
|
sendMessage(input: {
|
|
238
246
|
sessionId: string;
|
|
239
247
|
content: string;
|
|
248
|
+
images?: AgentChatImageAttachment[];
|
|
240
249
|
}): Promise<{
|
|
241
250
|
eventId?: number;
|
|
242
251
|
status?: string;
|
|
@@ -315,7 +324,8 @@ interface AgentChatRuntimeApi {
|
|
|
315
324
|
isLoadingHistory: boolean;
|
|
316
325
|
tokenUsage: AgentChatTokenUsage;
|
|
317
326
|
retryIndicator: AgentChatRetryIndicator | null;
|
|
318
|
-
|
|
327
|
+
workspaceRefreshKey: number;
|
|
328
|
+
send(content: string, images?: AgentChatImageAttachment[]): Promise<void>;
|
|
319
329
|
stop(): Promise<void>;
|
|
320
330
|
retry(): Promise<void>;
|
|
321
331
|
markSending(content: string): void;
|
|
@@ -396,4 +406,4 @@ interface SessionTreePanelProps {
|
|
|
396
406
|
}
|
|
397
407
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
398
408
|
|
|
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 };
|
|
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 };
|