@scalar/agent-chat 0.5.17 → 0.7.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/App.vue.d.ts +4 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +13 -11
- 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 +5 -2
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +140 -131
- 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 +132 -122
- 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 +7 -7
|
@@ -1,63 +1,73 @@
|
|
|
1
|
-
import { defineComponent as k, createBlock as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as k, createBlock as c, openBlock as r, unref as e, withCtx as S, createElementVNode as o, createVNode as d, createElementBlock as a, Fragment as _, renderList as h, createCommentVNode as y, normalizeClass as C, createTextVNode as m, toDisplayString as v, isRef as R } from "vue";
|
|
2
|
+
import { ScalarModal as x, ScalarColorModeToggle as U, ScalarTextInput as w } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as D, ScalarIconCaretRight as b } from "@scalar/icons";
|
|
4
|
+
import { URLS as p } from "../../consts/urls.js";
|
|
5
|
+
import { useState as O } from "../../state/state.js";
|
|
6
|
+
import L from "./DocSettings.vue.js";
|
|
7
|
+
const V = { class: "settingsHeading" }, N = { class: "documentList" }, P = ["onClick"], T = { key: 0 }, A = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "noDocuments"
|
|
9
|
-
},
|
|
10
|
+
}, E = { class: "proxyUrlContainer" }, I = ["href"], z = /* @__PURE__ */ k({
|
|
10
11
|
__name: "Settings",
|
|
11
12
|
props: {
|
|
12
13
|
modalState: {}
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const { workspaceStore:
|
|
16
|
-
function
|
|
17
|
-
|
|
15
|
+
setup(f) {
|
|
16
|
+
const { workspaceStore: s, proxyUrlRaw: i } = O();
|
|
17
|
+
function g(u) {
|
|
18
|
+
s.update("x-scalar-active-document", u);
|
|
18
19
|
}
|
|
19
|
-
return (
|
|
20
|
+
return (u, t) => (r(), c(e(x), {
|
|
20
21
|
class: "settingsModal",
|
|
21
|
-
state:
|
|
22
|
+
state: f.modalState
|
|
22
23
|
}, {
|
|
23
|
-
default:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
d(e(
|
|
24
|
+
default: S(() => [
|
|
25
|
+
o("div", V, [
|
|
26
|
+
t[1] || (t[1] = o("h1", null, "Settings", -1)),
|
|
27
|
+
d(e(U), { class: "colorToggle ml-auto" })
|
|
27
28
|
]),
|
|
28
|
-
|
|
29
|
-
Object.entries(e(
|
|
30
|
-
e(
|
|
31
|
-
), ([
|
|
32
|
-
key:
|
|
29
|
+
o("div", N, [
|
|
30
|
+
Object.entries(e(s).workspace.documents).length ? (r(!0), a(_, { key: 0 }, h(Object.entries(
|
|
31
|
+
e(s).workspace.documents
|
|
32
|
+
), ([l, n]) => (r(), a("div", {
|
|
33
|
+
key: l,
|
|
33
34
|
class: "document"
|
|
34
35
|
}, [
|
|
35
|
-
|
|
36
|
-
class:
|
|
37
|
-
documentNameActive: e(
|
|
36
|
+
o("button", {
|
|
37
|
+
class: C(["documentName", {
|
|
38
|
+
documentNameActive: e(s).workspace.activeDocument === n
|
|
38
39
|
}]),
|
|
39
40
|
type: "button",
|
|
40
|
-
onClick: (
|
|
41
|
+
onClick: (B) => g(l)
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
e(
|
|
44
|
-
], 10,
|
|
45
|
-
e(
|
|
46
|
-
d(
|
|
47
|
-
document:
|
|
48
|
-
name:
|
|
43
|
+
m(" @" + v(l) + " ", 1),
|
|
44
|
+
e(s).workspace.activeDocument === n ? (r(), c(e(D), { key: 0 })) : (r(), c(e(b), { key: 1 }))
|
|
45
|
+
], 10, P),
|
|
46
|
+
e(s).workspace.activeDocument === n ? (r(), a("div", T, [
|
|
47
|
+
d(L, {
|
|
48
|
+
document: n,
|
|
49
|
+
name: l
|
|
49
50
|
}, null, 8, ["document", "name"])
|
|
50
|
-
])) :
|
|
51
|
-
]))), 128)) : (
|
|
51
|
+
])) : y("", !0)
|
|
52
|
+
]))), 128)) : (r(), a("div", A, " There's no API definition loaded. Use the + button to load APIs. "))
|
|
52
53
|
]),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
o("div", E, [
|
|
55
|
+
t[3] || (t[3] = o("label", { for: "proxyUrl" }, "CORS Proxy", -1)),
|
|
56
|
+
o("p", null, [
|
|
57
|
+
t[2] || (t[2] = m(" All requests will be sent through the specified proxy URL to help avoid CORS (Cross-Origin Resource Sharing) issues. ", -1)),
|
|
58
|
+
o("a", {
|
|
59
|
+
class: "underline",
|
|
60
|
+
href: e(p).PROXY_SOURCE_CODE,
|
|
61
|
+
target: "_blank"
|
|
62
|
+
}, " Read more ", 8, I)
|
|
63
|
+
]),
|
|
64
|
+
d(e(w), {
|
|
56
65
|
id: "proxyUrl",
|
|
57
|
-
modelValue: e(
|
|
58
|
-
"onUpdate:modelValue":
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
modelValue: e(i),
|
|
67
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => R(i) ? i.value = l : null),
|
|
68
|
+
label: "Proxy URL",
|
|
69
|
+
placeholder: e(p).DEFAULT_PROXY_URL
|
|
70
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
61
71
|
])
|
|
62
72
|
]),
|
|
63
73
|
_: 1
|
|
@@ -65,5 +75,5 @@ const I = { class: "settingsHeading" }, T = { class: "documentList" }, B = ["onC
|
|
|
65
75
|
}
|
|
66
76
|
});
|
|
67
77
|
export {
|
|
68
|
-
|
|
78
|
+
z as default
|
|
69
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Start.vue.d.ts","sourceRoot":"","sources":["../../src/views/Start.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Start.vue.d.ts","sourceRoot":"","sources":["../../src/views/Start.vue"],"names":[],"mappings":"AAqMA,QAAA,MAAM,YAAY;;;;;;iFAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/views/Start.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Start.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-56f7e8dd"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
package/dist/views/Start.vue2.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, createElementBlock as r, openBlock as s, createVNode as i, createElementVNode as t, createTextVNode as o, unref as a, Fragment as m } from "vue";
|
|
2
|
+
import f from "../components/Logo.vue.js";
|
|
3
|
+
import { URLS as l } from "../consts/urls.js";
|
|
4
|
+
import { useState as c } from "../state/state.js";
|
|
5
|
+
import y from "./PromptForm.vue.js";
|
|
6
|
+
const _ = { class: "startContainer" }, S = { class: "disclaimerText" }, k = ["href"], A = ["href"], T = /* @__PURE__ */ g({
|
|
6
7
|
__name: "Start",
|
|
7
8
|
emits: ["submit", "uploadApi"],
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
e[
|
|
13
|
-
|
|
9
|
+
setup(b, { emit: p }) {
|
|
10
|
+
const n = p, { mode: d } = c();
|
|
11
|
+
return (v, e) => (s(), r("div", _, [
|
|
12
|
+
i(f, { class: "agentLogo" }),
|
|
13
|
+
e[4] || (e[4] = t("h1", { class: "heading" }, "How can I help you today?", -1)),
|
|
14
|
+
i(y, {
|
|
14
15
|
ref: "promptFormField",
|
|
15
|
-
onSubmit: e[0] || (e[0] = (
|
|
16
|
-
onUploadApi: e[1] || (e[1] = (
|
|
16
|
+
onSubmit: e[0] || (e[0] = (u) => n("submit")),
|
|
17
|
+
onUploadApi: e[1] || (e[1] = (u) => n("uploadApi"))
|
|
17
18
|
}, null, 512),
|
|
18
|
-
t("p",
|
|
19
|
-
|
|
20
|
-
o(" By messaging Agent Scalar your OpenAPI
|
|
21
|
-
], 64)) : (s(), r(
|
|
22
|
-
o("
|
|
19
|
+
t("p", S, [
|
|
20
|
+
a(d) === "preview" ? (s(), r(m, { key: 0 }, [
|
|
21
|
+
o(" By messaging Agent Scalar your OpenAPI document will be temporarily uploaded to Scalar's servers. You must agree to our ")
|
|
22
|
+
], 64)) : (s(), r(m, { key: 1 }, [
|
|
23
|
+
o("By messaging Agent Scalar you agree to our ")
|
|
23
24
|
], 64)),
|
|
24
|
-
|
|
25
|
+
t("a", {
|
|
25
26
|
class: "disclaimerLink",
|
|
26
|
-
href:
|
|
27
|
+
href: a(l).TERMS_AND_CONDITIONS,
|
|
27
28
|
target: "_blank"
|
|
28
|
-
}, "Terms
|
|
29
|
-
e[
|
|
30
|
-
|
|
29
|
+
}, "Terms", 8, k),
|
|
30
|
+
e[2] || (e[2] = o(" and ", -1)),
|
|
31
|
+
t("a", {
|
|
31
32
|
class: "disclaimerLink",
|
|
32
|
-
href:
|
|
33
|
+
href: a(l).PRIVACY_POLICY,
|
|
33
34
|
target: "_blank"
|
|
34
|
-
}, "
|
|
35
|
-
e[
|
|
35
|
+
}, "Privacy Policy", 8, A),
|
|
36
|
+
e[3] || (e[3] = o(". ", -1))
|
|
36
37
|
])
|
|
37
38
|
]));
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
T as default
|
|
42
43
|
};
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
11
11
|
"directory": "packages/agent-chat"
|
|
12
12
|
},
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.7.0",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=20"
|
|
16
16
|
},
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"vue": "^3.5.26",
|
|
51
51
|
"whatwg-mimetype": "4.0.0",
|
|
52
52
|
"zod": "^4.3.5",
|
|
53
|
-
"@scalar/api-client": "2.
|
|
53
|
+
"@scalar/api-client": "2.31.0",
|
|
54
|
+
"@scalar/components": "0.19.12",
|
|
54
55
|
"@scalar/helpers": "0.2.16",
|
|
55
|
-
"@scalar/components": "0.19.9",
|
|
56
56
|
"@scalar/icons": "0.5.3",
|
|
57
|
-
"@scalar/openapi-types": "0.5.3",
|
|
58
|
-
"@scalar/themes": "0.14.0",
|
|
59
57
|
"@scalar/json-magic": "0.11.5",
|
|
60
|
-
"@scalar/
|
|
58
|
+
"@scalar/themes": "0.14.2",
|
|
59
|
+
"@scalar/types": "0.6.8",
|
|
60
|
+
"@scalar/openapi-types": "0.5.3",
|
|
61
61
|
"@scalar/use-toasts": "0.9.1",
|
|
62
|
-
"@scalar/workspace-store": "0.
|
|
62
|
+
"@scalar/workspace-store": "0.35.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@modelcontextprotocol/sdk": "1.26.0",
|