@useago/sdk 0.3.3 → 0.4.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/AgoClient-B6PsfMeg.cjs +6 -0
- package/dist/{AgoClient-DF7M2WAz.js → AgoClient-BerJvssl.js} +235 -219
- package/dist/angular.cjs +1 -1
- package/dist/angular.d.cts +12 -0
- package/dist/angular.d.ts +12 -0
- package/dist/angular.js +1 -1
- package/dist/createConversationSession-CLZvxyuu.js +58 -0
- package/dist/createConversationSession-D3K5Gf1k.cjs +1 -0
- package/dist/createFormCollector-CD1rqRG4.js +208 -0
- package/dist/createFormCollector-D1FfiSgA.cjs +1 -0
- package/dist/createMockClient-DMFGIOtc.cjs +1 -0
- package/dist/createMockClient-tVsApEAh.js +72 -0
- package/dist/devtools.cjs +26 -26
- package/dist/devtools.d.cts +16 -26
- package/dist/devtools.d.ts +16 -26
- package/dist/devtools.js +55 -55
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +102 -1
- package/dist/index.d.ts +102 -1
- package/dist/index.js +46 -43
- package/dist/react.cjs +19 -19
- package/dist/react.d.cts +67 -8
- package/dist/react.d.ts +67 -8
- package/dist/react.js +1066 -1051
- package/dist/vue.cjs +1 -1
- package/dist/vue.d.cts +12 -0
- package/dist/vue.d.ts +12 -0
- package/dist/vue.js +1 -1
- package/dist/widget.cjs +1 -0
- package/dist/widget.d.cts +635 -0
- package/dist/widget.d.ts +635 -0
- package/dist/widget.js +418 -0
- package/package.json +58 -15
- package/dist/AgoClient-bjN-z2ZQ.cjs +0 -6
- package/dist/createMockClient-D6uVh-B9.js +0 -254
- package/dist/createMockClient-DecMEUcK.cjs +0 -1
- /package/dist/{functions-DdROP6Ui.js → functions-C1-5vadY.js} +0 -0
- /package/dist/{functions-Bz-1Bs3I.cjs → functions-DsmzgHjC.cjs} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { a as w, c as h, d as A, f as y, i as C, l as E, n as b, o as S, r as v, s as k, t as d, u as M } from "./AgoClient-
|
|
2
|
-
import { n as T,
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { a as w, c as h, d as A, f as y, i as C, l as E, n as b, o as S, r as v, s as k, t as d, u as M } from "./AgoClient-BerJvssl.js";
|
|
2
|
+
import { n as T, t as I } from "./createFormCollector-CD1rqRG4.js";
|
|
3
|
+
import { t as G } from "./createConversationSession-CLZvxyuu.js";
|
|
4
|
+
import { t as q } from "./createMockClient-tVsApEAh.js";
|
|
5
|
+
import { a as L, c as N, d as D, f as H, i as J, l as R, m as j, o as B, p as P, r as $, s as z, t as K, u as Q } from "./functions-C1-5vadY.js";
|
|
6
|
+
function V(e) {
|
|
5
7
|
return e;
|
|
6
8
|
}
|
|
7
|
-
function
|
|
9
|
+
function W(e, t) {
|
|
8
10
|
return e.on("message:complete", t), () => e.off("message:complete", t);
|
|
9
11
|
}
|
|
10
|
-
function
|
|
12
|
+
function X(e, t) {
|
|
11
13
|
return e.on("message:chunk", t), () => e.off("message:chunk", t);
|
|
12
14
|
}
|
|
13
|
-
function
|
|
15
|
+
function Y(e, t) {
|
|
14
16
|
return e.on("message:start", t), () => e.off("message:start", t);
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function Z(e, t) {
|
|
17
19
|
return e.on("message:error", t), () => e.off("message:error", t);
|
|
18
20
|
}
|
|
19
|
-
function
|
|
21
|
+
function _(e, t) {
|
|
20
22
|
return e.on("toolCall:received", t), () => e.off("toolCall:received", t);
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function ee(e, t) {
|
|
23
25
|
return e.on("function:invoke", t), () => e.off("function:invoke", t);
|
|
24
26
|
}
|
|
25
|
-
async function*
|
|
27
|
+
async function* te(e, t, g) {
|
|
26
28
|
const n = [];
|
|
27
29
|
let r = null, a = !1;
|
|
28
30
|
const u = (s) => {
|
|
@@ -38,16 +40,16 @@ async function* Z(e, t, g) {
|
|
|
38
40
|
type: "complete",
|
|
39
41
|
data: s
|
|
40
42
|
}), a = !0, r?.();
|
|
41
|
-
},
|
|
43
|
+
}, m = (s) => {
|
|
42
44
|
u({
|
|
43
45
|
type: "error",
|
|
44
46
|
data: s
|
|
45
47
|
}), a = !0, r?.();
|
|
46
|
-
},
|
|
48
|
+
}, l = (s) => u({
|
|
47
49
|
type: "toolCall",
|
|
48
50
|
data: s
|
|
49
51
|
});
|
|
50
|
-
e.on("message:start", f), e.on("message:chunk", o), e.on("message:complete", i), e.on("message:error",
|
|
52
|
+
e.on("message:start", f), e.on("message:chunk", o), e.on("message:complete", i), e.on("message:error", m), e.on("toolCall:received", l), e.sendMessage(t, g).catch(() => {
|
|
51
53
|
a = !0, r?.();
|
|
52
54
|
});
|
|
53
55
|
try {
|
|
@@ -55,7 +57,7 @@ async function* Z(e, t, g) {
|
|
|
55
57
|
r = s;
|
|
56
58
|
}), r = null);
|
|
57
59
|
} finally {
|
|
58
|
-
e.off("message:start", f), e.off("message:chunk", o), e.off("message:complete", i), e.off("message:error",
|
|
60
|
+
e.off("message:start", f), e.off("message:chunk", o), e.off("message:complete", i), e.off("message:error", m), e.off("toolCall:received", l);
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
function c(e) {
|
|
@@ -85,12 +87,12 @@ function c(e) {
|
|
|
85
87
|
debug: f
|
|
86
88
|
} : null;
|
|
87
89
|
}
|
|
88
|
-
function
|
|
90
|
+
function oe(e) {
|
|
89
91
|
const t = c(e);
|
|
90
92
|
if (!t) throw new Error('createAgo(): could not detect AGO configuration. Set window.AGO, add <meta name="ago-base-url">, or pass { baseUrl } explicitly.');
|
|
91
93
|
return new d(t);
|
|
92
94
|
}
|
|
93
|
-
function
|
|
95
|
+
function re(e, t) {
|
|
94
96
|
return {
|
|
95
97
|
...e,
|
|
96
98
|
handler: t
|
|
@@ -108,32 +110,33 @@ export {
|
|
|
108
110
|
S as FunctionRegistry,
|
|
109
111
|
v as SSEHandler,
|
|
110
112
|
c as autoDetectConfig,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
K as copyToClipboard,
|
|
114
|
+
oe as createAgo,
|
|
115
|
+
G as createConversationSession,
|
|
116
|
+
I as createFormCollector,
|
|
117
|
+
te as createMessageStream,
|
|
118
|
+
q as createMockClient,
|
|
119
|
+
T as createStore,
|
|
120
|
+
V as defineFunction,
|
|
121
|
+
$ as getLocalStorage,
|
|
122
|
+
J as getUserLocation,
|
|
123
|
+
L as highlightElement,
|
|
121
124
|
C as isStreamNetworkError,
|
|
122
125
|
k as logger,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
ee as onFunctionInvoke,
|
|
127
|
+
W as onMessage,
|
|
128
|
+
X as onMessageChunk,
|
|
129
|
+
Z as onMessageError,
|
|
130
|
+
Y as onMessageStart,
|
|
131
|
+
_ as onToolCall,
|
|
132
|
+
B as openUrl,
|
|
133
|
+
z as scrollToElement,
|
|
134
|
+
N as setLocalStorage,
|
|
135
|
+
R as setTheme,
|
|
136
|
+
Q as showConfirmDialog,
|
|
137
|
+
D as showNotification,
|
|
138
|
+
H as showToast,
|
|
139
|
+
P as submitForm,
|
|
140
|
+
j as trackEvent,
|
|
141
|
+
re as withHandler
|
|
139
142
|
};
|