@scalar/agent-chat 0.3.2 → 0.3.4
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/App.vue.d.ts +4 -5
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +16 -14
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +43 -16
- package/dist/api.d.ts +53 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +67 -37
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +1 -1
- package/dist/components/ApprovalSection.vue2.js +19 -28
- package/dist/components/AuthenticationProvided.vue.js +8 -8
- package/dist/components/PaymentSection.vue.d.ts +1 -7
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +2 -2
- package/dist/components/PaymentSection.vue2.js +21 -21
- package/dist/components/ResponseBody/helpers/media-types.d.ts +0 -4
- package/dist/components/ResponseBody/helpers/media-types.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/media-types.js +0 -1
- package/dist/entities/registry/document.d.ts +3 -1
- package/dist/entities/registry/document.d.ts.map +1 -1
- package/dist/helpers.d.ts +8 -67
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +66 -57
- package/dist/hooks/use-agent-key-documents.d.ts +2 -0
- package/dist/hooks/use-agent-key-documents.d.ts.map +1 -0
- package/dist/hooks/use-agent-key-documents.js +16 -0
- package/dist/hooks/use-curated-documents.d.ts +2 -0
- package/dist/hooks/use-curated-documents.d.ts.map +1 -0
- package/dist/hooks/use-curated-documents.js +12 -0
- package/dist/hooks/use-search.d.ts +4 -8
- package/dist/hooks/use-search.d.ts.map +1 -1
- package/dist/hooks/use-search.js +14 -18
- package/dist/hooks/use-term-and-conditions.d.ts +0 -1
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -1
- package/dist/hooks/use-term-and-conditions.js +0 -1
- package/dist/hooks/use-upload-tmp-document.d.ts +6 -2
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -1
- package/dist/hooks/use-upload-tmp-document.js +45 -23
- package/dist/package.json +1 -1
- package/dist/registry/add-documents-to-store.d.ts +6 -5
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +16 -20
- package/dist/state/state.d.ts +16 -7
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +92 -78
- package/dist/style.css +1 -1
- package/dist/views/Chat/Chat.vue.js +2 -2
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +1 -1
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +2 -2
- package/dist/views/PromptForm.vue2.js +118 -104
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +2 -2
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +2 -2
- package/dist/views/Settings/Settings.vue2.js +33 -31
- package/package.json +8 -8
- package/dist/components/Suggestion.vue.d.ts +0 -10
- package/dist/components/Suggestion.vue.d.ts.map +0 -1
- package/dist/components/TestRequestButton.vue.d.ts +0 -8
- package/dist/components/TestRequestButton.vue.d.ts.map +0 -1
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
import { bundle as f } from "@scalar/json-magic/bundle";
|
|
2
2
|
import { fetchUrls as l } from "@scalar/json-magic/bundle/plugins/browser";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
async function R({
|
|
3
|
+
import { restoreAuthSecretsFromStorage as p } from "../helpers.js";
|
|
4
|
+
import { createDocumentName as D } from "./create-document-name.js";
|
|
5
|
+
async function x({
|
|
7
6
|
namespace: t,
|
|
8
7
|
slug: e,
|
|
9
8
|
workspaceStore: o,
|
|
10
|
-
registryDocuments:
|
|
11
|
-
registryUrl:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
registryDocuments: r,
|
|
10
|
+
registryUrl: m,
|
|
11
|
+
config: u,
|
|
12
|
+
api: c,
|
|
13
|
+
removable: i
|
|
15
14
|
}) {
|
|
16
|
-
const a = await
|
|
17
|
-
baseUrl: u,
|
|
18
|
-
getAccessToken: i
|
|
19
|
-
}).getDocument({
|
|
15
|
+
const a = await c.getDocument({
|
|
20
16
|
namespace: t,
|
|
21
17
|
slug: e
|
|
22
18
|
});
|
|
23
19
|
if (!a.success)
|
|
24
20
|
return;
|
|
25
|
-
|
|
26
|
-
const s = new URL(`/@${t}/apis/${e}/latest`,
|
|
21
|
+
r.value.push({ ...a.data, removable: i });
|
|
22
|
+
const s = new URL(`/@${t}/apis/${e}/latest`, m), d = await f(s.toString(), {
|
|
27
23
|
plugins: [l()],
|
|
28
24
|
treeShake: !1
|
|
29
|
-
}),
|
|
25
|
+
}), n = D(t, e);
|
|
30
26
|
return await o.addDocument(
|
|
31
27
|
{
|
|
32
|
-
name:
|
|
28
|
+
name: n,
|
|
33
29
|
document: d
|
|
34
30
|
},
|
|
35
|
-
|
|
36
|
-
), o.update("x-scalar-active-document",
|
|
31
|
+
u
|
|
32
|
+
), o.update("x-scalar-active-document", n), p({ documentName: n, workspaceStore: o }), a.data;
|
|
37
33
|
}
|
|
38
34
|
export {
|
|
39
|
-
|
|
35
|
+
x as loadDocument
|
|
40
36
|
};
|
package/dist/state/state.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Chat } from '@ai-sdk/vue';
|
|
2
2
|
import { type ModalState } from '@scalar/components';
|
|
3
3
|
import { type ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
4
|
-
import type
|
|
4
|
+
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
5
5
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
6
6
|
import { type UIDataTypes, type UIMessage } from 'ai';
|
|
7
7
|
import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
|
|
8
|
+
import { type Api } from '../api.js';
|
|
8
9
|
import type { ApiMetadata } from '../entities/registry/document.js';
|
|
9
10
|
import type { ASK_FOR_AUTHENTICATION_TOOL_NAME, AskForAuthenticationInput } from '../entities/tools/ask-for-authentication.js';
|
|
10
11
|
import type { EXECUTE_REQUEST_TOOL_NAME, ExecuteRequestToolInput, ExecuteRequestToolOutput } from '../entities/tools/execute-request.js';
|
|
@@ -44,6 +45,7 @@ type State = {
|
|
|
44
45
|
proxyUrl: Ref<string | undefined>;
|
|
45
46
|
config: ComputedRef<ApiReferenceConfigurationRaw>;
|
|
46
47
|
registryUrl: string;
|
|
48
|
+
dashboardUrl: string;
|
|
47
49
|
baseUrl: string;
|
|
48
50
|
registryDocuments: Ref<ApiMetadata[]>;
|
|
49
51
|
mode: ChatMode;
|
|
@@ -54,24 +56,31 @@ type State = {
|
|
|
54
56
|
addDocument: (document: {
|
|
55
57
|
namespace: string;
|
|
56
58
|
slug: string;
|
|
57
|
-
|
|
59
|
+
removable?: boolean;
|
|
60
|
+
}) => Promise<void>;
|
|
58
61
|
removeDocument: (document: {
|
|
59
62
|
namespace: string;
|
|
60
63
|
slug: string;
|
|
61
64
|
}) => void;
|
|
62
|
-
getAccessToken
|
|
65
|
+
getAccessToken?: () => string;
|
|
66
|
+
getAgentKey?: () => string;
|
|
67
|
+
api: Api;
|
|
68
|
+
uploadedTmpDocumentUrl: Ref<string | undefined>;
|
|
69
|
+
curatedDocuments: Ref<ApiMetadata[]>;
|
|
70
|
+
getActiveDocumentJson?: () => string;
|
|
63
71
|
};
|
|
64
|
-
export declare function createState({
|
|
65
|
-
eventBus: WorkspaceEventBus;
|
|
66
|
-
workspaceStore: WorkspaceStore;
|
|
72
|
+
export declare function createState({ initialRegistryDocuments, registryUrl, dashboardUrl, baseUrl, mode, getAccessToken, getAgentKey, getActiveDocumentJson, }: {
|
|
67
73
|
initialRegistryDocuments: {
|
|
68
74
|
namespace: string;
|
|
69
75
|
slug: string;
|
|
70
76
|
}[];
|
|
71
77
|
registryUrl: string;
|
|
78
|
+
dashboardUrl: string;
|
|
72
79
|
baseUrl: string;
|
|
73
80
|
mode: ChatMode;
|
|
74
|
-
getAccessToken
|
|
81
|
+
getAccessToken?: () => string;
|
|
82
|
+
getAgentKey?: () => string;
|
|
83
|
+
getActiveDocumentJson?: () => string;
|
|
75
84
|
}): State;
|
|
76
85
|
export declare function useState(): State;
|
|
77
86
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,KAAK,4BAA4B,EAAmC,MAAM,6BAA6B,CAAA;AAChH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,KAAK,4BAA4B,EAAmC,MAAM,6BAA6B,CAAA;AAChH,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,IAAI,CAAA;AACX,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAgC,MAAM,KAAK,CAAA;AAEjG,OAAO,EAAE,KAAK,GAAG,EAAyC,MAAM,OAAO,CAAA;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EACV,gCAAgC,EAChC,yBAAyB,E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AAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;CACrC,GAAG,KAAK,CA8GR;AAED,wBAAgB,QAAQ,UAQvB"}
|
package/dist/state/state.js
CHANGED
|
@@ -1,110 +1,124 @@
|
|
|
1
|
-
import { Chat as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { apiReferenceConfigurationSchema as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { Chat as W } from "@ai-sdk/vue";
|
|
2
|
+
import { useModal as b } from "@scalar/components";
|
|
3
|
+
import { apiReferenceConfigurationSchema as k } from "@scalar/types/api-reference";
|
|
4
|
+
import { createWorkspaceStore as L } from "@scalar/workspace-store/client";
|
|
5
|
+
import { createWorkspaceEventBus as N } from "@scalar/workspace-store/events";
|
|
6
|
+
import { DefaultChatTransport as O, lastAssistantMessageIsCompleteWithApprovalResponses as R } from "ai";
|
|
7
|
+
import { ref as s, computed as y, watch as Y, inject as _ } from "vue";
|
|
8
|
+
import { createApi as j, createAuthorizationHeaders as z } from "../api.js";
|
|
9
|
+
import { createDocumentSettings as H, makeScalarProxyUrl as I } from "../helpers.js";
|
|
10
|
+
import { useTermsAndConditions as P } from "../hooks/use-term-and-conditions.js";
|
|
11
|
+
import { loadDocument as U } from "../registry/add-documents-to-store.js";
|
|
12
|
+
import { createDocumentName as $ } from "../registry/create-document-name.js";
|
|
13
|
+
const q = /* @__PURE__ */ Symbol("STATE_SYMBOL");
|
|
14
|
+
function F({
|
|
15
|
+
registryDocuments: o,
|
|
16
|
+
workspaceStore: c,
|
|
17
|
+
baseUrl: u,
|
|
18
|
+
getAccessToken: n,
|
|
19
|
+
getAgentKey: p
|
|
16
20
|
}) {
|
|
17
|
-
return new
|
|
18
|
-
sendAutomaticallyWhen:
|
|
19
|
-
transport: new
|
|
20
|
-
api: `${
|
|
21
|
-
headers: () => {
|
|
22
|
-
const n = i();
|
|
23
|
-
return {
|
|
24
|
-
...n && {
|
|
25
|
-
Authorization: `Bearer ${n}`
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
},
|
|
21
|
+
return new W({
|
|
22
|
+
sendAutomaticallyWhen: R,
|
|
23
|
+
transport: new O({
|
|
24
|
+
api: I(`${u}/vector/openapi/chat`),
|
|
25
|
+
headers: () => z({ getAccessToken: n, getAgentKey: p }),
|
|
29
26
|
body: () => ({
|
|
30
|
-
registryDocuments:
|
|
31
|
-
documentSettings:
|
|
27
|
+
registryDocuments: o.value,
|
|
28
|
+
documentSettings: H(c)
|
|
32
29
|
})
|
|
33
30
|
})
|
|
34
31
|
});
|
|
35
32
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
registryUrl: i,
|
|
33
|
+
function st({
|
|
34
|
+
initialRegistryDocuments: o,
|
|
35
|
+
registryUrl: c,
|
|
36
|
+
dashboardUrl: u,
|
|
41
37
|
baseUrl: n,
|
|
42
|
-
mode:
|
|
43
|
-
getAccessToken:
|
|
38
|
+
mode: p,
|
|
39
|
+
getAccessToken: f,
|
|
40
|
+
getAgentKey: l,
|
|
41
|
+
getActiveDocumentJson: w
|
|
44
42
|
}) {
|
|
45
|
-
const
|
|
46
|
-
() =>
|
|
47
|
-
proxyUrl:
|
|
43
|
+
const d = s(""), r = s([]), x = s([]), h = s("https://proxy.scalar.com"), C = s(), M = P(), A = N(), m = L(), v = y(
|
|
44
|
+
() => k.parse({
|
|
45
|
+
proxyUrl: h.value,
|
|
48
46
|
persistAuth: !0
|
|
49
47
|
})
|
|
50
|
-
), a =
|
|
48
|
+
), a = F({
|
|
51
49
|
registryDocuments: r,
|
|
52
|
-
workspaceStore:
|
|
50
|
+
workspaceStore: m,
|
|
53
51
|
baseUrl: n,
|
|
54
|
-
getAccessToken:
|
|
55
|
-
|
|
52
|
+
getAccessToken: f,
|
|
53
|
+
getAgentKey: l
|
|
54
|
+
}), D = j({
|
|
55
|
+
baseUrl: n,
|
|
56
|
+
getAccessToken: f,
|
|
57
|
+
getAgentKey: l
|
|
58
|
+
}), E = y(
|
|
56
59
|
() => a.status === "submitted" || a.status === "streaming" && !a.lastMessage?.parts.some((t) => t.type === "text")
|
|
57
60
|
);
|
|
58
|
-
|
|
61
|
+
Y(
|
|
59
62
|
() => a.status,
|
|
60
63
|
() => {
|
|
61
|
-
a.status === "streaming" && (
|
|
64
|
+
a.status === "streaming" && (d.value = "");
|
|
62
65
|
}
|
|
63
66
|
);
|
|
64
|
-
const
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
+
const T = b();
|
|
68
|
+
async function S({
|
|
69
|
+
namespace: t,
|
|
70
|
+
slug: e,
|
|
71
|
+
removable: i = !0
|
|
72
|
+
}) {
|
|
73
|
+
r.value.find((g) => g.namespace === t && g.slug === e) || await U({
|
|
67
74
|
namespace: t,
|
|
68
|
-
slug:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
registryUrl: i,
|
|
75
|
+
slug: e,
|
|
76
|
+
workspaceStore: m,
|
|
77
|
+
registryUrl: c,
|
|
72
78
|
registryDocuments: r,
|
|
73
|
-
config:
|
|
74
|
-
|
|
79
|
+
config: v.value,
|
|
80
|
+
api: D,
|
|
81
|
+
removable: i
|
|
75
82
|
});
|
|
76
83
|
}
|
|
77
|
-
function
|
|
84
|
+
function B({ namespace: t, slug: e }) {
|
|
78
85
|
r.value = r.value.filter(
|
|
79
|
-
(
|
|
80
|
-
),
|
|
86
|
+
(i) => !(i.namespace === t && i.slug === e)
|
|
87
|
+
), m.deleteDocument($(t, e));
|
|
81
88
|
}
|
|
82
|
-
return
|
|
83
|
-
prompt:
|
|
89
|
+
return o.forEach(({ namespace: t, slug: e }) => S({ namespace: t, slug: e, removable: !1 })), {
|
|
90
|
+
prompt: d,
|
|
84
91
|
chat: a,
|
|
85
|
-
workspaceStore:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
config:
|
|
90
|
-
registryUrl:
|
|
92
|
+
workspaceStore: m,
|
|
93
|
+
eventBus: A,
|
|
94
|
+
loading: E,
|
|
95
|
+
settingsModal: T,
|
|
96
|
+
config: v,
|
|
97
|
+
registryUrl: c,
|
|
98
|
+
dashboardUrl: u,
|
|
91
99
|
baseUrl: n,
|
|
92
100
|
registryDocuments: r,
|
|
93
|
-
proxyUrl:
|
|
94
|
-
mode:
|
|
95
|
-
terms:
|
|
96
|
-
addDocument:
|
|
97
|
-
removeDocument:
|
|
98
|
-
getAccessToken:
|
|
101
|
+
proxyUrl: h,
|
|
102
|
+
mode: p,
|
|
103
|
+
terms: M,
|
|
104
|
+
addDocument: S,
|
|
105
|
+
removeDocument: B,
|
|
106
|
+
getAccessToken: f,
|
|
107
|
+
getAgentKey: l,
|
|
108
|
+
api: D,
|
|
109
|
+
uploadedTmpDocumentUrl: C,
|
|
110
|
+
curatedDocuments: x,
|
|
111
|
+
getActiveDocumentJson: w
|
|
99
112
|
};
|
|
100
113
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
if (!
|
|
104
|
-
|
|
114
|
+
function ct() {
|
|
115
|
+
const o = _(q);
|
|
116
|
+
if (!o)
|
|
117
|
+
throw new Error("No state provided.");
|
|
118
|
+
return o;
|
|
105
119
|
}
|
|
106
120
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
121
|
+
q as STATE_SYMBOL,
|
|
122
|
+
st as createState,
|
|
123
|
+
ct as useState
|
|
110
124
|
};
|