@invergent/agent-chat-react 1.4.3 → 1.4.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/index.d.cts CHANGED
@@ -164,6 +164,30 @@ interface AgentChatSlashCommand {
164
164
  label: string;
165
165
  description: string;
166
166
  }
167
+ interface AgentChatWorkspaceEntry {
168
+ name: string;
169
+ path: string;
170
+ kind: "file" | "dir";
171
+ size?: number | null;
172
+ children?: AgentChatWorkspaceEntry[] | null;
173
+ }
174
+ interface AgentChatWorkspaceTree {
175
+ root: string;
176
+ entries: AgentChatWorkspaceEntry[];
177
+ truncated: boolean;
178
+ }
179
+ interface AgentChatWorkspaceFile {
180
+ path: string;
181
+ content: string;
182
+ size: number;
183
+ mime_type?: string | null;
184
+ encoding: "utf-8" | "base64";
185
+ truncated: boolean;
186
+ }
187
+ interface AgentChatWorkspaceUpload {
188
+ path: string;
189
+ size: number;
190
+ }
167
191
  type AgentChatExpertFeedbackRating = "up" | "down";
168
192
  interface AgentChatSseMessageEvent {
169
193
  data: string;
@@ -224,6 +248,22 @@ interface AgentChatAdapter {
224
248
  eventType?: string;
225
249
  }>;
226
250
  listSlashCommands?(): Promise<AgentChatSlashCommand[]>;
251
+ getWorkspaceTree(input: {
252
+ sessionId: string;
253
+ }): Promise<AgentChatWorkspaceTree>;
254
+ getWorkspaceFile(input: {
255
+ sessionId: string;
256
+ path: string;
257
+ }): Promise<AgentChatWorkspaceFile>;
258
+ uploadWorkspaceFile(input: {
259
+ sessionId: string;
260
+ file: File;
261
+ directory?: string;
262
+ }): Promise<AgentChatWorkspaceUpload>;
263
+ deleteWorkspaceFile(input: {
264
+ sessionId: string;
265
+ path: string;
266
+ }): Promise<void>;
227
267
  openEventStream(input: {
228
268
  sessionId: string;
229
269
  after: number;
@@ -256,6 +296,10 @@ type ClarifyChoice = AgentChatClarifyChoice;
256
296
  type ClarifyQuestion = AgentChatClarifyQuestion;
257
297
  type ClarifyArgs = AgentChatClarifyArgs;
258
298
  type ClarifyAnswer = AgentChatClarifyAnswer;
299
+ type WorkspaceEntry = AgentChatWorkspaceEntry;
300
+ type WorkspaceTree = AgentChatWorkspaceTree;
301
+ type WorkspaceFile = AgentChatWorkspaceFile;
302
+ type WorkspaceUpload = AgentChatWorkspaceUpload;
259
303
 
260
304
  interface AgentChatProps {
261
305
  adapter: AgentChatAdapter;
@@ -284,4 +328,4 @@ interface UseAgentChatRuntimeInput {
284
328
  }
285
329
  declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionChange, }: UseAgentChatRuntimeInput): AgentChatRuntimeApi;
286
330
 
287
- 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 AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, type RetryIndicator, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, useAgentChatAdapterContext, useAgentChatRuntime };
331
+ 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 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, type RetryIndicator, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
package/dist/index.d.ts CHANGED
@@ -164,6 +164,30 @@ interface AgentChatSlashCommand {
164
164
  label: string;
165
165
  description: string;
166
166
  }
167
+ interface AgentChatWorkspaceEntry {
168
+ name: string;
169
+ path: string;
170
+ kind: "file" | "dir";
171
+ size?: number | null;
172
+ children?: AgentChatWorkspaceEntry[] | null;
173
+ }
174
+ interface AgentChatWorkspaceTree {
175
+ root: string;
176
+ entries: AgentChatWorkspaceEntry[];
177
+ truncated: boolean;
178
+ }
179
+ interface AgentChatWorkspaceFile {
180
+ path: string;
181
+ content: string;
182
+ size: number;
183
+ mime_type?: string | null;
184
+ encoding: "utf-8" | "base64";
185
+ truncated: boolean;
186
+ }
187
+ interface AgentChatWorkspaceUpload {
188
+ path: string;
189
+ size: number;
190
+ }
167
191
  type AgentChatExpertFeedbackRating = "up" | "down";
168
192
  interface AgentChatSseMessageEvent {
169
193
  data: string;
@@ -224,6 +248,22 @@ interface AgentChatAdapter {
224
248
  eventType?: string;
225
249
  }>;
226
250
  listSlashCommands?(): Promise<AgentChatSlashCommand[]>;
251
+ getWorkspaceTree(input: {
252
+ sessionId: string;
253
+ }): Promise<AgentChatWorkspaceTree>;
254
+ getWorkspaceFile(input: {
255
+ sessionId: string;
256
+ path: string;
257
+ }): Promise<AgentChatWorkspaceFile>;
258
+ uploadWorkspaceFile(input: {
259
+ sessionId: string;
260
+ file: File;
261
+ directory?: string;
262
+ }): Promise<AgentChatWorkspaceUpload>;
263
+ deleteWorkspaceFile(input: {
264
+ sessionId: string;
265
+ path: string;
266
+ }): Promise<void>;
227
267
  openEventStream(input: {
228
268
  sessionId: string;
229
269
  after: number;
@@ -256,6 +296,10 @@ type ClarifyChoice = AgentChatClarifyChoice;
256
296
  type ClarifyQuestion = AgentChatClarifyQuestion;
257
297
  type ClarifyArgs = AgentChatClarifyArgs;
258
298
  type ClarifyAnswer = AgentChatClarifyAnswer;
299
+ type WorkspaceEntry = AgentChatWorkspaceEntry;
300
+ type WorkspaceTree = AgentChatWorkspaceTree;
301
+ type WorkspaceFile = AgentChatWorkspaceFile;
302
+ type WorkspaceUpload = AgentChatWorkspaceUpload;
259
303
 
260
304
  interface AgentChatProps {
261
305
  adapter: AgentChatAdapter;
@@ -284,4 +328,4 @@ interface UseAgentChatRuntimeInput {
284
328
  }
285
329
  declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionChange, }: UseAgentChatRuntimeInput): AgentChatRuntimeApi;
286
330
 
287
- 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 AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, type RetryIndicator, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, useAgentChatAdapterContext, useAgentChatRuntime };
331
+ 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 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, type RetryIndicator, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };