@scalar/agent-chat 0.5.18 → 0.7.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/App.vue.d.ts +2 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/api.d.ts +3 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +54 -53
- package/dist/client-tools/execute-request.d.ts +1 -0
- package/dist/client-tools/execute-request.d.ts.map +1 -1
- package/dist/client-tools/execute-request.js +33 -27
- package/dist/components/FreeMessagesInfoSection.vue.d.ts.map +1 -1
- package/dist/components/FreeMessagesInfoSection.vue.js +1 -1
- package/dist/components/FreeMessagesInfoSection.vue2.js +27 -25
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +1 -1
- package/dist/components/PaymentSection.vue2.js +16 -20
- package/dist/components/ServerSelector.vue.d.ts.map +1 -1
- package/dist/components/ServerSelector.vue.js +27 -21
- package/dist/components/UploadSection.vue.js +2 -2
- package/dist/components/UploadSection.vue2.js +13 -13
- package/dist/consts/urls.d.ts +8 -0
- package/dist/consts/urls.d.ts.map +1 -0
- package/dist/consts/urls.js +10 -0
- package/dist/helpers.d.ts +4 -10
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +34 -45
- package/dist/hooks/use-agent-key-documents.js +6 -6
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -1
- package/dist/hooks/use-chat-approvals.js +7 -6
- package/dist/hooks/use-signup-link.d.ts +12 -0
- package/dist/hooks/use-signup-link.d.ts.map +1 -0
- package/dist/hooks/use-signup-link.js +12 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +3 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -1
- package/dist/hooks/use-upload-tmp-document.js +31 -28
- package/dist/package.json +1 -1
- package/dist/state/state.d.ts +2 -1
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +134 -127
- package/dist/style.css +1 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +1 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +12 -12
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +2 -2
- package/dist/views/PromptForm.vue2.js +100 -93
- package/dist/views/Settings/DocSettings.vue.js +1 -1
- package/dist/views/Settings/DocSettings.vue2.js +10 -10
- 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 +53 -43
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +1 -1
- package/dist/views/Start.vue2.js +28 -27
- package/package.json +8 -8
package/dist/App.vue.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ declare const state: {
|
|
|
21
21
|
loading: import("vue").ComputedRef<boolean>;
|
|
22
22
|
settingsModal: import("@scalar/components").ModalState;
|
|
23
23
|
eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
|
|
24
|
-
proxyUrl:
|
|
24
|
+
proxyUrl: import("vue").ComputedRef<string>;
|
|
25
|
+
proxyUrlRaw: Ref<string | undefined>;
|
|
25
26
|
config: import("vue").ComputedRef<import("@scalar/types/api-reference").ApiReferenceConfigurationRaw>;
|
|
26
27
|
registryUrl: string;
|
|
27
28
|
dashboardUrl: string;
|
package/dist/App.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":"AAsEA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAqBF,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":"AAsEA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAqBF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;iBA+BwC,CAAC;;;;;iBAIrC,CAAC;;;;;;;;;;;;;CAvBd,CAAA;AAIF,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,OAAO,KAAK,CAAC,gBAAgB,CAAA;CAChD,CAAA;AA8CD,QAAA,MAAM,YAAY;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
1
2
|
export declare function createAuthorizationHeaders({ getAccessToken, getAgentKey, }: {
|
|
2
3
|
getAccessToken?: () => string;
|
|
3
4
|
getAgentKey?: () => string;
|
|
@@ -6,8 +7,9 @@ export declare function createAuthorizationHeaders({ getAccessToken, getAgentKey
|
|
|
6
7
|
Authorization?: string | undefined;
|
|
7
8
|
};
|
|
8
9
|
/** Minimal set of API requests needed for agent chat */
|
|
9
|
-
export declare function createApi({ baseUrl, getAccessToken, getAgentKey, }: {
|
|
10
|
+
export declare function createApi({ baseUrl, proxyUrl, getAccessToken, getAgentKey, }: {
|
|
10
11
|
baseUrl: string;
|
|
12
|
+
proxyUrl: Ref<string>;
|
|
11
13
|
getAccessToken?: () => string;
|
|
12
14
|
getAgentKey?: () => string;
|
|
13
15
|
}): {
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAM9B,wBAAgB,0BAA0B,CAAC,EACzC,cAAc,EACd,WAAW,GACZ,EAAE;IACD,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;CAC3B;;;EAYA;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,QAAQ,EACR,cAAc,EACd,WAAW,GACZ,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;CAC3B;oBA0E8B,MAAM;;;;;;;;;;;;;;;;;;;;;0BASA;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BvE;AAED,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
package/dist/api.js
CHANGED
|
@@ -1,98 +1,99 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { redirectToProxy as E } from "@scalar/helpers/url/redirect-to-proxy";
|
|
2
|
+
import { n as d } from "neverpanic";
|
|
2
3
|
import t from "zod";
|
|
3
|
-
import { createError as
|
|
4
|
-
import { registryApiMetadata as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
getAgentKey: i
|
|
4
|
+
import { createError as s } from "./entities/error/helpers.js";
|
|
5
|
+
import { registryApiMetadata as u } from "./entities/registry/document.js";
|
|
6
|
+
function R({
|
|
7
|
+
getAccessToken: i,
|
|
8
|
+
getAgentKey: m
|
|
9
9
|
}) {
|
|
10
|
-
const
|
|
10
|
+
const a = i?.(), c = m?.();
|
|
11
11
|
return {
|
|
12
|
-
...
|
|
13
|
-
Authorization: `Bearer ${
|
|
12
|
+
...a && {
|
|
13
|
+
Authorization: `Bearer ${a}`
|
|
14
14
|
},
|
|
15
|
-
...
|
|
16
|
-
"x-scalar-agent-key":
|
|
15
|
+
...c && {
|
|
16
|
+
"x-scalar-agent-key": c
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
baseUrl:
|
|
22
|
-
|
|
20
|
+
function T({
|
|
21
|
+
baseUrl: i,
|
|
22
|
+
proxyUrl: m,
|
|
23
|
+
getAccessToken: a,
|
|
23
24
|
getAgentKey: c
|
|
24
25
|
}) {
|
|
25
|
-
const
|
|
26
|
+
const o = d.safeFn(
|
|
26
27
|
async ({
|
|
27
|
-
path:
|
|
28
|
-
method:
|
|
28
|
+
path: r,
|
|
29
|
+
method: h = "get",
|
|
29
30
|
query: p,
|
|
30
|
-
body:
|
|
31
|
-
responseSchema:
|
|
31
|
+
body: y,
|
|
32
|
+
responseSchema: l
|
|
32
33
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
async () => fetch(D
|
|
35
|
-
method:
|
|
36
|
-
...
|
|
34
|
+
const D = `${i}${r}${p ? `?${new URLSearchParams(p)}` : ""}`, n = await d.fromUnsafe(
|
|
35
|
+
async () => fetch(E(m.value, D), {
|
|
36
|
+
method: h,
|
|
37
|
+
...y && { body: JSON.stringify(y) },
|
|
37
38
|
headers: {
|
|
38
|
-
...
|
|
39
|
+
...R({ getAccessToken: a, getAgentKey: c })
|
|
39
40
|
}
|
|
40
41
|
}),
|
|
41
|
-
(
|
|
42
|
+
(e) => s("FAILED_TO_FETCH", e)
|
|
42
43
|
);
|
|
43
|
-
if (!
|
|
44
|
-
return
|
|
45
|
-
const
|
|
46
|
-
async () =>
|
|
47
|
-
(
|
|
44
|
+
if (!n.success)
|
|
45
|
+
return n;
|
|
46
|
+
const f = await d.fromUnsafe(
|
|
47
|
+
async () => n.data.json(),
|
|
48
|
+
(e) => s("FAILED_TO_FETCH_DATA", e)
|
|
48
49
|
);
|
|
49
|
-
if (!
|
|
50
|
+
if (!f.success)
|
|
50
51
|
return {
|
|
51
52
|
success: !1,
|
|
52
|
-
error:
|
|
53
|
+
error: s("UNKNOWN_ERROR", "Unknown error occurred. Please contact support.")
|
|
53
54
|
};
|
|
54
|
-
if (!
|
|
55
|
-
const
|
|
56
|
-
return
|
|
55
|
+
if (!n.data.ok) {
|
|
56
|
+
const e = t.object({ message: t.string(), code: t.string() }).safeParse(f.data);
|
|
57
|
+
return e.success ? {
|
|
57
58
|
success: !1,
|
|
58
|
-
error:
|
|
59
|
+
error: s(e.data.code, e.data.message)
|
|
59
60
|
} : {
|
|
60
61
|
success: !1,
|
|
61
|
-
error:
|
|
62
|
+
error: s("UNKNOWN_ERROR", "Unknown error occurred. Please contact support.")
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
return
|
|
65
|
+
const g = l.safeParse(f.data);
|
|
66
|
+
return g.success ? { success: !0, data: g.data } : {
|
|
66
67
|
success: !1,
|
|
67
|
-
error:
|
|
68
|
+
error: s("INVALID_RESPONSE", "Invalid response. Please contact support")
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
);
|
|
71
72
|
return {
|
|
72
|
-
search: async (
|
|
73
|
+
search: async (r) => o({
|
|
73
74
|
path: "/vector/registry/search",
|
|
74
|
-
query: { query:
|
|
75
|
+
query: { query: r },
|
|
75
76
|
responseSchema: t.object({
|
|
76
|
-
results:
|
|
77
|
+
results: u.array()
|
|
77
78
|
})
|
|
78
79
|
}),
|
|
79
|
-
getDocument: async (
|
|
80
|
-
path: `/vector/registry/document/${
|
|
81
|
-
responseSchema:
|
|
80
|
+
getDocument: async (r) => o({
|
|
81
|
+
path: `/vector/registry/document/${r.namespace}/${r.slug}`,
|
|
82
|
+
responseSchema: u
|
|
82
83
|
}),
|
|
83
|
-
getKeyDocuments: async () =>
|
|
84
|
+
getKeyDocuments: async () => o({
|
|
84
85
|
path: "/vector/registry/documents",
|
|
85
|
-
responseSchema: t.object({ documents:
|
|
86
|
+
responseSchema: t.object({ documents: u.array() })
|
|
86
87
|
}),
|
|
87
|
-
getCuratedDocuments: async () =>
|
|
88
|
+
getCuratedDocuments: async () => o({
|
|
88
89
|
path: "/vector/registry/curated",
|
|
89
90
|
responseSchema: t.object({
|
|
90
|
-
results:
|
|
91
|
+
results: u.array()
|
|
91
92
|
})
|
|
92
93
|
})
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
T as createApi,
|
|
98
|
+
R as createAuthorizationHeaders
|
|
98
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../src/client-tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAOhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../src/client-tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AAEzG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAA;AAOhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AA8E1C;;GAEG;AACH,eAAO,MAAM,kBAAkB;sBAQT,MAAM,CACtB,MAAM,EACN;QAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;QAAC,eAAe,EAAE,0BAA0B,EAAE,CAAA;KAAE,CACrF;gBACW,MAAM;UACZ,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;cACxC,MAAM;WACT;QACL,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,kBAAkB,EAAE,MAAM,CAAA;KAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAsDJ,CAAA"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { buildRequestSecurity as
|
|
2
|
-
import { redirectToProxy as
|
|
1
|
+
import { buildRequestSecurity as N, getResolvedUrl as y } from "@scalar/api-client/v2/blocks/operation-block";
|
|
2
|
+
import { redirectToProxy as D } from "@scalar/helpers/url/redirect-to-proxy";
|
|
3
3
|
import { n as u } from "neverpanic";
|
|
4
|
-
import
|
|
4
|
+
import R from "truncate-json";
|
|
5
5
|
import { createError as o } from "../entities/error/helpers.js";
|
|
6
|
-
import { createDocumentName as
|
|
7
|
-
import { TOOL_NAMESPACE_SLUG_DELIMITER as
|
|
8
|
-
import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as
|
|
9
|
-
const
|
|
6
|
+
import { createDocumentName as h } from "../registry/create-document-name.js";
|
|
7
|
+
import { TOOL_NAMESPACE_SLUG_DELIMITER as U } from "../entities/tools/constants.js";
|
|
8
|
+
import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as v } from "../entities/tools/execute-request.js";
|
|
9
|
+
const I = 5e4, L = u.safeFn(
|
|
10
10
|
async (e) => e.headers.get("content-type") === "application/json" ? { success: !0, data: await e.json() } : { success: !0, data: await e.text() },
|
|
11
11
|
(e) => o("FAILED_TO_PARSE_RESPONSE_BODY", { originalError: e })
|
|
12
|
-
), T = (e) => JSON.parse(
|
|
12
|
+
), T = (e) => JSON.parse(R(JSON.stringify(e), I).jsonString), A = u.safeFn(
|
|
13
13
|
async (e, r) => {
|
|
14
|
-
const t = await fetch(e, r), s = await
|
|
14
|
+
const t = await fetch(e, r), s = await L(t);
|
|
15
15
|
return t.ok ? s.success ? {
|
|
16
16
|
success: !0,
|
|
17
17
|
data: {
|
|
@@ -31,8 +31,12 @@ const v = 5e4, I = u.safeFn(
|
|
|
31
31
|
},
|
|
32
32
|
(e) => o("FAILED_TO_FETCH", { originalError: e })
|
|
33
33
|
);
|
|
34
|
-
function
|
|
35
|
-
|
|
34
|
+
function F({
|
|
35
|
+
path: e,
|
|
36
|
+
activeServer: r,
|
|
37
|
+
proxyUrl: t
|
|
38
|
+
}) {
|
|
39
|
+
const s = y({
|
|
36
40
|
path: e,
|
|
37
41
|
server: r,
|
|
38
42
|
pathVariables: {},
|
|
@@ -41,22 +45,23 @@ function A({ path: e, activeServer: r }) {
|
|
|
41
45
|
variables: []
|
|
42
46
|
}
|
|
43
47
|
});
|
|
44
|
-
return
|
|
48
|
+
return D(t, s);
|
|
45
49
|
}
|
|
46
50
|
const x = u.safeFn(
|
|
47
51
|
async ({
|
|
48
52
|
documentSettings: e,
|
|
49
53
|
toolCallId: r,
|
|
50
54
|
chat: t,
|
|
51
|
-
|
|
55
|
+
proxyUrl: s,
|
|
56
|
+
input: { method: f, path: l, body: m, headers: O, documentIdentifier: i }
|
|
52
57
|
}) => {
|
|
53
|
-
const [a, n] = i.split(
|
|
58
|
+
const [a, n] = i.split(U);
|
|
54
59
|
if (!a || !n)
|
|
55
60
|
return {
|
|
56
61
|
success: !1,
|
|
57
62
|
error: o("FAILED_TO_DETERMINE_DOCUMENT", { namespace: a, slug: n, documentIdentifier: i })
|
|
58
63
|
};
|
|
59
|
-
const E =
|
|
64
|
+
const E = h(a, n), c = e[E];
|
|
60
65
|
if (!c)
|
|
61
66
|
return {
|
|
62
67
|
success: !1,
|
|
@@ -66,24 +71,25 @@ const x = u.safeFn(
|
|
|
66
71
|
slug: n
|
|
67
72
|
})
|
|
68
73
|
};
|
|
69
|
-
const
|
|
70
|
-
method:
|
|
71
|
-
body:
|
|
72
|
-
...
|
|
74
|
+
const _ = N(c.securitySchemes), d = {
|
|
75
|
+
method: f,
|
|
76
|
+
body: m,
|
|
77
|
+
..._,
|
|
73
78
|
headers: {
|
|
74
|
-
...
|
|
75
|
-
...
|
|
79
|
+
...O,
|
|
80
|
+
..._.headers
|
|
76
81
|
}
|
|
77
|
-
},
|
|
82
|
+
}, S = F({
|
|
78
83
|
path: l,
|
|
79
|
-
activeServer: c.activeServer
|
|
80
|
-
|
|
84
|
+
activeServer: c.activeServer,
|
|
85
|
+
proxyUrl: s
|
|
86
|
+
}), p = await A(S, d);
|
|
81
87
|
return t.addToolOutput({
|
|
82
|
-
tool:
|
|
88
|
+
tool: v,
|
|
83
89
|
toolCallId: r,
|
|
84
|
-
output:
|
|
90
|
+
output: p,
|
|
85
91
|
state: "output-available"
|
|
86
|
-
}),
|
|
92
|
+
}), p;
|
|
87
93
|
},
|
|
88
94
|
(e) => o("FAILED_TO_EXECUTE_REQUEST", e)
|
|
89
95
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FreeMessagesInfoSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/FreeMessagesInfoSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FreeMessagesInfoSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/FreeMessagesInfoSection.vue"],"names":[],"mappings":"AAqPA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FreeMessagesInfoSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-913a3815"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconInfo as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r, ref as c, withDirectives as l, createElementBlock as u, openBlock as f, createElementVNode as e, createVNode as n, createTextVNode as _, unref as t, vShow as d } from "vue";
|
|
2
|
+
import { ScalarIconInfo as m, ScalarIconX as p } from "@scalar/icons";
|
|
3
|
+
import { URLS as g } from "../consts/urls.js";
|
|
4
|
+
import { useSignupLink as h } from "../hooks/use-signup-link.js";
|
|
5
|
+
const S = { class: "freeMessagesInfoSection" }, b = { class: "infoText flex items-center gap-1.5" }, k = ["href"], v = { class: "actionsContainer" }, x = ["href"], T = /* @__PURE__ */ r({
|
|
5
6
|
__name: "FreeMessagesInfoSection",
|
|
6
|
-
setup(
|
|
7
|
-
const o =
|
|
8
|
-
function
|
|
9
|
-
window.open("https://scalar.com/products/agent/getting-started", "_blank"), n === "full" && window.location.replace(t), n === "preview" && window.location.replace(
|
|
10
|
-
s.value ? `${t}/register?flow=oss-agent&docUrl=${s.value}` : t
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
function i() {
|
|
7
|
+
setup(C) {
|
|
8
|
+
const o = c(!1), { signupLink: i } = h();
|
|
9
|
+
function a() {
|
|
14
10
|
o.value = !0;
|
|
15
11
|
}
|
|
16
|
-
return (
|
|
17
|
-
e("strong",
|
|
18
|
-
|
|
12
|
+
return (I, s) => l((f(), u("div", S, [
|
|
13
|
+
e("strong", b, [
|
|
14
|
+
n(t(m), {
|
|
19
15
|
class: "text-blue size-4",
|
|
20
16
|
weight: "bold"
|
|
21
17
|
}),
|
|
22
|
-
|
|
18
|
+
e("a", {
|
|
19
|
+
class: "underline",
|
|
20
|
+
href: t(i),
|
|
21
|
+
target: "_blank"
|
|
22
|
+
}, "Sign up for Agent Scalar", 8, k),
|
|
23
|
+
s[0] || (s[0] = _(" to continue without hitting limits. ", -1))
|
|
23
24
|
]),
|
|
24
|
-
e("div",
|
|
25
|
-
e("
|
|
25
|
+
e("div", v, [
|
|
26
|
+
e("a", {
|
|
26
27
|
class: "actionButton upgradeButton",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
href: t(g).AGENT_SCALAR_DOCUMENTATION,
|
|
29
|
+
target: "_blank",
|
|
30
|
+
type: "button"
|
|
31
|
+
}, " Read more ", 8, x),
|
|
30
32
|
e("button", {
|
|
31
33
|
"aria-label": "Close",
|
|
32
34
|
class: "closeButton",
|
|
33
35
|
type: "button",
|
|
34
|
-
onClick:
|
|
36
|
+
onClick: a
|
|
35
37
|
}, [
|
|
36
|
-
|
|
38
|
+
n(t(p), {
|
|
37
39
|
class: "size-4",
|
|
38
40
|
weight: "bold"
|
|
39
41
|
})
|
|
40
42
|
])
|
|
41
43
|
])
|
|
42
44
|
], 512)), [
|
|
43
|
-
[
|
|
45
|
+
[d, !o.value]
|
|
44
46
|
]);
|
|
45
47
|
}
|
|
46
48
|
});
|
|
47
49
|
export {
|
|
48
|
-
|
|
50
|
+
T as default
|
|
49
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/PaymentSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaymentSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/PaymentSection.vue"],"names":[],"mappings":"AAoSA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PaymentSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7ab1200e"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconInfo as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as o, createElementBlock as d, openBlock as i, createElementVNode as e, createVNode as p, createTextVNode as v, unref as t, createStaticVNode as m } from "vue";
|
|
2
|
+
import { ScalarIconInfo as r } from "@scalar/icons";
|
|
3
|
+
import { useSignupLink as c } from "../hooks/use-signup-link.js";
|
|
4
|
+
const l = { class: "paymentSection" }, b = { class: "approvalText flex items-center gap-1.5" }, u = { class: "paymentContainer" }, _ = /* @__PURE__ */ o({
|
|
5
5
|
__name: "PaymentSection",
|
|
6
|
-
setup(
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
return (I, a) => (i(), p("div", f, [
|
|
14
|
-
t("strong", u, [
|
|
15
|
-
r(v(m), {
|
|
6
|
+
setup(f) {
|
|
7
|
+
const { navigateToSignup: n } = c();
|
|
8
|
+
return (y, a) => (i(), d("div", l, [
|
|
9
|
+
e("strong", b, [
|
|
10
|
+
p(t(r), {
|
|
16
11
|
class: "text-blue size-4",
|
|
17
12
|
weight: "bold"
|
|
18
13
|
}),
|
|
19
|
-
a[
|
|
14
|
+
a[1] || (a[1] = v(" You've reached your free message limit. Unlock unlimited access by upgrading now. ", -1))
|
|
20
15
|
]),
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
e("div", u, [
|
|
17
|
+
e("button", {
|
|
23
18
|
class: "actionButton approveButton",
|
|
24
19
|
type: "button",
|
|
25
|
-
onClick:
|
|
20
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
|
21
|
+
(...s) => t(n) && t(n)(...s))
|
|
26
22
|
}, " Upgrade "),
|
|
27
|
-
a[
|
|
23
|
+
a[2] || (a[2] = m('<div class="paymentInfo" data-v-7ab1200e><h3 data-v-7ab1200e>$24 <span data-v-7ab1200e>/ month</span></h3><div class="paymentInfoSection" data-v-7ab1200e><div class="paymentInfoItem" data-v-7ab1200e><span data-v-7ab1200e>Members in your workspace</span><span data-v-7ab1200e>1</span></div><div class="paymentInfoItem" data-v-7ab1200e><span data-v-7ab1200e>x $24 / month / member</span><span data-v-7ab1200e>$24.00</span></div></div><div class="paymentInfoSection" data-v-7ab1200e><div class="paymentInfoItem" data-v-7ab1200e><span data-v-7ab1200e>Messages</span><span data-v-7ab1200e>1,000</span></div><div class="paymentInfoItem" data-v-7ab1200e><span data-v-7ab1200e>Additional Messages</span><span data-v-7ab1200e>+ $0.02 Message</span></div></div></div>', 1))
|
|
28
24
|
])
|
|
29
25
|
]));
|
|
30
26
|
}
|
|
31
27
|
});
|
|
32
28
|
export {
|
|
33
|
-
|
|
29
|
+
_ as default
|
|
34
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/ServerSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerSelector.vue.d.ts","sourceRoot":"","sources":["../../src/components/ServerSelector.vue"],"names":[],"mappings":"AAmGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAMhG,KAAK,aAAa,GAAG;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,2BAA2B;IAC3B,cAAc,EAAE,YAAY,GAAG,IAAI,CAAA;IACnC,wBAAwB;IACxB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,sSAkJd,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as m, useId as b, createElementBlock as S, openBlock as d, Fragment as f, createElementVNode as n, createVNode as x, createBlock as c, createCommentVNode as o, normalizeClass as
|
|
2
|
-
import { ServerVariablesForm as
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, useId as b, createElementBlock as S, openBlock as d, Fragment as f, createElementVNode as n, createVNode as x, createBlock as c, createCommentVNode as o, normalizeClass as y, unref as l } from "vue";
|
|
2
|
+
import { ServerVariablesForm as k } from "@scalar/api-client/components/Server";
|
|
3
|
+
import { ScalarMarkdown as B } from "@scalar/components";
|
|
4
|
+
import V from "./Selector.vue.js";
|
|
5
|
+
const g = ["id"], C = {}, I = /* @__PURE__ */ m({
|
|
6
6
|
...C,
|
|
7
7
|
__name: "ServerSelector",
|
|
8
8
|
props: {
|
|
@@ -11,40 +11,46 @@ const y = ["id"], C = {}, I = /* @__PURE__ */ m({
|
|
|
11
11
|
servers: {}
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const
|
|
14
|
+
const a = b(), u = (r) => {
|
|
15
15
|
e.eventBus.emit("server:update:selected", {
|
|
16
|
-
url: e.selectedServer?.url === r ? "" : r
|
|
16
|
+
url: e.selectedServer?.url === r ? "" : r,
|
|
17
|
+
meta: {
|
|
18
|
+
type: "document"
|
|
19
|
+
}
|
|
17
20
|
});
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
index:
|
|
21
|
+
}, v = (r, t) => {
|
|
22
|
+
const s = e.servers.findIndex((i) => i.url === e.selectedServer?.url);
|
|
23
|
+
s !== -1 && e.eventBus.emit("server:update:variables", {
|
|
24
|
+
index: s,
|
|
22
25
|
key: r,
|
|
23
|
-
value: t
|
|
26
|
+
value: t,
|
|
27
|
+
meta: {
|
|
28
|
+
type: "document"
|
|
29
|
+
}
|
|
24
30
|
});
|
|
25
31
|
};
|
|
26
32
|
return (r, t) => (d(), S(f, null, [
|
|
27
33
|
t[0] || (t[0] = n("label", { class: "bg-b-2 flex h-8 items-center rounded-t-xl border border-b-0 px-3 py-2.5 font-medium" }, " Server ", -1)),
|
|
28
34
|
n("div", {
|
|
29
|
-
id: l(
|
|
30
|
-
class:
|
|
35
|
+
id: l(a),
|
|
36
|
+
class: y(["border", {
|
|
31
37
|
"rounded-b-xl": !e.selectedServer?.description && !e.selectedServer?.variables
|
|
32
38
|
}])
|
|
33
39
|
}, [
|
|
34
|
-
e.servers.length ? (d(), c(
|
|
40
|
+
e.servers.length ? (d(), c(V, {
|
|
35
41
|
key: 0,
|
|
36
42
|
selectedServer: e.selectedServer,
|
|
37
43
|
servers: e.servers,
|
|
38
|
-
target: l(
|
|
39
|
-
"onUpdate:modelValue":
|
|
44
|
+
target: l(a),
|
|
45
|
+
"onUpdate:modelValue": u
|
|
40
46
|
}, null, 8, ["selectedServer", "servers", "target"])) : o("", !0)
|
|
41
|
-
], 10,
|
|
42
|
-
x(l(
|
|
47
|
+
], 10, g),
|
|
48
|
+
x(l(k), {
|
|
43
49
|
layout: "reference",
|
|
44
50
|
variables: e.selectedServer?.variables,
|
|
45
|
-
"onUpdate:variable":
|
|
51
|
+
"onUpdate:variable": v
|
|
46
52
|
}, null, 8, ["variables"]),
|
|
47
|
-
e.selectedServer?.description ? (d(), c(l(
|
|
53
|
+
e.selectedServer?.description ? (d(), c(l(B), {
|
|
48
54
|
key: 0,
|
|
49
55
|
class: "text-c-3 rounded-b-xl border border-t-0 px-3 py-1.5",
|
|
50
56
|
value: e.selectedServer.description
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./UploadSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9551cf83"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|