@useago/sdk 1.0.11 → 1.1.0
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-QcTtrN7u.js → AgoClient-Cwx_eYSu.js} +182 -131
- package/dist/AgoClient-CzSmJQxl.cjs +6 -0
- package/dist/angular.cjs +1 -1
- package/dist/angular.d.cts +23 -0
- package/dist/angular.d.ts +23 -0
- package/dist/angular.js +1 -1
- package/dist/{createConversationSession-CR-71aLR.js → createConversationSession-B3h567tt.js} +1 -1
- package/dist/{createConversationSession-C0diFTUk.cjs → createConversationSession-DV0Xp_3O.cjs} +1 -1
- package/dist/{createFormCollector-BI3DXaew.cjs → createFormCollector-BB3Uscuo.cjs} +1 -1
- package/dist/{createFormCollector-CFt1_QSL.js → createFormCollector-CyWisAkI.js} +1 -1
- package/dist/devtools.d.cts +23 -0
- package/dist/devtools.d.ts +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +58 -55
- package/dist/react.cjs +3 -3
- package/dist/react.d.cts +23 -0
- package/dist/react.d.ts +23 -0
- package/dist/react.js +388 -295
- package/dist/testing.d.cts +23 -0
- package/dist/testing.d.ts +23 -0
- package/dist/vue.cjs +1 -1
- package/dist/vue.d.cts +119 -0
- package/dist/vue.d.ts +119 -0
- package/dist/vue.js +1 -1
- package/dist/widget.cjs +4 -4
- package/dist/widget.d.cts +23 -0
- package/dist/widget.d.ts +23 -0
- package/dist/widget.js +460 -387
- package/package.json +1 -1
- package/dist/AgoClient-B3-WGVne.cjs +0 -6
package/dist/testing.d.cts
CHANGED
|
@@ -7,6 +7,27 @@ declare interface AgoAgent {
|
|
|
7
7
|
displayName?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* An uploaded file attached to a message.
|
|
12
|
+
*
|
|
13
|
+
* `url` is a presigned, time-limited URL the backend generates per request (or a
|
|
14
|
+
* local `blob:` URL for an optimistic preview). `isSafeImage` is the backend's
|
|
15
|
+
* verdict that the file is a real, script-free image safe to embed inline; the
|
|
16
|
+
* UI only renders an `<img>` when it is true and otherwise shows a download link.
|
|
17
|
+
*/
|
|
18
|
+
declare interface AgoAttachment {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
/** MIME type reported by the backend (e.g. `image/png`). */
|
|
22
|
+
contentType?: string;
|
|
23
|
+
/** Size in bytes. */
|
|
24
|
+
fileSize?: number;
|
|
25
|
+
/** Presigned download/preview URL, or a local `blob:` URL before upload. */
|
|
26
|
+
url?: string;
|
|
27
|
+
/** True only when the backend verified the file is a safe inline image. */
|
|
28
|
+
isSafeImage: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
10
31
|
/**
|
|
11
32
|
* Main SDK client for AGO Chat integration
|
|
12
33
|
*/
|
|
@@ -363,6 +384,8 @@ declare interface AgoMessage {
|
|
|
363
384
|
sources?: AgoSource[];
|
|
364
385
|
toolCalls?: ToolCallData[];
|
|
365
386
|
followUpReplies?: string[];
|
|
387
|
+
/** Uploaded files on this message (usually the user's). */
|
|
388
|
+
attachments?: AgoAttachment[];
|
|
366
389
|
createdAt: Date;
|
|
367
390
|
}
|
|
368
391
|
|
package/dist/testing.d.ts
CHANGED
|
@@ -7,6 +7,27 @@ declare interface AgoAgent {
|
|
|
7
7
|
displayName?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* An uploaded file attached to a message.
|
|
12
|
+
*
|
|
13
|
+
* `url` is a presigned, time-limited URL the backend generates per request (or a
|
|
14
|
+
* local `blob:` URL for an optimistic preview). `isSafeImage` is the backend's
|
|
15
|
+
* verdict that the file is a real, script-free image safe to embed inline; the
|
|
16
|
+
* UI only renders an `<img>` when it is true and otherwise shows a download link.
|
|
17
|
+
*/
|
|
18
|
+
declare interface AgoAttachment {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
/** MIME type reported by the backend (e.g. `image/png`). */
|
|
22
|
+
contentType?: string;
|
|
23
|
+
/** Size in bytes. */
|
|
24
|
+
fileSize?: number;
|
|
25
|
+
/** Presigned download/preview URL, or a local `blob:` URL before upload. */
|
|
26
|
+
url?: string;
|
|
27
|
+
/** True only when the backend verified the file is a safe inline image. */
|
|
28
|
+
isSafeImage: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
10
31
|
/**
|
|
11
32
|
* Main SDK client for AGO Chat integration
|
|
12
33
|
*/
|
|
@@ -363,6 +384,8 @@ declare interface AgoMessage {
|
|
|
363
384
|
sources?: AgoSource[];
|
|
364
385
|
toolCalls?: ToolCallData[];
|
|
365
386
|
followUpReplies?: string[];
|
|
387
|
+
/** Uploaded files on this message (usually the user's). */
|
|
388
|
+
attachments?: AgoAttachment[];
|
|
366
389
|
createdAt: Date;
|
|
367
390
|
}
|
|
368
391
|
|
package/dist/vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./rolldown-runtime-16Nf8qvH.cjs"),p=require("./AgoClient-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./rolldown-runtime-16Nf8qvH.cjs"),p=require("./AgoClient-CzSmJQxl.cjs");let t=require("vue");var I=Symbol("ago-client"),y={install(o,n){const e=new p.AgoClient(n);o.provide(I,e)}};function g(o){if(o)return new p.AgoClient(o);const n=(0,t.inject)(I);if(!n)throw new Error("useAgo(): no AgoClient found. Either pass config or install AgoPlugin.");return n}function E(o={}){const n=o.client??g(),e=(0,t.ref)([]),s=(0,t.ref)(o.conversationId),i=(0,t.ref)(!1),r=(0,t.ref)(null),c=a=>{s.value||(s.value=a.conversationId)},f=a=>{const u=e.value.findIndex(v=>v.id===a.messageId);u>=0&&(e.value[u]={...e.value[u],content:e.value[u].content+a.content})},m=a=>{const u=e.value.findIndex(v=>v.id===a.id);u>=0?e.value[u]=a:e.value.push(a),i.value=!1},C=a=>{r.value=new Error(a.error),i.value=!1};(0,t.onMounted)(()=>{n.on("message:start",c),n.on("message:chunk",f),n.on("message:complete",m),n.on("message:error",C)}),(0,t.onUnmounted)(()=>{n.off("message:start",c),n.off("message:chunk",f),n.off("message:complete",m),n.off("message:error",C)});async function d(a,u){i.value=!0,r.value=null;const v={id:`temp-${Date.now()}`,conversationId:s.value||"",content:a,role:"user",status:"DONE",createdAt:new Date},L={id:`temp-assistant-${Date.now()}`,conversationId:s.value||"",content:"",role:"assistant",status:"IN_PROGRESS",createdAt:new Date};e.value.push(v,L);try{const l=await n.sendMessage(a,{conversationId:s.value,files:u});l.conversationId&&!s.value&&(s.value=l.conversationId),e.value=e.value.filter(w=>!w.id.startsWith("temp-"));const A={...v,id:v.id.replace("temp-","user-"),conversationId:l.conversationId};return e.value.some(w=>w.id===l.id)?e.value.push(A):e.value.push(A,l),l}catch(l){return r.value=l instanceof Error?l:new Error("Failed to send"),i.value=!1,e.value=e.value.filter(A=>!A.id.startsWith("temp-")),null}}function h(){e.value=[],s.value=void 0,r.value=null}return{messages:e,isLoading:i,error:r,conversationId:s,sendMessage:d,clearMessages:h}}function M(o={}){const n=o.client??g(),e=o.autoLoad??!0,s=(0,t.ref)([]),i=(0,t.ref)(null),r=(0,t.ref)(!1),c=(0,t.ref)(null);async function f(){r.value=!0,c.value=null;try{s.value=await n.getConversations()}catch(d){c.value=d instanceof Error?d:new Error("Failed to load conversations")}finally{r.value=!1}}async function m(d){r.value=!0,c.value=null;try{i.value=await n.getConversation(d)}catch(h){c.value=h instanceof Error?h:new Error("Failed to load conversation")}finally{r.value=!1}}function C(){i.value=null}return(0,t.onMounted)(()=>{e&&f()}),{conversations:s,currentConversation:i,isLoading:r,error:c,selectConversation:m,startNewConversation:C,refreshConversations:f}}function N(o={}){const n=E({client:o.client,conversationId:o.conversationId}),e=M({client:o.client,autoLoad:o.autoLoad}),s=(0,t.computed)(()=>n.error.value||e.error.value);return{messages:n.messages,isLoading:n.isLoading,error:s,sendMessage:n.sendMessage,clearMessages:n.clearMessages,conversationId:n.conversationId,conversations:e.conversations,currentConversation:e.currentConversation,isConversationsLoading:e.isLoading,selectConversation:e.selectConversation,startNewConversation:e.startNewConversation,refreshConversations:e.refreshConversations}}function F(o,n){const e=g();(0,t.onMounted)(()=>{e.registerFunction(o,n.handler,{description:n.description,parameters:n.parameters})}),(0,t.onUnmounted)(()=>{e.unregisterFunction(o)})}function S(o,n){const e=g();(0,t.onMounted)(()=>{e.registerNavigationFunction(o,n)}),(0,t.onUnmounted)(()=>{e.unregisterFunction("navigateToPage")})}function _(o,n){const e=g();(0,t.onMounted)(()=>{e.on(o,n)}),(0,t.onUnmounted)(()=>{e.off(o,n)})}function D(o){const n=(0,t.shallowRef)(o.get());return(0,t.onScopeDispose)(o.subscribe(e=>{n.value=e})),n}exports.AGO_CLIENT_KEY=I;exports.AgoPlugin=y;exports.useAgo=g;exports.useAgoEvents=_;exports.useAgoFunction=F;exports.useAgoNavigation=S;exports.useAgoStore=D;exports.useChat=N;exports.useConversation=M;exports.useMessages=E;
|
package/dist/vue.d.cts
CHANGED
|
@@ -15,6 +15,27 @@ export declare interface AgoAgent {
|
|
|
15
15
|
displayName?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* An uploaded file attached to a message.
|
|
20
|
+
*
|
|
21
|
+
* `url` is a presigned, time-limited URL the backend generates per request (or a
|
|
22
|
+
* local `blob:` URL for an optimistic preview). `isSafeImage` is the backend's
|
|
23
|
+
* verdict that the file is a real, script-free image safe to embed inline; the
|
|
24
|
+
* UI only renders an `<img>` when it is true and otherwise shows a download link.
|
|
25
|
+
*/
|
|
26
|
+
declare interface AgoAttachment {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
/** MIME type reported by the backend (e.g. `image/png`). */
|
|
30
|
+
contentType?: string;
|
|
31
|
+
/** Size in bytes. */
|
|
32
|
+
fileSize?: number;
|
|
33
|
+
/** Presigned download/preview URL, or a local `blob:` URL before upload. */
|
|
34
|
+
url?: string;
|
|
35
|
+
/** True only when the backend verified the file is a safe inline image. */
|
|
36
|
+
isSafeImage: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
/**
|
|
19
40
|
* Main SDK client for AGO Chat integration
|
|
20
41
|
*/
|
|
@@ -371,6 +392,8 @@ export declare interface AgoMessage {
|
|
|
371
392
|
sources?: AgoSource[];
|
|
372
393
|
toolCalls?: ToolCallData[];
|
|
373
394
|
followUpReplies?: string[];
|
|
395
|
+
/** Uploaded files on this message (usually the user's). */
|
|
396
|
+
attachments?: AgoAttachment[];
|
|
374
397
|
createdAt: Date;
|
|
375
398
|
}
|
|
376
399
|
|
|
@@ -833,6 +856,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
833
856
|
arguments?: Record<string, unknown> | undefined;
|
|
834
857
|
}[] | undefined;
|
|
835
858
|
followUpReplies?: string[] | undefined;
|
|
859
|
+
attachments?: {
|
|
860
|
+
id: string;
|
|
861
|
+
name: string;
|
|
862
|
+
contentType?: string | undefined;
|
|
863
|
+
fileSize?: number | undefined;
|
|
864
|
+
url?: string | undefined;
|
|
865
|
+
isSafeImage: boolean;
|
|
866
|
+
}[] | undefined;
|
|
836
867
|
createdAt: Date;
|
|
837
868
|
}[], AgoMessage[] | {
|
|
838
869
|
id: string;
|
|
@@ -867,6 +898,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
867
898
|
arguments?: Record<string, unknown> | undefined;
|
|
868
899
|
}[] | undefined;
|
|
869
900
|
followUpReplies?: string[] | undefined;
|
|
901
|
+
attachments?: {
|
|
902
|
+
id: string;
|
|
903
|
+
name: string;
|
|
904
|
+
contentType?: string | undefined;
|
|
905
|
+
fileSize?: number | undefined;
|
|
906
|
+
url?: string | undefined;
|
|
907
|
+
isSafeImage: boolean;
|
|
908
|
+
}[] | undefined;
|
|
870
909
|
createdAt: Date;
|
|
871
910
|
}[]>;
|
|
872
911
|
isLoading: Ref<boolean, boolean>;
|
|
@@ -911,6 +950,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
911
950
|
arguments?: Record<string, unknown> | undefined;
|
|
912
951
|
}[] | undefined;
|
|
913
952
|
followUpReplies?: string[] | undefined;
|
|
953
|
+
attachments?: {
|
|
954
|
+
id: string;
|
|
955
|
+
name: string;
|
|
956
|
+
contentType?: string | undefined;
|
|
957
|
+
fileSize?: number | undefined;
|
|
958
|
+
url?: string | undefined;
|
|
959
|
+
isSafeImage: boolean;
|
|
960
|
+
}[] | undefined;
|
|
914
961
|
createdAt: Date;
|
|
915
962
|
}[] | undefined;
|
|
916
963
|
}[], Conversation[] | {
|
|
@@ -950,6 +997,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
950
997
|
arguments?: Record<string, unknown> | undefined;
|
|
951
998
|
}[] | undefined;
|
|
952
999
|
followUpReplies?: string[] | undefined;
|
|
1000
|
+
attachments?: {
|
|
1001
|
+
id: string;
|
|
1002
|
+
name: string;
|
|
1003
|
+
contentType?: string | undefined;
|
|
1004
|
+
fileSize?: number | undefined;
|
|
1005
|
+
url?: string | undefined;
|
|
1006
|
+
isSafeImage: boolean;
|
|
1007
|
+
}[] | undefined;
|
|
953
1008
|
createdAt: Date;
|
|
954
1009
|
}[] | undefined;
|
|
955
1010
|
}[]>;
|
|
@@ -990,6 +1045,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
990
1045
|
arguments?: Record<string, unknown> | undefined;
|
|
991
1046
|
}[] | undefined;
|
|
992
1047
|
followUpReplies?: string[] | undefined;
|
|
1048
|
+
attachments?: {
|
|
1049
|
+
id: string;
|
|
1050
|
+
name: string;
|
|
1051
|
+
contentType?: string | undefined;
|
|
1052
|
+
fileSize?: number | undefined;
|
|
1053
|
+
url?: string | undefined;
|
|
1054
|
+
isSafeImage: boolean;
|
|
1055
|
+
}[] | undefined;
|
|
993
1056
|
createdAt: Date;
|
|
994
1057
|
}[] | undefined;
|
|
995
1058
|
} | null, Conversation | {
|
|
@@ -1029,6 +1092,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
1029
1092
|
arguments?: Record<string, unknown> | undefined;
|
|
1030
1093
|
}[] | undefined;
|
|
1031
1094
|
followUpReplies?: string[] | undefined;
|
|
1095
|
+
attachments?: {
|
|
1096
|
+
id: string;
|
|
1097
|
+
name: string;
|
|
1098
|
+
contentType?: string | undefined;
|
|
1099
|
+
fileSize?: number | undefined;
|
|
1100
|
+
url?: string | undefined;
|
|
1101
|
+
isSafeImage: boolean;
|
|
1102
|
+
}[] | undefined;
|
|
1032
1103
|
createdAt: Date;
|
|
1033
1104
|
}[] | undefined;
|
|
1034
1105
|
} | null>;
|
|
@@ -1089,6 +1160,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1089
1160
|
arguments?: Record<string, unknown> | undefined;
|
|
1090
1161
|
}[] | undefined;
|
|
1091
1162
|
followUpReplies?: string[] | undefined;
|
|
1163
|
+
attachments?: {
|
|
1164
|
+
id: string;
|
|
1165
|
+
name: string;
|
|
1166
|
+
contentType?: string | undefined;
|
|
1167
|
+
fileSize?: number | undefined;
|
|
1168
|
+
url?: string | undefined;
|
|
1169
|
+
isSafeImage: boolean;
|
|
1170
|
+
}[] | undefined;
|
|
1092
1171
|
createdAt: Date;
|
|
1093
1172
|
}[] | undefined;
|
|
1094
1173
|
}[], Conversation[] | {
|
|
@@ -1128,6 +1207,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1128
1207
|
arguments?: Record<string, unknown> | undefined;
|
|
1129
1208
|
}[] | undefined;
|
|
1130
1209
|
followUpReplies?: string[] | undefined;
|
|
1210
|
+
attachments?: {
|
|
1211
|
+
id: string;
|
|
1212
|
+
name: string;
|
|
1213
|
+
contentType?: string | undefined;
|
|
1214
|
+
fileSize?: number | undefined;
|
|
1215
|
+
url?: string | undefined;
|
|
1216
|
+
isSafeImage: boolean;
|
|
1217
|
+
}[] | undefined;
|
|
1131
1218
|
createdAt: Date;
|
|
1132
1219
|
}[] | undefined;
|
|
1133
1220
|
}[]>;
|
|
@@ -1168,6 +1255,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1168
1255
|
arguments?: Record<string, unknown> | undefined;
|
|
1169
1256
|
}[] | undefined;
|
|
1170
1257
|
followUpReplies?: string[] | undefined;
|
|
1258
|
+
attachments?: {
|
|
1259
|
+
id: string;
|
|
1260
|
+
name: string;
|
|
1261
|
+
contentType?: string | undefined;
|
|
1262
|
+
fileSize?: number | undefined;
|
|
1263
|
+
url?: string | undefined;
|
|
1264
|
+
isSafeImage: boolean;
|
|
1265
|
+
}[] | undefined;
|
|
1171
1266
|
createdAt: Date;
|
|
1172
1267
|
}[] | undefined;
|
|
1173
1268
|
} | null, Conversation | {
|
|
@@ -1207,6 +1302,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1207
1302
|
arguments?: Record<string, unknown> | undefined;
|
|
1208
1303
|
}[] | undefined;
|
|
1209
1304
|
followUpReplies?: string[] | undefined;
|
|
1305
|
+
attachments?: {
|
|
1306
|
+
id: string;
|
|
1307
|
+
name: string;
|
|
1308
|
+
contentType?: string | undefined;
|
|
1309
|
+
fileSize?: number | undefined;
|
|
1310
|
+
url?: string | undefined;
|
|
1311
|
+
isSafeImage: boolean;
|
|
1312
|
+
}[] | undefined;
|
|
1210
1313
|
createdAt: Date;
|
|
1211
1314
|
}[] | undefined;
|
|
1212
1315
|
} | null>;
|
|
@@ -1263,6 +1366,14 @@ export declare function useMessages(options?: UseMessagesOptions): {
|
|
|
1263
1366
|
arguments?: Record<string, unknown> | undefined;
|
|
1264
1367
|
}[] | undefined;
|
|
1265
1368
|
followUpReplies?: string[] | undefined;
|
|
1369
|
+
attachments?: {
|
|
1370
|
+
id: string;
|
|
1371
|
+
name: string;
|
|
1372
|
+
contentType?: string | undefined;
|
|
1373
|
+
fileSize?: number | undefined;
|
|
1374
|
+
url?: string | undefined;
|
|
1375
|
+
isSafeImage: boolean;
|
|
1376
|
+
}[] | undefined;
|
|
1266
1377
|
createdAt: Date;
|
|
1267
1378
|
}[], AgoMessage[] | {
|
|
1268
1379
|
id: string;
|
|
@@ -1297,6 +1408,14 @@ export declare function useMessages(options?: UseMessagesOptions): {
|
|
|
1297
1408
|
arguments?: Record<string, unknown> | undefined;
|
|
1298
1409
|
}[] | undefined;
|
|
1299
1410
|
followUpReplies?: string[] | undefined;
|
|
1411
|
+
attachments?: {
|
|
1412
|
+
id: string;
|
|
1413
|
+
name: string;
|
|
1414
|
+
contentType?: string | undefined;
|
|
1415
|
+
fileSize?: number | undefined;
|
|
1416
|
+
url?: string | undefined;
|
|
1417
|
+
isSafeImage: boolean;
|
|
1418
|
+
}[] | undefined;
|
|
1300
1419
|
createdAt: Date;
|
|
1301
1420
|
}[]>;
|
|
1302
1421
|
isLoading: Ref<boolean, boolean>;
|
package/dist/vue.d.ts
CHANGED
|
@@ -15,6 +15,27 @@ export declare interface AgoAgent {
|
|
|
15
15
|
displayName?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* An uploaded file attached to a message.
|
|
20
|
+
*
|
|
21
|
+
* `url` is a presigned, time-limited URL the backend generates per request (or a
|
|
22
|
+
* local `blob:` URL for an optimistic preview). `isSafeImage` is the backend's
|
|
23
|
+
* verdict that the file is a real, script-free image safe to embed inline; the
|
|
24
|
+
* UI only renders an `<img>` when it is true and otherwise shows a download link.
|
|
25
|
+
*/
|
|
26
|
+
declare interface AgoAttachment {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
/** MIME type reported by the backend (e.g. `image/png`). */
|
|
30
|
+
contentType?: string;
|
|
31
|
+
/** Size in bytes. */
|
|
32
|
+
fileSize?: number;
|
|
33
|
+
/** Presigned download/preview URL, or a local `blob:` URL before upload. */
|
|
34
|
+
url?: string;
|
|
35
|
+
/** True only when the backend verified the file is a safe inline image. */
|
|
36
|
+
isSafeImage: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
/**
|
|
19
40
|
* Main SDK client for AGO Chat integration
|
|
20
41
|
*/
|
|
@@ -371,6 +392,8 @@ export declare interface AgoMessage {
|
|
|
371
392
|
sources?: AgoSource[];
|
|
372
393
|
toolCalls?: ToolCallData[];
|
|
373
394
|
followUpReplies?: string[];
|
|
395
|
+
/** Uploaded files on this message (usually the user's). */
|
|
396
|
+
attachments?: AgoAttachment[];
|
|
374
397
|
createdAt: Date;
|
|
375
398
|
}
|
|
376
399
|
|
|
@@ -833,6 +856,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
833
856
|
arguments?: Record<string, unknown> | undefined;
|
|
834
857
|
}[] | undefined;
|
|
835
858
|
followUpReplies?: string[] | undefined;
|
|
859
|
+
attachments?: {
|
|
860
|
+
id: string;
|
|
861
|
+
name: string;
|
|
862
|
+
contentType?: string | undefined;
|
|
863
|
+
fileSize?: number | undefined;
|
|
864
|
+
url?: string | undefined;
|
|
865
|
+
isSafeImage: boolean;
|
|
866
|
+
}[] | undefined;
|
|
836
867
|
createdAt: Date;
|
|
837
868
|
}[], AgoMessage[] | {
|
|
838
869
|
id: string;
|
|
@@ -867,6 +898,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
867
898
|
arguments?: Record<string, unknown> | undefined;
|
|
868
899
|
}[] | undefined;
|
|
869
900
|
followUpReplies?: string[] | undefined;
|
|
901
|
+
attachments?: {
|
|
902
|
+
id: string;
|
|
903
|
+
name: string;
|
|
904
|
+
contentType?: string | undefined;
|
|
905
|
+
fileSize?: number | undefined;
|
|
906
|
+
url?: string | undefined;
|
|
907
|
+
isSafeImage: boolean;
|
|
908
|
+
}[] | undefined;
|
|
870
909
|
createdAt: Date;
|
|
871
910
|
}[]>;
|
|
872
911
|
isLoading: Ref<boolean, boolean>;
|
|
@@ -911,6 +950,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
911
950
|
arguments?: Record<string, unknown> | undefined;
|
|
912
951
|
}[] | undefined;
|
|
913
952
|
followUpReplies?: string[] | undefined;
|
|
953
|
+
attachments?: {
|
|
954
|
+
id: string;
|
|
955
|
+
name: string;
|
|
956
|
+
contentType?: string | undefined;
|
|
957
|
+
fileSize?: number | undefined;
|
|
958
|
+
url?: string | undefined;
|
|
959
|
+
isSafeImage: boolean;
|
|
960
|
+
}[] | undefined;
|
|
914
961
|
createdAt: Date;
|
|
915
962
|
}[] | undefined;
|
|
916
963
|
}[], Conversation[] | {
|
|
@@ -950,6 +997,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
950
997
|
arguments?: Record<string, unknown> | undefined;
|
|
951
998
|
}[] | undefined;
|
|
952
999
|
followUpReplies?: string[] | undefined;
|
|
1000
|
+
attachments?: {
|
|
1001
|
+
id: string;
|
|
1002
|
+
name: string;
|
|
1003
|
+
contentType?: string | undefined;
|
|
1004
|
+
fileSize?: number | undefined;
|
|
1005
|
+
url?: string | undefined;
|
|
1006
|
+
isSafeImage: boolean;
|
|
1007
|
+
}[] | undefined;
|
|
953
1008
|
createdAt: Date;
|
|
954
1009
|
}[] | undefined;
|
|
955
1010
|
}[]>;
|
|
@@ -990,6 +1045,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
990
1045
|
arguments?: Record<string, unknown> | undefined;
|
|
991
1046
|
}[] | undefined;
|
|
992
1047
|
followUpReplies?: string[] | undefined;
|
|
1048
|
+
attachments?: {
|
|
1049
|
+
id: string;
|
|
1050
|
+
name: string;
|
|
1051
|
+
contentType?: string | undefined;
|
|
1052
|
+
fileSize?: number | undefined;
|
|
1053
|
+
url?: string | undefined;
|
|
1054
|
+
isSafeImage: boolean;
|
|
1055
|
+
}[] | undefined;
|
|
993
1056
|
createdAt: Date;
|
|
994
1057
|
}[] | undefined;
|
|
995
1058
|
} | null, Conversation | {
|
|
@@ -1029,6 +1092,14 @@ export declare function useChat(options?: UseChatOptions): {
|
|
|
1029
1092
|
arguments?: Record<string, unknown> | undefined;
|
|
1030
1093
|
}[] | undefined;
|
|
1031
1094
|
followUpReplies?: string[] | undefined;
|
|
1095
|
+
attachments?: {
|
|
1096
|
+
id: string;
|
|
1097
|
+
name: string;
|
|
1098
|
+
contentType?: string | undefined;
|
|
1099
|
+
fileSize?: number | undefined;
|
|
1100
|
+
url?: string | undefined;
|
|
1101
|
+
isSafeImage: boolean;
|
|
1102
|
+
}[] | undefined;
|
|
1032
1103
|
createdAt: Date;
|
|
1033
1104
|
}[] | undefined;
|
|
1034
1105
|
} | null>;
|
|
@@ -1089,6 +1160,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1089
1160
|
arguments?: Record<string, unknown> | undefined;
|
|
1090
1161
|
}[] | undefined;
|
|
1091
1162
|
followUpReplies?: string[] | undefined;
|
|
1163
|
+
attachments?: {
|
|
1164
|
+
id: string;
|
|
1165
|
+
name: string;
|
|
1166
|
+
contentType?: string | undefined;
|
|
1167
|
+
fileSize?: number | undefined;
|
|
1168
|
+
url?: string | undefined;
|
|
1169
|
+
isSafeImage: boolean;
|
|
1170
|
+
}[] | undefined;
|
|
1092
1171
|
createdAt: Date;
|
|
1093
1172
|
}[] | undefined;
|
|
1094
1173
|
}[], Conversation[] | {
|
|
@@ -1128,6 +1207,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1128
1207
|
arguments?: Record<string, unknown> | undefined;
|
|
1129
1208
|
}[] | undefined;
|
|
1130
1209
|
followUpReplies?: string[] | undefined;
|
|
1210
|
+
attachments?: {
|
|
1211
|
+
id: string;
|
|
1212
|
+
name: string;
|
|
1213
|
+
contentType?: string | undefined;
|
|
1214
|
+
fileSize?: number | undefined;
|
|
1215
|
+
url?: string | undefined;
|
|
1216
|
+
isSafeImage: boolean;
|
|
1217
|
+
}[] | undefined;
|
|
1131
1218
|
createdAt: Date;
|
|
1132
1219
|
}[] | undefined;
|
|
1133
1220
|
}[]>;
|
|
@@ -1168,6 +1255,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1168
1255
|
arguments?: Record<string, unknown> | undefined;
|
|
1169
1256
|
}[] | undefined;
|
|
1170
1257
|
followUpReplies?: string[] | undefined;
|
|
1258
|
+
attachments?: {
|
|
1259
|
+
id: string;
|
|
1260
|
+
name: string;
|
|
1261
|
+
contentType?: string | undefined;
|
|
1262
|
+
fileSize?: number | undefined;
|
|
1263
|
+
url?: string | undefined;
|
|
1264
|
+
isSafeImage: boolean;
|
|
1265
|
+
}[] | undefined;
|
|
1171
1266
|
createdAt: Date;
|
|
1172
1267
|
}[] | undefined;
|
|
1173
1268
|
} | null, Conversation | {
|
|
@@ -1207,6 +1302,14 @@ export declare function useConversation(options?: UseConversationOptions): {
|
|
|
1207
1302
|
arguments?: Record<string, unknown> | undefined;
|
|
1208
1303
|
}[] | undefined;
|
|
1209
1304
|
followUpReplies?: string[] | undefined;
|
|
1305
|
+
attachments?: {
|
|
1306
|
+
id: string;
|
|
1307
|
+
name: string;
|
|
1308
|
+
contentType?: string | undefined;
|
|
1309
|
+
fileSize?: number | undefined;
|
|
1310
|
+
url?: string | undefined;
|
|
1311
|
+
isSafeImage: boolean;
|
|
1312
|
+
}[] | undefined;
|
|
1210
1313
|
createdAt: Date;
|
|
1211
1314
|
}[] | undefined;
|
|
1212
1315
|
} | null>;
|
|
@@ -1263,6 +1366,14 @@ export declare function useMessages(options?: UseMessagesOptions): {
|
|
|
1263
1366
|
arguments?: Record<string, unknown> | undefined;
|
|
1264
1367
|
}[] | undefined;
|
|
1265
1368
|
followUpReplies?: string[] | undefined;
|
|
1369
|
+
attachments?: {
|
|
1370
|
+
id: string;
|
|
1371
|
+
name: string;
|
|
1372
|
+
contentType?: string | undefined;
|
|
1373
|
+
fileSize?: number | undefined;
|
|
1374
|
+
url?: string | undefined;
|
|
1375
|
+
isSafeImage: boolean;
|
|
1376
|
+
}[] | undefined;
|
|
1266
1377
|
createdAt: Date;
|
|
1267
1378
|
}[], AgoMessage[] | {
|
|
1268
1379
|
id: string;
|
|
@@ -1297,6 +1408,14 @@ export declare function useMessages(options?: UseMessagesOptions): {
|
|
|
1297
1408
|
arguments?: Record<string, unknown> | undefined;
|
|
1298
1409
|
}[] | undefined;
|
|
1299
1410
|
followUpReplies?: string[] | undefined;
|
|
1411
|
+
attachments?: {
|
|
1412
|
+
id: string;
|
|
1413
|
+
name: string;
|
|
1414
|
+
contentType?: string | undefined;
|
|
1415
|
+
fileSize?: number | undefined;
|
|
1416
|
+
url?: string | undefined;
|
|
1417
|
+
isSafeImage: boolean;
|
|
1418
|
+
}[] | undefined;
|
|
1300
1419
|
createdAt: Date;
|
|
1301
1420
|
}[]>;
|
|
1302
1421
|
isLoading: Ref<boolean, boolean>;
|
package/dist/vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as A } from "./AgoClient-
|
|
1
|
+
import { t as A } from "./AgoClient-Cwx_eYSu.js";
|
|
2
2
|
import { computed as y, inject as F, onMounted as g, onScopeDispose as N, onUnmounted as I, ref as c, shallowRef as D } from "vue";
|
|
3
3
|
var L = /* @__PURE__ */ Symbol("ago-client"), b = { install(t, n) {
|
|
4
4
|
const e = new A(n);
|