@altimateai/ui-components 0.0.67 → 0.0.68-beta.1

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.
@@ -1,6 +1,6 @@
1
1
  import React__default, { FC, ReactNode } from 'react';
2
- import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, F as Feedback, r as LoadingState, s as ChatSession, i as Citation, t as TodoItem, M as MessageAttachment, D as DetectedEntity, E as EntityType, u as AgentStreamResponse, S as SessionStatusEnum } from '../types-N2nctlGV.js';
3
- export { v as AssistantMeta, x as ChatbotUrls, y as Datamate, z as EntityDetectionRequest, B as EntityDetectionResponse, w as FileUploadProps, R as FinalResponseData, J as InteractionChoice, H as InteractionType, G as Mode, Q as ProgressUpdate, O as ToolUsageData, U as UploadedFile, V as agentStreamResponseSchema, K as sessionStatusSchema, N as todoItemSchema } from '../types-N2nctlGV.js';
2
+ import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, F as Feedback, r as LoadingState, s as ChatSession, i as Citation, t as TodoItem, M as MessageAttachment, D as DetectedEntity, E as EntityType, u as AgentStreamResponse, S as SessionStatusEnum } from '../types-CPs2m921.js';
3
+ export { x as AssistantMeta, w as ChatEvent, v as ChatEventStatus, z as ChatbotUrls, B as Datamate, G as EntityDetectionRequest, H as EntityDetectionResponse, y as FileUploadProps, W as FinalResponseData, N as InteractionChoice, K as InteractionType, J as Mode, V as ProgressUpdate, R as ToolUsageData, U as UploadedFile, X as agentStreamResponseSchema, O as sessionStatusSchema, Q as todoItemSchema } from '../types-CPs2m921.js';
4
4
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
5
5
  import { UnknownAction } from '@reduxjs/toolkit';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -14,6 +14,7 @@ interface ChatContextType extends ChatState {
14
14
  interface ChatProviderRef {
15
15
  resetSession: () => void;
16
16
  setUserInput: (text: string) => void;
17
+ resetStatus: () => void;
17
18
  }
18
19
  declare const useChatContext: () => ChatContextType;
19
20
  declare const ChatProvider: React__default.ForwardRefExoticComponent<ChatbotProviderProps & React__default.RefAttributes<ChatProviderRef>>;
@@ -189,7 +190,7 @@ declare const clearActions: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/c
189
190
  declare const setTodos: _reduxjs_toolkit.ActionCreatorWithPayload<{
190
191
  id: string;
191
192
  content: string;
192
- status: "completed" | "pending" | "in_progress";
193
+ status: "pending" | "completed" | "in_progress";
193
194
  priority: "high" | "low" | "medium";
194
195
  }[], "chat/setTodos">;
195
196
  declare const clearTodos: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/clearTodos">;
package/dist/index.d.ts CHANGED
@@ -4,8 +4,8 @@ import { B as ButtonProps } from './Button-CVsSwe4f.js';
4
4
  import { Components } from 'react-markdown';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { PlotParams } from 'react-plotly.js';
7
- import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-N2nctlGV.js';
8
- export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-N2nctlGV.js';
7
+ import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-CPs2m921.js';
8
+ export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-CPs2m921.js';
9
9
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
10
10
  import { PayloadAction } from '@reduxjs/toolkit';
11
11
  import * as immer from 'immer';
@@ -2,6 +2,14 @@ import { ReactNode, Dispatch, ComponentType } from 'react';
2
2
  import { UnknownAction } from '@reduxjs/toolkit';
3
3
  import { z } from 'zod';
4
4
 
5
+ type ChatEventStatus = "idle" | "pending" | "streaming" | "complete" | "error";
6
+ type ChatEvent = {
7
+ type: "session_created";
8
+ sessionId: string;
9
+ } | {
10
+ type: "status_change";
11
+ status: ChatEventStatus;
12
+ };
5
13
  interface AgentAction {
6
14
  id?: string;
7
15
  type: "info" | "analysis";
@@ -122,6 +130,7 @@ interface ChatbotProviderProps extends ChatbotProps {
122
130
  taskLabel?: keyof typeof TaskLabels;
123
131
  initialValidation?: ChatState["initialValidation"];
124
132
  onError?: (error: unknown) => void;
133
+ onEvent?: (event: ChatEvent) => void;
125
134
  urls?: ChatbotUrls;
126
135
  disableContext?: boolean;
127
136
  requestParams?: RequestInit;
@@ -246,12 +255,12 @@ declare const todoItemSchema: z.ZodObject<{
246
255
  }, "strip", z.ZodTypeAny, {
247
256
  id: string;
248
257
  content: string;
249
- status: "completed" | "pending" | "in_progress";
258
+ status: "pending" | "completed" | "in_progress";
250
259
  priority: "high" | "low" | "medium";
251
260
  }, {
252
261
  id: string;
253
262
  content: string;
254
- status: "completed" | "pending" | "in_progress";
263
+ status: "pending" | "completed" | "in_progress";
255
264
  priority: "high" | "low" | "medium";
256
265
  }>;
257
266
  type TodoItem = z.infer<typeof todoItemSchema>;
@@ -284,12 +293,12 @@ declare const agentStreamResponseSchema: z.ZodObject<{
284
293
  }, "strip", z.ZodTypeAny, {
285
294
  id: string;
286
295
  content: string;
287
- status: "completed" | "pending" | "in_progress";
296
+ status: "pending" | "completed" | "in_progress";
288
297
  priority: "high" | "low" | "medium";
289
298
  }, {
290
299
  id: string;
291
300
  content: string;
292
- status: "completed" | "pending" | "in_progress";
301
+ status: "pending" | "completed" | "in_progress";
293
302
  priority: "high" | "low" | "medium";
294
303
  }>, "many">>;
295
304
  response: z.ZodOptional<z.ZodString>;
@@ -388,7 +397,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
388
397
  }>, "many">>;
389
398
  confidence_str: z.ZodOptional<z.ZodString>;
390
399
  }, "strip", z.ZodTypeAny, {
391
- type: "text" | "info" | "error" | "custom" | "analysis" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response" | "complete";
400
+ type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response";
392
401
  id?: string | undefined;
393
402
  content?: string | undefined;
394
403
  heading?: string | undefined;
@@ -408,7 +417,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
408
417
  todos?: {
409
418
  id: string;
410
419
  content: string;
411
- status: "completed" | "pending" | "in_progress";
420
+ status: "pending" | "completed" | "in_progress";
412
421
  priority: "high" | "low" | "medium";
413
422
  }[] | undefined;
414
423
  response?: string | undefined;
@@ -431,7 +440,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
431
440
  }[] | undefined;
432
441
  confidence_str?: string | undefined;
433
442
  }, {
434
- type: "text" | "info" | "error" | "custom" | "analysis" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response" | "complete";
443
+ type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response";
435
444
  id?: string | undefined;
436
445
  content?: string | undefined;
437
446
  heading?: string | undefined;
@@ -451,7 +460,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
451
460
  todos?: {
452
461
  id: string;
453
462
  content: string;
454
- status: "completed" | "pending" | "in_progress";
463
+ status: "pending" | "completed" | "in_progress";
455
464
  priority: "high" | "low" | "medium";
456
465
  }[] | undefined;
457
466
  response?: string | undefined;
@@ -607,4 +616,4 @@ interface Citation {
607
616
  taskLabel: TaskLabels;
608
617
  }
609
618
 
610
- export { type Artifact as A, type EntityDetectionResponse as B, type CoachAiResponse as C, type DetectedEntity as D, EntityType as E, type Feedback as F, type Mode as G, type InteractionType as H, type InteractionRequest as I, type InteractionChoice as J, sessionStatusSchema as K, type Learning as L, type MessageAttachment as M, todoItemSchema as N, type ToolUsageData as O, PersonalizationScope as P, type ProgressUpdate as Q, type FinalResponseData as R, type SessionStatusEnum as S, TaskLabels as T, type UploadedFile as U, agentStreamResponseSchema as V, type TeamMateContextProps as a, type TeamMateState as b, type TeamMateConfig as c, TeamMateActionType as d, TeamMateAvailability as e, type CoachAiConfirmationResponse as f, ContentCategory as g, type TeamMateComponentProps as h, type Citation as i, type ChatbotProps as j, type ChatbotProviderProps as k, learningSchema as l, type ChatState as m, type ContextOption as n, type ChatMessage as o, type AgentAction as p, type ChatResponse as q, LoadingState as r, type ChatSession as s, type TodoItem as t, type AgentStreamResponse as u, type AssistantMeta as v, type FileUploadProps as w, type ChatbotUrls as x, type Datamate as y, type EntityDetectionRequest as z };
619
+ export { type Artifact as A, type Datamate as B, type CoachAiResponse as C, type DetectedEntity as D, EntityType as E, type Feedback as F, type EntityDetectionRequest as G, type EntityDetectionResponse as H, type InteractionRequest as I, type Mode as J, type InteractionType as K, type Learning as L, type MessageAttachment as M, type InteractionChoice as N, sessionStatusSchema as O, PersonalizationScope as P, todoItemSchema as Q, type ToolUsageData as R, type SessionStatusEnum as S, TaskLabels as T, type UploadedFile as U, type ProgressUpdate as V, type FinalResponseData as W, agentStreamResponseSchema as X, type TeamMateContextProps as a, type TeamMateState as b, type TeamMateConfig as c, TeamMateActionType as d, TeamMateAvailability as e, type CoachAiConfirmationResponse as f, ContentCategory as g, type TeamMateComponentProps as h, type Citation as i, type ChatbotProps as j, type ChatbotProviderProps as k, learningSchema as l, type ChatState as m, type ContextOption as n, type ChatMessage as o, type AgentAction as p, type ChatResponse as q, LoadingState as r, type ChatSession as s, type TodoItem as t, type AgentStreamResponse as u, type ChatEventStatus as v, type ChatEvent as w, type AssistantMeta as x, type FileUploadProps as y, type ChatbotUrls as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.67",
3
+ "version": "0.0.68-beta.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"