@altimateai/ui-components 0.0.70 → 0.0.71-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.
package/dist/CoachForm.js
CHANGED
|
@@ -32591,7 +32591,7 @@ const I$ = (t, e) => {
|
|
|
32591
32591
|
i && (i.messages = i.messages.filter((a) => a.id !== r));
|
|
32592
32592
|
},
|
|
32593
32593
|
setLoadingState: (t, e) => {
|
|
32594
|
-
t.loadingState = e.payload;
|
|
32594
|
+
t.currentSessionId === e.payload.sessionId && (t.loadingState = e.payload.state);
|
|
32595
32595
|
},
|
|
32596
32596
|
setError: (t, e) => {
|
|
32597
32597
|
t.error = e.payload;
|
|
@@ -32739,7 +32739,9 @@ const I$ = (t, e) => {
|
|
|
32739
32739
|
);
|
|
32740
32740
|
},
|
|
32741
32741
|
resetStatus: () => {
|
|
32742
|
-
_(
|
|
32742
|
+
_(
|
|
32743
|
+
ai({ state: Ce.UNINITIALIZED, sessionId: B.currentSessionId })
|
|
32744
|
+
);
|
|
32743
32745
|
}
|
|
32744
32746
|
})), xe(() => {
|
|
32745
32747
|
g && Object.keys(g || {}).length > 0 && _(z$(g));
|
|
@@ -32748,16 +32750,20 @@ const I$ = (t, e) => {
|
|
|
32748
32750
|
}, [x, _, l, f, m]), xe(() => {
|
|
32749
32751
|
B.currentSessionId && F && F({ type: "session_created", sessionId: B.currentSessionId });
|
|
32750
32752
|
}, [B.currentSessionId, F]), xe(() => {
|
|
32751
|
-
if (F) {
|
|
32753
|
+
if (F && B.currentSessionId) {
|
|
32752
32754
|
const v = {
|
|
32753
32755
|
[Ce.UNINITIALIZED]: "idle",
|
|
32754
32756
|
[Ce.LOADING]: "pending",
|
|
32755
32757
|
[Ce.LOADED]: "complete",
|
|
32756
32758
|
[Ce.ERROR]: "error"
|
|
32757
32759
|
};
|
|
32758
|
-
F({
|
|
32760
|
+
F({
|
|
32761
|
+
type: "status_change",
|
|
32762
|
+
status: v[B.loadingState],
|
|
32763
|
+
sessionId: B.currentSessionId
|
|
32764
|
+
});
|
|
32759
32765
|
}
|
|
32760
|
-
}, [B.loadingState, F]), /* @__PURE__ */ E.jsx(
|
|
32766
|
+
}, [B.loadingState, B.currentSessionId, F]), /* @__PURE__ */ E.jsx(
|
|
32761
32767
|
c3.Provider,
|
|
32762
32768
|
{
|
|
32763
32769
|
value: {
|
|
@@ -33123,7 +33129,7 @@ const Rs = () => {
|
|
|
33123
33129
|
);
|
|
33124
33130
|
}
|
|
33125
33131
|
const m = new AbortController();
|
|
33126
|
-
t(ai(Ce.LOADING)), t($p(m)), t(l3()), t(F$());
|
|
33132
|
+
t(ai({ state: Ce.LOADING, sessionId: e })), t($p(m)), t(l3()), t(F$());
|
|
33127
33133
|
const b = n[e], g = h ? {
|
|
33128
33134
|
values: c,
|
|
33129
33135
|
session_id: e
|
|
@@ -33224,7 +33230,7 @@ const Rs = () => {
|
|
|
33224
33230
|
} catch (S) {
|
|
33225
33231
|
throw S instanceof Error && S.name !== "AbortError" && t(o3(S instanceof Error ? S.message : "Failed to send message")), S;
|
|
33226
33232
|
} finally {
|
|
33227
|
-
m.signal.aborted || t($p(null)), t(ai(Ce.LOADED));
|
|
33233
|
+
m.signal.aborted || t($p(null)), t(ai({ state: Ce.LOADED, sessionId: e }));
|
|
33228
33234
|
}
|
|
33229
33235
|
};
|
|
33230
33236
|
return { sendMessage: u, updateContextAndSendMessage: l };
|
|
@@ -35962,11 +35968,11 @@ const V$ = /* @__PURE__ */ oh(Y$), m3 = ({ artifacts: t }) => {
|
|
|
35962
35968
|
] });
|
|
35963
35969
|
}, G$ = () => {
|
|
35964
35970
|
const { dispatch: t, abortController: e, currentSessionId: n } = We(), r = async () => {
|
|
35965
|
-
if (e && (e.abort(), t(ai(Ce.LOADED))), n)
|
|
35971
|
+
if (e && (e.abort(), t(ai({ state: Ce.LOADED, sessionId: n }))), n)
|
|
35966
35972
|
try {
|
|
35967
35973
|
await In.post("playground/cancel", {
|
|
35968
35974
|
session_id: n
|
|
35969
|
-
}), t(ai(Ce.LOADED));
|
|
35975
|
+
}), t(ai({ state: Ce.LOADED, sessionId: n }));
|
|
35970
35976
|
} catch (i) {
|
|
35971
35977
|
console.error("Failed to call cancel API:", i);
|
|
35972
35978
|
}
|
|
@@ -36554,7 +36560,7 @@ const V$ = /* @__PURE__ */ oh(Y$), m3 = ({ artifacts: t }) => {
|
|
|
36554
36560
|
const s = i[r];
|
|
36555
36561
|
if (s)
|
|
36556
36562
|
try {
|
|
36557
|
-
n(ai(Ce.LOADING));
|
|
36563
|
+
n(ai({ state: Ce.LOADING, sessionId: r }));
|
|
36558
36564
|
const o = s.messages, l = o.findIndex((c) => c.id === t);
|
|
36559
36565
|
if (l === -1) return;
|
|
36560
36566
|
const u = o.slice(0, l).filter((c) => c.role === "user").pop();
|
|
@@ -36569,7 +36575,7 @@ const V$ = /* @__PURE__ */ oh(Y$), m3 = ({ artifacts: t }) => {
|
|
|
36569
36575
|
} catch (o) {
|
|
36570
36576
|
n(o3(o instanceof Error ? o.message : "Failed to regenerate response"));
|
|
36571
36577
|
} finally {
|
|
36572
|
-
n(ai(Ce.UNINITIALIZED));
|
|
36578
|
+
n(ai({ state: Ce.UNINITIALIZED, sessionId: r }));
|
|
36573
36579
|
}
|
|
36574
36580
|
};
|
|
36575
36581
|
return /* @__PURE__ */ E.jsx(Wi, { title: "Regenerate response", children: /* @__PURE__ */ E.jsx(
|
|
@@ -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-
|
|
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-
|
|
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-BdHGJOSE.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-BdHGJOSE.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';
|
|
@@ -182,7 +182,10 @@ declare const updateMessageFeedback: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
|
182
182
|
}, "chat/updateMessageFeedback">;
|
|
183
183
|
declare const clearHistory: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/clearHistory">;
|
|
184
184
|
declare const deleteMessage: _reduxjs_toolkit.ActionCreatorWithPayload<DeleteMessagePayload, "chat/deleteMessage">;
|
|
185
|
-
declare const setLoadingState: _reduxjs_toolkit.ActionCreatorWithPayload<
|
|
185
|
+
declare const setLoadingState: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
186
|
+
state: LoadingState;
|
|
187
|
+
sessionId: ChatState["currentSessionId"];
|
|
188
|
+
}, "chat/setLoadingState">;
|
|
186
189
|
declare const setError: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "chat/setError">;
|
|
187
190
|
declare const setAbortController: _reduxjs_toolkit.ActionCreatorWithPayload<AbortController | null, "chat/setAbortController">;
|
|
188
191
|
declare const addAction: _reduxjs_toolkit.ActionCreatorWithPayload<AgentAction, "chat/addAction">;
|
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-BdHGJOSE.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-BdHGJOSE.js';
|
|
9
9
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
10
10
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
11
11
|
import * as immer from 'immer';
|