@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,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as S, computed as n, createElementBlock as k, openBlock as u, normalizeClass as C, createElementVNode as d, createBlock as l, createCommentVNode as s, unref as i, withCtx as E, createTextVNode as I, createVNode as N } from "vue";
|
|
2
2
|
import { getSelectedServer as P } from "@scalar/api-client/v2/features/operation";
|
|
3
|
-
import { getActiveEnvironment as B, getServers as
|
|
4
|
-
import { ScalarButton as
|
|
5
|
-
import { ScalarIconArrowRight as
|
|
3
|
+
import { getActiveEnvironment as B, getServers as x } from "@scalar/api-client/v2/helpers";
|
|
4
|
+
import { ScalarButton as T } from "@scalar/components";
|
|
5
|
+
import { ScalarIconArrowRight as _ } from "@scalar/icons";
|
|
6
6
|
import O from "../../../components/AuthenticationProvided.vue.js";
|
|
7
7
|
import b from "../../../components/AuthenticationRequired.vue.js";
|
|
8
8
|
import { ASK_FOR_AUTHENTICATION_TOOL_NAME as w } from "../../../entities/tools/ask-for-authentication.js";
|
|
@@ -19,11 +19,11 @@ const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class:
|
|
|
19
19
|
const { workspaceStore: c, eventBus: f, config: p, chat: h } = L(), a = n(() => {
|
|
20
20
|
if (!t.messagePart.value.input?.uniqueIdentifier || t.messagePart.value.state !== "input-available")
|
|
21
21
|
return;
|
|
22
|
-
const [
|
|
22
|
+
const [r, o] = t.messagePart.value.input.uniqueIdentifier.split(
|
|
23
23
|
y
|
|
24
24
|
);
|
|
25
|
-
if (!(!
|
|
26
|
-
return z(
|
|
25
|
+
if (!(!r || !o))
|
|
26
|
+
return z(r, o);
|
|
27
27
|
}), e = n(() => {
|
|
28
28
|
if (a.value)
|
|
29
29
|
return c.workspace.documents[a.value];
|
|
@@ -33,10 +33,10 @@ const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class:
|
|
|
33
33
|
}), v = n(() => {
|
|
34
34
|
if (!e.value)
|
|
35
35
|
return;
|
|
36
|
-
const
|
|
36
|
+
const r = x(e.value.servers, {
|
|
37
37
|
documentUrl: e.value["x-scalar-original-source-url"]
|
|
38
38
|
});
|
|
39
|
-
return P(e.value
|
|
39
|
+
return P(r, e.value["x-scalar-selected-server"]);
|
|
40
40
|
}), g = n(
|
|
41
41
|
() => a.value && m.value && v.value
|
|
42
42
|
);
|
|
@@ -48,7 +48,7 @@ const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class:
|
|
|
48
48
|
state: "output-available"
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
return (
|
|
51
|
+
return (r, o) => (u(), k("div", {
|
|
52
52
|
class: C(["askForAuthentication", {
|
|
53
53
|
open: g.value
|
|
54
54
|
}])
|
|
@@ -56,15 +56,15 @@ const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class:
|
|
|
56
56
|
d("div", V, [
|
|
57
57
|
t.messagePart.value.state === "output-available" ? (u(), l(O, { key: 0 })) : s("", !0),
|
|
58
58
|
t.messagePart.value.state === "input-available" ? (u(), l(b, { key: 1 })) : s("", !0),
|
|
59
|
-
t.messagePart.value.state === "input-available" ? (u(), l(i(
|
|
59
|
+
t.messagePart.value.state === "input-available" ? (u(), l(i(T), {
|
|
60
60
|
key: 2,
|
|
61
61
|
class: "authorizeButton",
|
|
62
62
|
size: "xs",
|
|
63
63
|
onClick: A
|
|
64
64
|
}, {
|
|
65
65
|
default: E(() => [
|
|
66
|
-
|
|
67
|
-
N(i(
|
|
66
|
+
o[0] || (o[0] = I(" Authorize ", -1)),
|
|
67
|
+
N(i(_), { weight: "bold" })
|
|
68
68
|
]),
|
|
69
69
|
_: 1
|
|
70
70
|
})) : s("", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptForm.vue.d.ts","sourceRoot":"","sources":["../../src/views/PromptForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PromptForm.vue.d.ts","sourceRoot":"","sources":["../../src/views/PromptForm.vue"],"names":[],"mappings":"AAmqBA,iBAAS,WAAW,SAEnB;AA4jBD,QAAA,MAAM,YAAY;;;;;;;;iFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PromptForm.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e7c7c266"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
3
|
-
import { ScalarIconPlus as
|
|
1
|
+
import { defineComponent as q, useTemplateRef as K, computed as d, watch as w, createElementBlock as r, openBlock as o, createBlock as u, createCommentVNode as a, createElementVNode as n, unref as e, withModifiers as j, withDirectives as J, vModelText as O, Fragment as f, withCtx as h, createVNode as p, renderList as C, createTextVNode as T, toDisplayString as X } from "vue";
|
|
2
|
+
import { ScalarTooltip as Z, ScalarIconButton as P, ScalarLoading as G } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as I, ScalarIconX as Q, ScalarIconLockSimple as W, ScalarIconCheck as Y, ScalarIconArrowUp as ee } from "@scalar/icons";
|
|
4
4
|
import te from "../components/ActionsDropdown.vue.js";
|
|
5
5
|
import oe from "../components/ApprovalSection.vue.js";
|
|
6
6
|
import se from "../components/ErrorMessage.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import le from "../components/FreeMessagesInfoSection.vue.js";
|
|
8
|
+
import ne from "../components/PaymentSection.vue.js";
|
|
9
9
|
import ae from "../components/SearchPopover.vue.js";
|
|
10
10
|
import re from "../components/UploadSection.vue.js";
|
|
11
11
|
import { AgentErrorCodes as D } from "../entities/error/constants.js";
|
|
12
12
|
import { MAX_PROMPT_SIZE as ie } from "../entities/prompt/constants.js";
|
|
13
13
|
import { useRequestApprovals as ue } from "../hooks/use-chat-approvals.js";
|
|
14
14
|
import { useChatError as ce } from "../hooks/use-chat-error.js";
|
|
15
|
-
import { useChatPendingClientToolParts as
|
|
16
|
-
import { useUploadTmpDocument as
|
|
15
|
+
import { useChatPendingClientToolParts as de } from "../hooks/use-chat-pending-client-tool-parts.js";
|
|
16
|
+
import { useUploadTmpDocument as pe } from "../hooks/use-upload-tmp-document.js";
|
|
17
17
|
import { useState as me } from "../state/state.js";
|
|
18
18
|
const ge = { class: "actionContainer" }, ve = ["disabled"], fe = { class: "inputActionsContainer" }, he = { class: "inputActionsLeft" }, ye = {
|
|
19
19
|
class: "addAPIButton",
|
|
20
20
|
type: "button"
|
|
21
|
-
},
|
|
21
|
+
}, Ae = {
|
|
22
22
|
class: "addAPIButton",
|
|
23
23
|
type: "button"
|
|
24
|
-
},
|
|
24
|
+
}, be = ["src"], ke = ["onClick"], _e = { class: "inputActionsRight" }, Se = { class: "sendCheckboxContinue" }, we = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "relative flex items-center gap-1.5"
|
|
27
27
|
}, Ce = {
|
|
28
28
|
class: "termsAgree",
|
|
29
29
|
for: "agentTermsAgree"
|
|
30
|
-
},
|
|
30
|
+
}, Te = {
|
|
31
|
+
key: 5,
|
|
32
|
+
class: "addMoreContext"
|
|
33
|
+
}, Pe = { class: "ml-auto flex items-center gap-1" }, Ie = ["onClick"], De = ["alt", "src"], Xe = /* @__PURE__ */ q({
|
|
31
34
|
__name: "PromptForm",
|
|
32
35
|
emits: ["submit", "uploadApi"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const c =
|
|
36
|
+
setup(xe, { expose: x, emit: L }) {
|
|
37
|
+
const E = L;
|
|
38
|
+
x({ focusPrompt: z });
|
|
39
|
+
const c = K("agentPrompt"), t = me(), M = d(() => t.prompt.value.trim().length > 0), R = d(
|
|
37
40
|
() => t.prompt.value.trim().length > ie
|
|
38
|
-
),
|
|
39
|
-
() => t.chat.messages.length > 1 && !t.getAgentKey?.() &&
|
|
41
|
+
), B = d(
|
|
42
|
+
() => t.chat.messages.length > 1 && !t.getAgentKey?.() && g?.value?.code !== D.LIMIT_REACHED
|
|
40
43
|
);
|
|
41
|
-
|
|
44
|
+
w(t.prompt, () => {
|
|
42
45
|
if (c?.value) {
|
|
43
46
|
if (!t.prompt.value.length) {
|
|
44
47
|
c.value.style.height = "0px";
|
|
@@ -47,144 +50,153 @@ const ge = { class: "actionContainer" }, ve = ["disabled"], fe = { class: "input
|
|
|
47
50
|
c.value.style.height = "auto", c.value.style.height = c.value.scrollHeight + "px";
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
|
-
function
|
|
51
|
-
t.loading.value ||
|
|
53
|
+
function U(i) {
|
|
54
|
+
t.loading.value || i.key === "Enter" && !i.shiftKey && (i.preventDefault(), _(), window.scrollTo(0, document.body.scrollHeight));
|
|
52
55
|
}
|
|
53
|
-
function
|
|
56
|
+
function z() {
|
|
54
57
|
c.value?.focus();
|
|
55
58
|
}
|
|
56
|
-
|
|
59
|
+
w(
|
|
57
60
|
() => t.chat.status,
|
|
58
|
-
(
|
|
59
|
-
(
|
|
61
|
+
(i) => {
|
|
62
|
+
(i === "ready" || i === "error") && c.value?.focus();
|
|
60
63
|
}
|
|
61
64
|
);
|
|
62
|
-
const { approvalRequiredParts:
|
|
63
|
-
function
|
|
64
|
-
t.terms.accept(), t.mode === "preview" && t.getActiveDocumentJson &&
|
|
65
|
+
const { approvalRequiredParts: y, respondToRequestApprovals: A } = ue(), { pendingClientToolParts: $ } = de(), m = pe();
|
|
66
|
+
function V() {
|
|
67
|
+
t.terms.accept(), t.mode === "preview" && t.getActiveDocumentJson && m.uploadTempDocument(t.getActiveDocumentJson(), !0);
|
|
65
68
|
}
|
|
66
|
-
const
|
|
69
|
+
const b = d(
|
|
67
70
|
() => Object.values(t.pendingDocuments).some(Boolean)
|
|
68
|
-
),
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
+
), k = d(() => {
|
|
72
|
+
const i = R.value, l = !M.value, s = y.value.length > 0, v = $.value.length > 0, S = t.mode === "preview", F = S && !t.terms.accepted.value, H = S && !!m.uploadState.value, N = b.value;
|
|
73
|
+
return i || l || s || v || F || H || N;
|
|
71
74
|
});
|
|
72
|
-
function
|
|
73
|
-
|
|
75
|
+
function _() {
|
|
76
|
+
k.value || E("submit");
|
|
74
77
|
}
|
|
75
|
-
const
|
|
76
|
-
return (
|
|
77
|
-
e(
|
|
78
|
+
const g = ce();
|
|
79
|
+
return (i, l) => (o(), r("div", ge, [
|
|
80
|
+
e(m).uploadState.value || b.value ? (o(), u(re, {
|
|
78
81
|
key: 0,
|
|
79
|
-
uploadState: e(
|
|
80
|
-
}, null, 8, ["uploadState"])) :
|
|
81
|
-
e(
|
|
82
|
+
uploadState: e(m).uploadState.value ?? { type: "loading" }
|
|
83
|
+
}, null, 8, ["uploadState"])) : a("", !0),
|
|
84
|
+
e(g) ? (o(), u(se, {
|
|
82
85
|
key: 1,
|
|
83
|
-
error: e(
|
|
84
|
-
}, null, 8, ["error"])) :
|
|
85
|
-
e(
|
|
86
|
+
error: e(g)
|
|
87
|
+
}, null, 8, ["error"])) : a("", !0),
|
|
88
|
+
e(y).length ? (o(), u(oe, {
|
|
86
89
|
key: 2,
|
|
87
|
-
onApprove:
|
|
88
|
-
onReject:
|
|
89
|
-
})) :
|
|
90
|
-
e(
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
onApprove: l[0] || (l[0] = (s) => e(A)(!0)),
|
|
91
|
+
onReject: l[1] || (l[1] = (s) => e(A)(!1))
|
|
92
|
+
})) : a("", !0),
|
|
93
|
+
e(g)?.code === e(D).LIMIT_REACHED ? (o(), u(ne, { key: 3 })) : a("", !0),
|
|
94
|
+
B.value ? (o(), u(le, { key: 4 })) : a("", !0),
|
|
95
|
+
n("form", {
|
|
93
96
|
class: "promptForm",
|
|
94
|
-
onSubmit:
|
|
97
|
+
onSubmit: j(_, ["prevent"])
|
|
95
98
|
}, [
|
|
96
|
-
|
|
99
|
+
l[6] || (l[6] = n("label", {
|
|
97
100
|
class: "agentLabel",
|
|
98
101
|
for: "agentTextarea"
|
|
99
102
|
}, " Type a Request To get Started ", -1)),
|
|
100
|
-
|
|
103
|
+
J(n("textarea", {
|
|
101
104
|
id: "agentTextarea",
|
|
102
105
|
ref: "agentPrompt",
|
|
103
|
-
"onUpdate:modelValue":
|
|
106
|
+
"onUpdate:modelValue": l[2] || (l[2] = (s) => e(t).prompt.value = s),
|
|
104
107
|
class: "prompt custom-scroll",
|
|
105
108
|
disabled: e(t).loading.value,
|
|
106
109
|
name: "prompt",
|
|
107
|
-
placeholder: "Ask me anything
|
|
108
|
-
onKeydown:
|
|
110
|
+
placeholder: "Ask me anything…",
|
|
111
|
+
onKeydown: U
|
|
109
112
|
}, null, 40, ve), [
|
|
110
113
|
[O, e(t).prompt.value]
|
|
111
114
|
]),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
e(t).
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
115
|
+
n("div", fe, [
|
|
116
|
+
n("div", he, [
|
|
117
|
+
e(t).hideAddApi ? a("", !0) : (o(), r(f, { key: 0 }, [
|
|
118
|
+
e(t).isLoggedIn?.value ? (o(), u(te, {
|
|
119
|
+
key: 1,
|
|
120
|
+
onUploadApi: l[3] || (l[3] = (s) => i.$emit("uploadApi"))
|
|
121
|
+
}, {
|
|
122
|
+
default: h(() => [
|
|
123
|
+
n("button", Ae, [
|
|
124
|
+
p(e(I), {
|
|
125
|
+
class: "size-4",
|
|
126
|
+
weight: "bold"
|
|
127
|
+
})
|
|
128
|
+
])
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
})) : (o(), u(ae, { key: 0 }, {
|
|
132
|
+
default: h(() => [
|
|
133
|
+
n("button", ye, [
|
|
134
|
+
p(e(I), {
|
|
135
|
+
class: "size-4",
|
|
136
|
+
weight: "bold"
|
|
137
|
+
})
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}))
|
|
142
|
+
], 64)),
|
|
143
|
+
(o(!0), r(f, null, C(e(t).registryDocuments.value, (s) => (o(), r("div", {
|
|
144
|
+
key: s.id,
|
|
140
145
|
class: "apiPill"
|
|
141
146
|
}, [
|
|
142
|
-
|
|
147
|
+
s.logoUrl ? (o(), r("img", {
|
|
143
148
|
key: 0,
|
|
144
149
|
class: "apiPillLogo",
|
|
145
|
-
src:
|
|
146
|
-
}, null, 8,
|
|
147
|
-
T(" " + X(
|
|
148
|
-
|
|
150
|
+
src: s.logoUrl
|
|
151
|
+
}, null, 8, be)) : a("", !0),
|
|
152
|
+
T(" " + X(s.title) + " ", 1),
|
|
153
|
+
s.removable ? (o(), r("button", {
|
|
149
154
|
key: 1,
|
|
150
155
|
class: "apiPillRemove",
|
|
151
156
|
type: "button",
|
|
152
|
-
onClick: (v) => e(t).removeDocument(
|
|
157
|
+
onClick: (v) => e(t).removeDocument(s)
|
|
153
158
|
}, [
|
|
154
|
-
|
|
159
|
+
p(e(Q), {
|
|
155
160
|
class: "size-4",
|
|
156
161
|
weight: "bold"
|
|
157
162
|
})
|
|
158
|
-
], 8, ke)) :
|
|
163
|
+
], 8, ke)) : a("", !0)
|
|
159
164
|
]))), 128))
|
|
160
165
|
]),
|
|
161
|
-
|
|
162
|
-
e(t).loading.value ?
|
|
166
|
+
n("div", _e, [
|
|
167
|
+
e(t).loading.value ? a("", !0) : (o(), u(e(Z), {
|
|
163
168
|
key: 0,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
content: "Settings"
|
|
170
|
+
}, {
|
|
171
|
+
default: h(() => [
|
|
172
|
+
p(e(P), {
|
|
173
|
+
class: "settingsButton h-7 w-7 p-1.5",
|
|
174
|
+
icon: e(W),
|
|
175
|
+
label: "Scalar",
|
|
176
|
+
size: "md",
|
|
177
|
+
weight: "bold",
|
|
178
|
+
onClick: l[4] || (l[4] = (s) => e(t).settingsModal.show())
|
|
179
|
+
}, null, 8, ["icon"])
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
})),
|
|
183
|
+
n("div", Se, [
|
|
184
|
+
!e(t).terms.accepted.value && e(t).mode === "preview" ? (o(), r("div", we, [
|
|
185
|
+
n("input", {
|
|
174
186
|
id: "agentTermsAgree",
|
|
175
187
|
class: "sr-only",
|
|
176
188
|
type: "checkbox",
|
|
177
|
-
onChange:
|
|
189
|
+
onChange: V
|
|
178
190
|
}, null, 32),
|
|
179
|
-
|
|
180
|
-
|
|
191
|
+
n("label", Ce, [
|
|
192
|
+
p(e(Y), {
|
|
181
193
|
class: "termsAgreeIcon",
|
|
182
194
|
weight: "bold"
|
|
183
195
|
}),
|
|
184
|
-
|
|
196
|
+
l[5] || (l[5] = T(" Agree to Terms & Conditions ", -1))
|
|
185
197
|
])
|
|
186
|
-
])) :
|
|
187
|
-
e(t).loading.value ? (
|
|
198
|
+
])) : a("", !0),
|
|
199
|
+
e(t).loading.value ? (o(), u(e(G), {
|
|
188
200
|
key: 2,
|
|
189
201
|
class: "loader h-7 w-7",
|
|
190
202
|
loader: {
|
|
@@ -202,10 +214,10 @@ const ge = { class: "actionContainer" }, ve = ["disabled"], fe = { class: "input
|
|
|
202
214
|
}
|
|
203
215
|
},
|
|
204
216
|
size: "2xl"
|
|
205
|
-
}, null, 8, ["loader"])) : (
|
|
217
|
+
}, null, 8, ["loader"])) : (o(), u(e(P), {
|
|
206
218
|
key: 1,
|
|
207
219
|
class: "sendButton h-7 w-7 p-1.5",
|
|
208
|
-
disabled:
|
|
220
|
+
disabled: k.value,
|
|
209
221
|
icon: e(ee),
|
|
210
222
|
label: "Scalar",
|
|
211
223
|
size: "md",
|
|
@@ -216,26 +228,24 @@ const ge = { class: "actionContainer" }, ve = ["disabled"], fe = { class: "input
|
|
|
216
228
|
])
|
|
217
229
|
])
|
|
218
230
|
], 32),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
(
|
|
223
|
-
key:
|
|
231
|
+
e(t).chat.messages.length <= 1 && !e(t).hideAddApi ? (o(), r("div", Te, [
|
|
232
|
+
l[7] || (l[7] = n("span", null, "Load additional APIs", -1)),
|
|
233
|
+
n("div", Pe, [
|
|
234
|
+
(o(!0), r(f, null, C(e(t).curatedDocuments.value, (s) => (o(), r("button", {
|
|
235
|
+
key: s.id,
|
|
224
236
|
class: "addAPIContext",
|
|
225
237
|
type: "button",
|
|
226
|
-
onClick: (v) => e(t).addDocument(
|
|
238
|
+
onClick: (v) => e(t).addDocument(s)
|
|
227
239
|
}, [
|
|
228
|
-
|
|
240
|
+
s.logoUrl ? (o(), r("img", {
|
|
229
241
|
key: 0,
|
|
230
|
-
alt:
|
|
242
|
+
alt: s.title,
|
|
231
243
|
class: "size-4",
|
|
232
|
-
src:
|
|
233
|
-
}, null, 8,
|
|
244
|
+
src: s.logoUrl
|
|
245
|
+
}, null, 8, De)) : a("", !0)
|
|
234
246
|
], 8, Ie))), 128))
|
|
235
247
|
])
|
|
236
|
-
],
|
|
237
|
-
[Z, e(t).chat.messages.length <= 1]
|
|
238
|
-
])
|
|
248
|
+
])) : a("", !0)
|
|
239
249
|
]));
|
|
240
250
|
}
|
|
241
251
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DocSettings.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-31f052ad"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -2,35 +2,35 @@ import { defineComponent as a, computed as n, createElementBlock as d, openBlock
|
|
|
2
2
|
import { getSelectedServer as f } from "@scalar/api-client/v2/features/operation";
|
|
3
3
|
import { getActiveEnvironment as h, getServers as g } from "@scalar/api-client/v2/helpers";
|
|
4
4
|
import B from "../../components/ServerSelector.vue.js";
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
5
|
+
import { useState as x } from "../../state/state.js";
|
|
6
|
+
import y from "./Auth.vue.js";
|
|
7
|
+
const k = { class: "docSettings" }, C = /* @__PURE__ */ a({
|
|
8
8
|
__name: "DocSettings",
|
|
9
9
|
props: {
|
|
10
10
|
document: {},
|
|
11
11
|
name: {}
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const { workspaceStore: r, config: i, eventBus: c } =
|
|
14
|
+
const { workspaceStore: r, config: i, eventBus: c } = x(), l = n(
|
|
15
15
|
() => h(r, e.document)
|
|
16
16
|
), o = n(() => {
|
|
17
17
|
const s = g(e.document.servers, {
|
|
18
18
|
documentUrl: e.document["x-scalar-original-source-url"]
|
|
19
19
|
});
|
|
20
|
-
return f(e.document
|
|
21
|
-
}),
|
|
20
|
+
return f(s, e.document["x-scalar-selected-server"]);
|
|
21
|
+
}), v = n(
|
|
22
22
|
() => e.document.components?.securitySchemes ?? {}
|
|
23
23
|
);
|
|
24
|
-
return (s,
|
|
24
|
+
return (s, p) => (S(), d("div", k, [
|
|
25
25
|
m("div", null, [
|
|
26
|
-
u(
|
|
26
|
+
u(y, {
|
|
27
27
|
authStore: t(r).auth,
|
|
28
28
|
document: e.document,
|
|
29
|
-
environment:
|
|
29
|
+
environment: l.value,
|
|
30
30
|
eventBus: t(c),
|
|
31
31
|
name: e.name,
|
|
32
32
|
options: t(i),
|
|
33
|
-
securitySchemes:
|
|
33
|
+
securitySchemes: v.value,
|
|
34
34
|
selectedServer: o.value
|
|
35
35
|
}, null, 8, ["authStore", "document", "environment", "eventBus", "name", "options", "securitySchemes", "selectedServer"])
|
|
36
36
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/Settings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/Settings.vue"],"names":[],"mappings":"AAkKA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAO3B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;AA8LF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import t from "./Settings.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5e4bca68"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|