@altimateai/ui-components 0.0.30 → 0.0.31-beta.2
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 +12812 -12321
- package/dist/Stack.js +84 -60
- package/dist/chatbotV2/index.d.ts +88 -3
- package/dist/chatbotV2/index.js +26 -18
- package/dist/flowchart-elk-definition-170a3958.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/is_dark.js +1 -1
- package/dist/main.js +1 -1
- package/dist/mindmap-definition-44684416.js +1 -1
- package/dist/shadcn/index.d.ts +12 -1
- package/dist/shadcn/index.js +894 -871
- package/dist/storybook/DebouncedInput.stories.tsx +179 -0
- package/dist/storybook/Input.stories.tsx +89 -2
- package/dist/timeline-definition-8e5a9bc6.js +16 -16
- package/dist/types-rSkEslHb.d.ts +545 -0
- package/package.json +1 -1
- package/dist/types-Dr98SsnM.d.ts +0 -304
package/dist/types-Dr98SsnM.d.ts
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { ReactNode, Dispatch, ComponentType } from 'react';
|
|
2
|
-
import { UnknownAction } from '@reduxjs/toolkit';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
|
|
5
|
-
interface AgentAction {
|
|
6
|
-
id?: string;
|
|
7
|
-
type: "info" | "analysis";
|
|
8
|
-
content: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
artifacts?: Artifact[];
|
|
11
|
-
}
|
|
12
|
-
declare enum LoadingState {
|
|
13
|
-
LOADING = "LOADING",
|
|
14
|
-
LOADED = "LOADED",
|
|
15
|
-
ERROR = "ERROR",
|
|
16
|
-
UNINITIALIZED = "UNINITIALIZED"
|
|
17
|
-
}
|
|
18
|
-
interface AssistantMeta {
|
|
19
|
-
avatar: string;
|
|
20
|
-
name: string;
|
|
21
|
-
}
|
|
22
|
-
interface Feedback {
|
|
23
|
-
rating?: "up" | "down";
|
|
24
|
-
comment?: string;
|
|
25
|
-
}
|
|
26
|
-
interface ContextOption {
|
|
27
|
-
label: string;
|
|
28
|
-
key: string;
|
|
29
|
-
options: {
|
|
30
|
-
id: string;
|
|
31
|
-
label: string;
|
|
32
|
-
}[];
|
|
33
|
-
}
|
|
34
|
-
interface ChatSession {
|
|
35
|
-
id: string;
|
|
36
|
-
messages: ChatMessage[];
|
|
37
|
-
context?: {
|
|
38
|
-
files?: File[];
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
};
|
|
41
|
-
selectedModel?: string | null;
|
|
42
|
-
}
|
|
43
|
-
interface FileUploadProps {
|
|
44
|
-
allowedFiles: string;
|
|
45
|
-
contextFieldKey: string;
|
|
46
|
-
}
|
|
47
|
-
interface ChatbotUrls {
|
|
48
|
-
origin?: string;
|
|
49
|
-
askPath?: string;
|
|
50
|
-
proceedPath?: string;
|
|
51
|
-
frontendUrl?: string;
|
|
52
|
-
followupPath?: string;
|
|
53
|
-
}
|
|
54
|
-
interface ChatbotProps {
|
|
55
|
-
helloMessage?: React.ReactNode;
|
|
56
|
-
assistantMeta?: AssistantMeta;
|
|
57
|
-
context?: Record<string, unknown>;
|
|
58
|
-
fileUploadProps?: FileUploadProps;
|
|
59
|
-
contextOptions?: ContextOption[];
|
|
60
|
-
placeholder?: string;
|
|
61
|
-
}
|
|
62
|
-
interface ChatbotProviderProps extends ChatbotProps {
|
|
63
|
-
taskLabel?: keyof typeof TaskLabels;
|
|
64
|
-
initialValidation?: ChatState["initialValidation"];
|
|
65
|
-
onError?: (error: unknown) => void;
|
|
66
|
-
urls?: ChatbotUrls;
|
|
67
|
-
disableContext?: boolean;
|
|
68
|
-
requestParams?: RequestInit;
|
|
69
|
-
components?: {
|
|
70
|
-
feedback?: ReactNode;
|
|
71
|
-
questionFormButtons?: (userPrompt: string, onAccept: (improvedPrompt: string) => void) => ReactNode;
|
|
72
|
-
};
|
|
73
|
-
contextOptions?: ContextOption[];
|
|
74
|
-
isMarkdownResponse?: boolean;
|
|
75
|
-
models?: {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[];
|
|
79
|
-
placeholder?: string;
|
|
80
|
-
}
|
|
81
|
-
type InteractionType = "text" | "select" | "multiSelect" | "confirm";
|
|
82
|
-
interface InteractionChoice {
|
|
83
|
-
id: string;
|
|
84
|
-
label: string;
|
|
85
|
-
value: string;
|
|
86
|
-
}
|
|
87
|
-
interface InteractionRequest {
|
|
88
|
-
type: InteractionType;
|
|
89
|
-
id: string;
|
|
90
|
-
prompt: string;
|
|
91
|
-
required?: boolean;
|
|
92
|
-
choices?: InteractionChoice[];
|
|
93
|
-
validation?: {
|
|
94
|
-
pattern?: string;
|
|
95
|
-
message?: string;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
interface ChatMessage {
|
|
99
|
-
id: string;
|
|
100
|
-
content: string;
|
|
101
|
-
role: "user" | "assistant";
|
|
102
|
-
timestamp: number;
|
|
103
|
-
actions?: AgentAction[];
|
|
104
|
-
interaction?: InteractionRequest;
|
|
105
|
-
artifacts?: Artifact[];
|
|
106
|
-
heading: string;
|
|
107
|
-
citations?: Citation[];
|
|
108
|
-
todos?: TodoItem[];
|
|
109
|
-
}
|
|
110
|
-
interface Artifact {
|
|
111
|
-
content: string;
|
|
112
|
-
entity: string;
|
|
113
|
-
name: string;
|
|
114
|
-
type: string;
|
|
115
|
-
}
|
|
116
|
-
interface ChatResponse {
|
|
117
|
-
content: string;
|
|
118
|
-
actions?: AgentAction[];
|
|
119
|
-
interaction?: InteractionRequest;
|
|
120
|
-
role: "assistant" | "user";
|
|
121
|
-
timestamp: number;
|
|
122
|
-
artifacts?: Artifact[];
|
|
123
|
-
heading: string;
|
|
124
|
-
todos?: TodoItem[];
|
|
125
|
-
}
|
|
126
|
-
interface ChatState {
|
|
127
|
-
sessions: Record<string, ChatSession>;
|
|
128
|
-
currentSessionId: string | null;
|
|
129
|
-
loadingState: LoadingState;
|
|
130
|
-
error: string | null;
|
|
131
|
-
abortController: AbortController | null;
|
|
132
|
-
currentActions: AgentAction[];
|
|
133
|
-
currentTodos: TodoItem[];
|
|
134
|
-
taskLabel?: keyof typeof TaskLabels;
|
|
135
|
-
initialValidation?: (data: {
|
|
136
|
-
context: ChatSession["context"];
|
|
137
|
-
}) => Promise<void>;
|
|
138
|
-
urls?: ChatbotUrls;
|
|
139
|
-
disableContext?: boolean;
|
|
140
|
-
requestParams?: RequestInit;
|
|
141
|
-
isMarkdownResponse?: boolean;
|
|
142
|
-
models?: {
|
|
143
|
-
label: string;
|
|
144
|
-
value: string;
|
|
145
|
-
}[];
|
|
146
|
-
components?: {
|
|
147
|
-
feedback?: ReactNode;
|
|
148
|
-
questionFormButtons?: (userPrompt: string, onAccept: (improvedPrompt: string) => void) => ReactNode;
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
interface TodoItem {
|
|
152
|
-
id: string;
|
|
153
|
-
content: string;
|
|
154
|
-
status: "pending" | "in_progress" | "completed";
|
|
155
|
-
priority: "high" | "medium" | "low";
|
|
156
|
-
}
|
|
157
|
-
interface ToolUsageData {
|
|
158
|
-
tool: string;
|
|
159
|
-
id: string;
|
|
160
|
-
}
|
|
161
|
-
interface ProgressUpdate {
|
|
162
|
-
timestamp: string;
|
|
163
|
-
todos: TodoItem[];
|
|
164
|
-
}
|
|
165
|
-
interface FinalResponseData {
|
|
166
|
-
tool_usage?: ToolUsageData[];
|
|
167
|
-
turns?: number;
|
|
168
|
-
tools_used?: number;
|
|
169
|
-
progress_updates?: ProgressUpdate[];
|
|
170
|
-
total_progress_updates?: number;
|
|
171
|
-
}
|
|
172
|
-
interface AgentStreamResponse {
|
|
173
|
-
id?: string;
|
|
174
|
-
type: "info" | "agent_outcome" | "require_user_action" | "analysis" | "error" | "citations" | "text" | "tool_use" | "final_response" | "complete";
|
|
175
|
-
heading?: string;
|
|
176
|
-
content?: string;
|
|
177
|
-
tool?: string;
|
|
178
|
-
todos?: TodoItem[];
|
|
179
|
-
response?: string;
|
|
180
|
-
data?: FinalResponseData;
|
|
181
|
-
interaction?: {
|
|
182
|
-
type: "text" | "multiSelect" | "confirm" | "select";
|
|
183
|
-
id: string;
|
|
184
|
-
prompt: string;
|
|
185
|
-
required?: boolean;
|
|
186
|
-
choices?: Array<{
|
|
187
|
-
id: string;
|
|
188
|
-
label: string;
|
|
189
|
-
value: string;
|
|
190
|
-
}>;
|
|
191
|
-
};
|
|
192
|
-
artifacts?: Artifact[];
|
|
193
|
-
citations?: Citation[];
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
interface TeamMateState {
|
|
197
|
-
showCoachingForm: boolean;
|
|
198
|
-
}
|
|
199
|
-
interface TeamMateContextProps {
|
|
200
|
-
state: TeamMateState;
|
|
201
|
-
dispatch: Dispatch<UnknownAction>;
|
|
202
|
-
}
|
|
203
|
-
interface CoachAiResponse {
|
|
204
|
-
ai_response: string;
|
|
205
|
-
category: string;
|
|
206
|
-
personalizationScope: string;
|
|
207
|
-
}
|
|
208
|
-
interface CoachAiConfirmationResponse {
|
|
209
|
-
ok: boolean;
|
|
210
|
-
train_doc_uid: string;
|
|
211
|
-
frontend_url: string;
|
|
212
|
-
}
|
|
213
|
-
declare enum ContentCategory {
|
|
214
|
-
TERM_CLARIFICATION = "TermClarification",
|
|
215
|
-
GENERAL_GUIDELINES = "GeneralGuidelines",
|
|
216
|
-
BUSINESS_EXPLANATION = "BusinessExplanation"
|
|
217
|
-
}
|
|
218
|
-
declare enum TaskLabels {
|
|
219
|
-
DocGen = "DocGen",
|
|
220
|
-
ChartBot = "ChartBot",
|
|
221
|
-
SqlBot = "SqlExpert",
|
|
222
|
-
OpportunitiesBot = "OpportunitiesBot",
|
|
223
|
-
ProjectGovernor = "ProjectGovernor",
|
|
224
|
-
TeradataToSnowflakeMigrator = "TeradataToSnowflakeMigrator",
|
|
225
|
-
AlertManager = "AlertManager"
|
|
226
|
-
}
|
|
227
|
-
declare enum PersonalizationScope {
|
|
228
|
-
USER_SPECIFIC = "UserSpecific",
|
|
229
|
-
ALL_USERS = "AllUsers"
|
|
230
|
-
}
|
|
231
|
-
declare const learningSchema: z.ZodObject<{
|
|
232
|
-
train_doc_uid: z.ZodString;
|
|
233
|
-
userId: z.ZodString;
|
|
234
|
-
display_name: z.ZodString;
|
|
235
|
-
taskLabel: z.ZodString;
|
|
236
|
-
category: z.ZodEnum<[string, ...string[]]>;
|
|
237
|
-
personalizationScope: z.ZodDefault<z.ZodEnum<[string, ...string[]]>>;
|
|
238
|
-
createdDate: z.ZodString;
|
|
239
|
-
updatedDate: z.ZodString;
|
|
240
|
-
content: z.ZodString;
|
|
241
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
242
|
-
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
243
|
-
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
content: string;
|
|
245
|
-
isActive: boolean;
|
|
246
|
-
display_name: string;
|
|
247
|
-
userId: string;
|
|
248
|
-
taskLabel: string;
|
|
249
|
-
category: string;
|
|
250
|
-
personalizationScope: string;
|
|
251
|
-
train_doc_uid: string;
|
|
252
|
-
createdDate: string;
|
|
253
|
-
updatedDate: string;
|
|
254
|
-
metadata?: Record<string, unknown> | undefined;
|
|
255
|
-
}, {
|
|
256
|
-
content: string;
|
|
257
|
-
display_name: string;
|
|
258
|
-
userId: string;
|
|
259
|
-
taskLabel: string;
|
|
260
|
-
category: string;
|
|
261
|
-
train_doc_uid: string;
|
|
262
|
-
createdDate: string;
|
|
263
|
-
updatedDate: string;
|
|
264
|
-
metadata?: Record<string, unknown> | undefined;
|
|
265
|
-
isActive?: boolean | undefined;
|
|
266
|
-
personalizationScope?: string | undefined;
|
|
267
|
-
}>;
|
|
268
|
-
interface Learning extends z.infer<typeof learningSchema> {
|
|
269
|
-
}
|
|
270
|
-
declare enum TeamMateAvailability {
|
|
271
|
-
EXTENSION = "VSCode Extension",
|
|
272
|
-
SAAS = "SaaS"
|
|
273
|
-
}
|
|
274
|
-
interface TeamMateComponentProps<T = void> {
|
|
275
|
-
onClose?: (data?: T) => void;
|
|
276
|
-
frontendUrl?: string;
|
|
277
|
-
urls?: ChatbotUrls;
|
|
278
|
-
requestParams?: RequestInit;
|
|
279
|
-
context?: ChatSession["context"];
|
|
280
|
-
contextOptions?: ContextOption[];
|
|
281
|
-
}
|
|
282
|
-
interface TeamMateConfig<T = unknown> {
|
|
283
|
-
name: string;
|
|
284
|
-
avatar: string;
|
|
285
|
-
description: string;
|
|
286
|
-
availability: TeamMateAvailability[];
|
|
287
|
-
key: TaskLabels;
|
|
288
|
-
seeInAction?: boolean;
|
|
289
|
-
comingSoon?: boolean | (() => boolean);
|
|
290
|
-
displayComponent?: ComponentType<TeamMateComponentProps<T>>;
|
|
291
|
-
formComponent?: ComponentType<TeamMateComponentProps<T>>;
|
|
292
|
-
}
|
|
293
|
-
declare enum TeamMateActionType {
|
|
294
|
-
SEE_IN_ACTION = "SEE_IN_ACTION",
|
|
295
|
-
REQUEST_ACCESS = "REQUEST_ACCESS",
|
|
296
|
-
VIEW_DETAILS = "VIEW_DETAILS"
|
|
297
|
-
}
|
|
298
|
-
interface Citation {
|
|
299
|
-
id: string;
|
|
300
|
-
content: string;
|
|
301
|
-
taskLabel: TaskLabels;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export { type Artifact as A, type ProgressUpdate as B, type CoachAiResponse as C, type FinalResponseData as D, type AgentStreamResponse as E, type Feedback as F, type InteractionRequest as I, type Learning as L, PersonalizationScope as P, TaskLabels as T, 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 AssistantMeta as s, type ChatSession as t, type FileUploadProps as u, type ChatbotUrls as v, type InteractionType as w, type InteractionChoice as x, type TodoItem as y, type ToolUsageData as z };
|