@altimateai/ui-components 0.0.74 → 0.0.75
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/CoachForm.js +24929 -18305
- package/dist/chatbotV2/index.d.ts +46 -3
- package/dist/index.d.ts +2 -2
- package/dist/shadcn/index.js +1 -8
- package/dist/{types-dxSjfpqi.d.ts → types-ByRPUpXR.d.ts} +5 -5
- package/package.json +1 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
1
2
|
import React__default, { FC, ReactNode } from 'react';
|
|
2
|
-
import { j as ChatbotProps, k as
|
|
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-
|
|
3
|
+
import { j as ChatbotProps, k as ChatSession, m as ChatbotProviderProps, n as ChatState, A as Artifact, o as ContextOption, I as InteractionRequest, p as ChatMessage, q as AgentAction, i as Citation, r as TodoItem, s as ChatResponse, F as Feedback, t as LoadingState, M as MessageAttachment, D as DetectedEntity, E as EntityType, u as AgentStreamResponse, S as SessionStatusEnum } from '../types-ByRPUpXR.js';
|
|
4
|
+
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-ByRPUpXR.js';
|
|
4
5
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
5
6
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
8
|
import { B as ButtonProps } from '../Button-42Dj_nRE.js';
|
|
9
|
+
import * as ai from 'ai';
|
|
10
|
+
import { UIMessage } from '@ai-sdk/react';
|
|
11
|
+
export { UIMessage } from '@ai-sdk/react';
|
|
8
12
|
import 'zod';
|
|
9
13
|
import 'class-variance-authority/types';
|
|
10
14
|
import 'class-variance-authority';
|
|
@@ -18,6 +22,8 @@ interface ChatProviderRef {
|
|
|
18
22
|
resetSession: () => void;
|
|
19
23
|
setUserInput: (text: string) => void;
|
|
20
24
|
resetStatus: () => void;
|
|
25
|
+
getSessionById: (_sessionId: string) => ChatSession | null;
|
|
26
|
+
getSessionId: () => string | null;
|
|
21
27
|
}
|
|
22
28
|
declare const useChatContext: () => ChatContextType;
|
|
23
29
|
declare const ChatProvider: React__default.ForwardRefExoticComponent<ChatbotProviderProps & React__default.RefAttributes<ChatProviderRef>>;
|
|
@@ -112,6 +118,38 @@ declare const ChatTriggerLink: ({ text, buttonProps }: {
|
|
|
112
118
|
buttonProps?: ButtonProps;
|
|
113
119
|
}) => react_jsx_runtime.JSX.Element;
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Chat Transports - Custom transport implementations for AI SDK 6
|
|
123
|
+
*
|
|
124
|
+
* These transports transform our backend's raw JSON format to AI SDK's UIMessageChunk format.
|
|
125
|
+
*
|
|
126
|
+
* - LegacyBackendTransport: For standard agent chat (JSON streaming)
|
|
127
|
+
* - MarkdownStreamTransport: For Query Analysis mode (markdown streaming)
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Data accumulated during stream processing.
|
|
132
|
+
* This captures all the rich metadata from agent_outcome and other messages.
|
|
133
|
+
*/
|
|
134
|
+
interface AccumulatedStreamData {
|
|
135
|
+
/** Full text content accumulated from all text deltas */
|
|
136
|
+
content: string;
|
|
137
|
+
/** Actions (info/analysis messages) */
|
|
138
|
+
actions: AgentAction[];
|
|
139
|
+
/** Artifacts from agent_outcome */
|
|
140
|
+
artifacts: Artifact[];
|
|
141
|
+
/** Citations from citations messages */
|
|
142
|
+
citations: Citation[];
|
|
143
|
+
/** Todos from tool_use (TodoWrite) messages */
|
|
144
|
+
todos: TodoItem[];
|
|
145
|
+
/** Interaction prompt from require_user_action */
|
|
146
|
+
interaction: InteractionRequest | undefined;
|
|
147
|
+
/** Heading from agent_outcome */
|
|
148
|
+
heading: string;
|
|
149
|
+
/** Confidence string from agent_outcome */
|
|
150
|
+
confidence_str: string | undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
115
153
|
declare const useAgentChat: () => {
|
|
116
154
|
sendMessage: ({ message, isResponseToPrompt, context: newContext, dontAddUserMessage, }: {
|
|
117
155
|
message: string;
|
|
@@ -120,6 +158,11 @@ declare const useAgentChat: () => {
|
|
|
120
158
|
dontAddUserMessage?: boolean;
|
|
121
159
|
}) => Promise<ChatResponse>;
|
|
122
160
|
updateContextAndSendMessage: (message: string, context: Record<string, unknown>) => Promise<void>;
|
|
161
|
+
loadV1Session: (v1Messages: ChatMessage[]) => void;
|
|
162
|
+
getV1Messages: () => ChatMessage[];
|
|
163
|
+
messages: UIMessage<unknown, ai.UIDataTypes, ai.UITools>[];
|
|
164
|
+
status: ai.ChatStatus;
|
|
165
|
+
accumulatedDataRef: React$1.MutableRefObject<AccumulatedStreamData>;
|
|
123
166
|
};
|
|
124
167
|
|
|
125
168
|
interface AddMessagePayload {
|
|
@@ -313,4 +356,4 @@ declare const Citations: ({ citations, frontEndUrl, }: {
|
|
|
313
356
|
frontEndUrl: string;
|
|
314
357
|
}) => JSX.Element | null;
|
|
315
358
|
|
|
316
|
-
export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatFeedbackActions, ChatLastMessageActions, ChatMessage, ChatMessageEndActions, ChatProvider, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, DetectedEntity, EntityType, Feedback, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, QuestionForm, RegenerateButton, SessionStatusEnum, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, setUserInput, streamResponseToAgentMessages, updateContext, updateDatamateInSession, updateEntities, updateEntityType, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
|
|
359
|
+
export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatFeedbackActions, ChatLastMessageActions, ChatMessage, ChatMessageEndActions, ChatProvider, type ChatProviderRef, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, DetectedEntity, EntityType, Feedback, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, QuestionForm, RegenerateButton, SessionStatusEnum, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, setUserInput, streamResponseToAgentMessages, updateContext, updateDatamateInSession, updateEntities, updateEntityType, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { B as ButtonProps, a as Button } from './Button-42Dj_nRE.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-
|
|
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-
|
|
7
|
+
import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-ByRPUpXR.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-ByRPUpXR.js';
|
|
9
9
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
10
10
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
11
11
|
import * as immer from 'immer';
|
package/dist/shadcn/index.js
CHANGED
|
@@ -2968,14 +2968,7 @@ const Qd = [["path", { d: "M10.585 10.587a2 2 0 0 0 2.829 2.828", key: "svg-0" }
|
|
|
2968
2968
|
({ className: e, ...t }, n) => {
|
|
2969
2969
|
const [a, r] = Ne(!1);
|
|
2970
2970
|
return /* @__PURE__ */ u.jsxs(Bi, { className: e, children: [
|
|
2971
|
-
/* @__PURE__ */ u.jsx(
|
|
2972
|
-
Hi,
|
|
2973
|
-
{
|
|
2974
|
-
ref: n,
|
|
2975
|
-
type: a ? "text" : "password",
|
|
2976
|
-
...t
|
|
2977
|
-
}
|
|
2978
|
-
),
|
|
2971
|
+
/* @__PURE__ */ u.jsx(Hi, { ref: n, type: a ? "text" : "password", ...t }),
|
|
2979
2972
|
/* @__PURE__ */ u.jsx(Yi, { align: "inline-end", children: /* @__PURE__ */ u.jsx(
|
|
2980
2973
|
Vi,
|
|
2981
2974
|
{
|
|
@@ -286,7 +286,7 @@ interface FinalResponseData {
|
|
|
286
286
|
}
|
|
287
287
|
declare const agentStreamResponseSchema: z.ZodObject<{
|
|
288
288
|
id: z.ZodOptional<z.ZodString>;
|
|
289
|
-
type: z.ZodEnum<["info", "agent_outcome", "require_user_action", "analysis", "error", "citations", "text", "tool_use", "final_response", "complete", "custom"]>;
|
|
289
|
+
type: z.ZodEnum<["info", "agent_outcome", "require_user_action", "analysis", "error", "citations", "text", "tool_use", "final_response", "complete", "stream_complete", "custom"]>;
|
|
290
290
|
heading: z.ZodOptional<z.ZodString>;
|
|
291
291
|
content: z.ZodOptional<z.ZodString>;
|
|
292
292
|
tool: z.ZodOptional<z.ZodString>;
|
|
@@ -402,7 +402,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
|
|
|
402
402
|
}>, "many">>;
|
|
403
403
|
confidence_str: z.ZodOptional<z.ZodString>;
|
|
404
404
|
}, "strip", z.ZodTypeAny, {
|
|
405
|
-
type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response";
|
|
405
|
+
type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response" | "stream_complete";
|
|
406
406
|
id?: string | undefined;
|
|
407
407
|
content?: string | undefined;
|
|
408
408
|
heading?: string | undefined;
|
|
@@ -445,7 +445,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
|
|
|
445
445
|
}[] | undefined;
|
|
446
446
|
confidence_str?: string | undefined;
|
|
447
447
|
}, {
|
|
448
|
-
type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response";
|
|
448
|
+
type: "text" | "info" | "error" | "custom" | "analysis" | "complete" | "agent_outcome" | "require_user_action" | "citations" | "tool_use" | "final_response" | "stream_complete";
|
|
449
449
|
id?: string | undefined;
|
|
450
450
|
content?: string | undefined;
|
|
451
451
|
heading?: string | undefined;
|
|
@@ -490,7 +490,7 @@ declare const agentStreamResponseSchema: z.ZodObject<{
|
|
|
490
490
|
}>;
|
|
491
491
|
interface AgentStreamResponse {
|
|
492
492
|
id?: string;
|
|
493
|
-
type: "info" | "agent_outcome" | "require_user_action" | "analysis" | "error" | "citations" | "text" | "tool_use" | "final_response" | "complete";
|
|
493
|
+
type: "info" | "agent_outcome" | "require_user_action" | "analysis" | "error" | "citations" | "text" | "tool_use" | "final_response" | "complete" | "stream_complete";
|
|
494
494
|
heading?: string;
|
|
495
495
|
content?: string;
|
|
496
496
|
tool?: string;
|
|
@@ -621,4 +621,4 @@ interface Citation {
|
|
|
621
621
|
taskLabel: TaskLabels;
|
|
622
622
|
}
|
|
623
623
|
|
|
624
|
-
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
|
|
624
|
+
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 ChatSession as k, learningSchema as l, type ChatbotProviderProps as m, type ChatState as n, type ContextOption as o, type ChatMessage as p, type AgentAction as q, type TodoItem as r, type ChatResponse as s, LoadingState 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 };
|