@scalar/agent-chat 0.3.2 → 0.3.3
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 +67 -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 +9 -9
- 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,116 +1,114 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconButton as
|
|
3
|
-
import { ScalarIconPlus as K, ScalarIconX as j, ScalarIconLockSimple as q, ScalarIconCheck as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as U, useTemplateRef as z, computed as g, watch as k, createElementBlock as r, openBlock as s, Fragment as f, createBlock as c, createCommentVNode as a, createElementVNode as n, unref as e, withDirectives as C, withModifiers as B, vModelText as $, createVNode as m, withCtx as V, renderList as S, createTextVNode as A, toDisplayString as H, vShow as N } from "vue";
|
|
2
|
+
import { ScalarIconButton as _, ScalarLoading as F } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as K, ScalarIconX as j, ScalarIconLockSimple as q, ScalarIconCheck as J, ScalarIconArrowUp as X } from "@scalar/icons";
|
|
4
|
+
import O from "../components/ApprovalSection.vue.js";
|
|
5
|
+
import Z from "../components/ErrorMessage.vue.js";
|
|
6
|
+
import G from "../components/PaymentSection.vue.js";
|
|
7
7
|
import Q from "../components/SearchPopover.vue.js";
|
|
8
8
|
import W from "../components/UploadSection.vue.js";
|
|
9
9
|
import { AgentErrorCodes as Y } from "../entities/error/constants.js";
|
|
10
|
-
import { MAX_PROMPT_SIZE as
|
|
11
|
-
import { useChatApprovals as
|
|
12
|
-
import { useChatError as
|
|
13
|
-
import { useChatPendingClientToolParts as
|
|
14
|
-
import { useUploadTmpDocument as
|
|
15
|
-
import { useState as
|
|
16
|
-
const
|
|
10
|
+
import { MAX_PROMPT_SIZE as ee } from "../entities/prompt/constants.js";
|
|
11
|
+
import { useChatApprovals as te } from "../hooks/use-chat-approvals.js";
|
|
12
|
+
import { useChatError as oe } from "../hooks/use-chat-error.js";
|
|
13
|
+
import { useChatPendingClientToolParts as le } from "../hooks/use-chat-pending-client-tool-parts.js";
|
|
14
|
+
import { useUploadTmpDocument as se } from "../hooks/use-upload-tmp-document.js";
|
|
15
|
+
import { useState as ne } from "../state/state.js";
|
|
16
|
+
const re = { class: "actionContainer" }, ae = ["disabled"], ie = { class: "inputActionsContainer" }, ue = { class: "inputActionsLeft" }, ce = {
|
|
17
17
|
class: "addAPIButton",
|
|
18
18
|
type: "button"
|
|
19
|
-
},
|
|
19
|
+
}, pe = ["src"], de = ["onClick"], me = { class: "inputActionsRight" }, ve = { class: "sendCheckboxContinue" }, ge = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "relative flex items-center gap-1.5"
|
|
22
|
-
},
|
|
22
|
+
}, fe = {
|
|
23
23
|
class: "termsAgree",
|
|
24
24
|
for: "agentTermsAgree"
|
|
25
|
-
},
|
|
25
|
+
}, he = { class: "addMoreContext" }, ye = { class: "ml-auto flex items-center gap-1" }, be = ["onClick"], ke = ["alt", "src"], Be = /* @__PURE__ */ U({
|
|
26
26
|
__name: "PromptForm",
|
|
27
27
|
emits: ["submit"],
|
|
28
|
-
setup(
|
|
29
|
-
const P =
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
() =>
|
|
28
|
+
setup(Ce, { expose: T, emit: w }) {
|
|
29
|
+
const P = w;
|
|
30
|
+
T({ focusPrompt: E });
|
|
31
|
+
const i = z("agentPrompt"), t = ne(), x = g(() => t.prompt.value.trim().length > 0), D = g(
|
|
32
|
+
() => t.prompt.value.trim().length > ee
|
|
33
33
|
);
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
if (!
|
|
37
|
-
|
|
34
|
+
k(t.prompt, () => {
|
|
35
|
+
if (i?.value) {
|
|
36
|
+
if (!t.prompt.value.length) {
|
|
37
|
+
i.value.style.height = "0px";
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
i.value.style.height = "auto", i.value.style.height = i.value.scrollHeight + "px";
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function I(u) {
|
|
44
|
+
t.loading.value || u.key === "Enter" && !u.shiftKey && (u.preventDefault(), b(), window.scrollTo(0, document.body.scrollHeight));
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function E() {
|
|
47
|
+
i.value?.focus();
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
() =>
|
|
51
|
-
(
|
|
52
|
-
(
|
|
49
|
+
k(
|
|
50
|
+
() => t.chat.status,
|
|
51
|
+
(u) => {
|
|
52
|
+
(u === "ready" || u === "error") && i.value?.focus();
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
const { respondToToolCalls: p, approvalRequestedParts:
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
e.workspaceStore.workspace.activeDocument
|
|
59
|
-
);
|
|
55
|
+
const { respondToToolCalls: p, approvalRequestedParts: h } = te(), { pendingClientToolParts: R } = le(), d = se();
|
|
56
|
+
function L() {
|
|
57
|
+
t.terms.accept(), t.mode === "preview" && t.getActiveDocumentJson && d.uploadTempDocument(t.getActiveDocumentJson());
|
|
60
58
|
}
|
|
61
|
-
const
|
|
62
|
-
() => !
|
|
59
|
+
const y = g(
|
|
60
|
+
() => !x.value || D.value || !!h.value.length || !!R.value.length || !t.terms.accepted.value || !!d.uploadState.value
|
|
63
61
|
);
|
|
64
62
|
function b() {
|
|
65
|
-
|
|
63
|
+
y.value || P("submit");
|
|
66
64
|
}
|
|
67
|
-
const v =
|
|
68
|
-
return (
|
|
69
|
-
|
|
65
|
+
const v = oe();
|
|
66
|
+
return (u, l) => (s(), r(f, null, [
|
|
67
|
+
e(d).uploadState.value ? (s(), c(W, {
|
|
70
68
|
key: 0,
|
|
71
|
-
uploadState:
|
|
72
|
-
}, null, 8, ["uploadState"])) :
|
|
73
|
-
|
|
69
|
+
uploadState: e(d).uploadState.value
|
|
70
|
+
}, null, 8, ["uploadState"])) : a("", !0),
|
|
71
|
+
e(v) ? (s(), c(Z, {
|
|
74
72
|
key: 1,
|
|
75
|
-
error:
|
|
76
|
-
}, null, 8, ["error"])) :
|
|
77
|
-
|
|
73
|
+
error: e(v)
|
|
74
|
+
}, null, 8, ["error"])) : a("", !0),
|
|
75
|
+
e(h).length ? (s(), c(O, {
|
|
78
76
|
key: 2,
|
|
79
|
-
onApprove:
|
|
80
|
-
onReject:
|
|
81
|
-
})) :
|
|
82
|
-
|
|
77
|
+
onApprove: l[0] || (l[0] = (o) => e(p)(!0)),
|
|
78
|
+
onReject: l[1] || (l[1] = (o) => e(p)(!1))
|
|
79
|
+
})) : a("", !0),
|
|
80
|
+
e(v)?.code === e(Y).LIMIT_REACHED ? (s(), c(G, {
|
|
83
81
|
key: 3,
|
|
84
|
-
onApprove:
|
|
85
|
-
onReject:
|
|
86
|
-
})) :
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
onApprove: l[2] || (l[2] = (o) => e(p)(!0)),
|
|
83
|
+
onReject: l[3] || (l[3] = (o) => e(p)(!1))
|
|
84
|
+
})) : a("", !0),
|
|
85
|
+
n("div", re, [
|
|
86
|
+
n("form", {
|
|
89
87
|
class: "promptForm",
|
|
90
|
-
onSubmit:
|
|
88
|
+
onSubmit: B(b, ["prevent"])
|
|
91
89
|
}, [
|
|
92
|
-
|
|
90
|
+
l[7] || (l[7] = n("label", {
|
|
93
91
|
class: "agentLabel",
|
|
94
92
|
for: "agentTextarea"
|
|
95
93
|
}, " Type a Request To get Started ", -1)),
|
|
96
|
-
|
|
94
|
+
C(n("textarea", {
|
|
97
95
|
id: "agentTextarea",
|
|
98
96
|
ref: "agentPrompt",
|
|
99
|
-
"onUpdate:modelValue":
|
|
97
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => e(t).prompt.value = o),
|
|
100
98
|
class: "prompt custom-scroll",
|
|
101
|
-
disabled: t
|
|
99
|
+
disabled: e(t).loading.value,
|
|
102
100
|
name: "prompt",
|
|
103
101
|
placeholder: "Ask me anything...",
|
|
104
|
-
onKeydown:
|
|
105
|
-
}, null, 40,
|
|
106
|
-
[
|
|
102
|
+
onKeydown: I
|
|
103
|
+
}, null, 40, ae), [
|
|
104
|
+
[$, e(t).prompt.value]
|
|
107
105
|
]),
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
n("div", ie, [
|
|
107
|
+
n("div", ue, [
|
|
110
108
|
m(Q, null, {
|
|
111
109
|
default: V(() => [
|
|
112
|
-
|
|
113
|
-
m(
|
|
110
|
+
n("button", ce, [
|
|
111
|
+
m(e(K), {
|
|
114
112
|
class: "size-4",
|
|
115
113
|
weight: "bold"
|
|
116
114
|
})
|
|
@@ -118,59 +116,60 @@ const lt = { class: "actionContainer" }, rt = ["disabled"], it = { class: "input
|
|
|
118
116
|
]),
|
|
119
117
|
_: 1
|
|
120
118
|
}),
|
|
121
|
-
(
|
|
122
|
-
key:
|
|
119
|
+
(s(!0), r(f, null, S(e(t).registryDocuments.value, (o) => (s(), r("div", {
|
|
120
|
+
key: o.id,
|
|
123
121
|
class: "apiPill"
|
|
124
122
|
}, [
|
|
125
|
-
|
|
123
|
+
o.logoUrl ? (s(), r("img", {
|
|
126
124
|
key: 0,
|
|
127
125
|
class: "apiPillLogo",
|
|
128
|
-
src:
|
|
129
|
-
}, null, 8,
|
|
130
|
-
A(" " +
|
|
131
|
-
|
|
126
|
+
src: o.logoUrl
|
|
127
|
+
}, null, 8, pe)) : a("", !0),
|
|
128
|
+
A(" " + H(o.title) + " ", 1),
|
|
129
|
+
o.removable ? (s(), r("button", {
|
|
130
|
+
key: 1,
|
|
132
131
|
class: "apiPillRemove",
|
|
133
132
|
type: "button",
|
|
134
|
-
onClick: (
|
|
133
|
+
onClick: (M) => e(t).removeDocument(o)
|
|
135
134
|
}, [
|
|
136
|
-
m(
|
|
135
|
+
m(e(j), {
|
|
137
136
|
class: "size-4",
|
|
138
137
|
weight: "bold"
|
|
139
138
|
})
|
|
140
|
-
], 8,
|
|
139
|
+
], 8, de)) : a("", !0)
|
|
141
140
|
]))), 128))
|
|
142
141
|
]),
|
|
143
|
-
|
|
144
|
-
t
|
|
142
|
+
n("div", me, [
|
|
143
|
+
e(t).loading.value ? a("", !0) : (s(), c(e(_), {
|
|
145
144
|
key: 0,
|
|
146
145
|
class: "settingsButton h-7 w-7 p-1.5",
|
|
147
|
-
icon:
|
|
146
|
+
icon: e(q),
|
|
148
147
|
label: "Scalar",
|
|
149
148
|
size: "md",
|
|
150
149
|
weight: "bold",
|
|
151
|
-
onClick:
|
|
150
|
+
onClick: l[5] || (l[5] = (o) => e(t).settingsModal.show())
|
|
152
151
|
}, null, 8, ["icon"])),
|
|
153
|
-
|
|
154
|
-
!t
|
|
155
|
-
|
|
152
|
+
n("div", ve, [
|
|
153
|
+
!e(t).terms.accepted.value && e(t).mode === "preview" ? (s(), r("div", ge, [
|
|
154
|
+
n("input", {
|
|
156
155
|
id: "agentTermsAgree",
|
|
157
156
|
class: "sr-only",
|
|
158
157
|
type: "checkbox",
|
|
159
|
-
onChange:
|
|
158
|
+
onChange: L
|
|
160
159
|
}, null, 32),
|
|
161
|
-
|
|
162
|
-
m(
|
|
160
|
+
n("label", fe, [
|
|
161
|
+
m(e(J), {
|
|
163
162
|
class: "termsAgreeIcon",
|
|
164
163
|
weight: "bold"
|
|
165
164
|
}),
|
|
166
|
-
|
|
165
|
+
l[6] || (l[6] = A(" Agree to Terms & Conditions ", -1))
|
|
167
166
|
])
|
|
168
|
-
])) :
|
|
169
|
-
t
|
|
167
|
+
])) : a("", !0),
|
|
168
|
+
e(t).loading.value ? (s(), c(e(F), {
|
|
170
169
|
key: 2,
|
|
171
170
|
class: "loader h-7 w-7",
|
|
172
171
|
loader: {
|
|
173
|
-
isLoading: t
|
|
172
|
+
isLoading: e(t).loading.value,
|
|
174
173
|
isValid: !1,
|
|
175
174
|
clear: async () => {
|
|
176
175
|
},
|
|
@@ -184,11 +183,11 @@ const lt = { class: "actionContainer" }, rt = ["disabled"], it = { class: "input
|
|
|
184
183
|
}
|
|
185
184
|
},
|
|
186
185
|
size: "2xl"
|
|
187
|
-
}, null, 8, ["loader"])) : (
|
|
186
|
+
}, null, 8, ["loader"])) : (s(), c(e(_), {
|
|
188
187
|
key: 1,
|
|
189
188
|
class: "sendButton h-7 w-7 p-1.5",
|
|
190
|
-
disabled:
|
|
191
|
-
icon:
|
|
189
|
+
disabled: y.value,
|
|
190
|
+
icon: e(X),
|
|
192
191
|
label: "Scalar",
|
|
193
192
|
size: "md",
|
|
194
193
|
type: "submit",
|
|
@@ -198,15 +197,30 @@ const lt = { class: "actionContainer" }, rt = ["disabled"], it = { class: "input
|
|
|
198
197
|
])
|
|
199
198
|
])
|
|
200
199
|
], 32),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
C(n("div", he, [
|
|
201
|
+
l[8] || (l[8] = n("span", null, "Add context from dozens of API's", -1)),
|
|
202
|
+
n("div", ye, [
|
|
203
|
+
(s(!0), r(f, null, S(e(t).curatedDocuments.value, (o) => (s(), r("button", {
|
|
204
|
+
key: o.id,
|
|
205
|
+
class: "addAPIContext",
|
|
206
|
+
type: "button",
|
|
207
|
+
onClick: (M) => e(t).addDocument(o)
|
|
208
|
+
}, [
|
|
209
|
+
o.logoUrl ? (s(), r("img", {
|
|
210
|
+
key: 0,
|
|
211
|
+
alt: o.title,
|
|
212
|
+
class: "size-4",
|
|
213
|
+
src: o.logoUrl
|
|
214
|
+
}, null, 8, ke)) : a("", !0)
|
|
215
|
+
], 8, be))), 128))
|
|
216
|
+
])
|
|
217
|
+
], 512), [
|
|
218
|
+
[N, e(t).chat.messages.length <= 1]
|
|
205
219
|
])
|
|
206
220
|
])
|
|
207
221
|
], 64));
|
|
208
222
|
}
|
|
209
223
|
});
|
|
210
224
|
export {
|
|
211
|
-
|
|
225
|
+
Be as default
|
|
212
226
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/DocSettings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Settings/DocSettings.vue"],"names":[],"mappings":"AAyEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAOlF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAoGF,wBAMG"}
|
|
@@ -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
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0cf7195a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -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":"AAqJA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAM3B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AAgLF,wBAMG"}
|
|
@@ -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 s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-745651bc"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
s as default
|
|
8
8
|
};
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { defineComponent as k, createBlock as i, openBlock as
|
|
2
|
-
import { ScalarModal as w, ScalarColorModeToggle as D, ScalarTextInput as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
4
|
-
import { useState as
|
|
5
|
-
import
|
|
6
|
-
const I = { class: "settingsHeading" }, T = { class: "documentList" },
|
|
1
|
+
import { defineComponent as k, createBlock as i, openBlock as t, unref as e, withCtx as g, createElementVNode as r, createVNode as d, createElementBlock as n, Fragment as y, renderList as f, createCommentVNode as v, normalizeClass as x, createTextVNode as S, toDisplayString as _, isRef as C } from "vue";
|
|
2
|
+
import { ScalarModal as w, ScalarColorModeToggle as D, ScalarTextInput as h } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as N, ScalarIconCaretRight as U } from "@scalar/icons";
|
|
4
|
+
import { useState as V } from "../../state/state.js";
|
|
5
|
+
import b from "./DocSettings.vue.js";
|
|
6
|
+
const I = { class: "settingsHeading" }, T = { class: "documentList" }, B = ["onClick"], L = { key: 0 }, M = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "noDocuments"
|
|
9
|
-
},
|
|
9
|
+
}, R = { class: "proxyUrlContainer" }, F = /* @__PURE__ */ k({
|
|
10
10
|
__name: "Settings",
|
|
11
11
|
props: {
|
|
12
12
|
modalState: {}
|
|
13
13
|
},
|
|
14
14
|
setup(u) {
|
|
15
|
-
const { workspaceStore:
|
|
15
|
+
const { workspaceStore: o, proxyUrl: c } = V();
|
|
16
16
|
function p(m) {
|
|
17
|
-
|
|
17
|
+
o.update("x-scalar-active-document", m);
|
|
18
18
|
}
|
|
19
|
-
return (m,
|
|
20
|
-
|
|
19
|
+
return (m, s) => (t(), i(e(w), {
|
|
20
|
+
class: "settingsModal",
|
|
21
|
+
state: u.modalState
|
|
22
|
+
}, {
|
|
23
|
+
default: g(() => [
|
|
21
24
|
r("div", I, [
|
|
22
|
-
|
|
25
|
+
s[1] || (s[1] = r("h1", null, "Settings", -1)),
|
|
23
26
|
d(e(D), { class: "colorToggle ml-auto" })
|
|
24
27
|
]),
|
|
25
28
|
r("div", T, [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
key: l,
|
|
29
|
+
Object.entries(e(o).workspace.documents).length ? (t(!0), n(y, { key: 0 }, f(Object.entries(
|
|
30
|
+
e(o).workspace.documents
|
|
31
|
+
), ([a, l]) => (t(), n("div", {
|
|
32
|
+
key: a,
|
|
31
33
|
class: "document"
|
|
32
34
|
}, [
|
|
33
35
|
r("button", {
|
|
34
36
|
class: x(["documentName", {
|
|
35
|
-
documentNameActive: e(
|
|
37
|
+
documentNameActive: e(o).workspace.activeDocument === l
|
|
36
38
|
}]),
|
|
37
39
|
type: "button",
|
|
38
|
-
onClick: (
|
|
40
|
+
onClick: (j) => p(a)
|
|
39
41
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
], 10,
|
|
43
|
-
e(
|
|
44
|
-
d(
|
|
45
|
-
document:
|
|
46
|
-
name:
|
|
42
|
+
S(" @" + _(a) + " ", 1),
|
|
43
|
+
e(o).workspace.activeDocument === l ? (t(), i(e(N), { key: 0 })) : (t(), i(e(U), { key: 1 }))
|
|
44
|
+
], 10, B),
|
|
45
|
+
e(o).workspace.activeDocument === l ? (t(), n("div", L, [
|
|
46
|
+
d(b, {
|
|
47
|
+
document: l,
|
|
48
|
+
name: a
|
|
47
49
|
}, null, 8, ["document", "name"])
|
|
48
50
|
])) : v("", !0)
|
|
49
|
-
]))), 128)) : (
|
|
51
|
+
]))), 128)) : (t(), n("div", M, " No APIs selected. Use + to add context. "))
|
|
50
52
|
]),
|
|
51
|
-
r("div",
|
|
52
|
-
|
|
53
|
-
d(e(
|
|
53
|
+
r("div", R, [
|
|
54
|
+
s[2] || (s[2] = r("label", { for: "proxyUrl" }, "Proxy URL", -1)),
|
|
55
|
+
d(e(h), {
|
|
54
56
|
id: "proxyUrl",
|
|
55
57
|
modelValue: e(c),
|
|
56
|
-
"onUpdate:modelValue":
|
|
58
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => C(c) ? c.value = a : null),
|
|
57
59
|
placeholder: "https://proxy.scalar.com"
|
|
58
60
|
}, null, 8, ["modelValue"])
|
|
59
61
|
])
|
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.3.
|
|
13
|
+
"version": "0.3.3",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=20"
|
|
16
16
|
},
|
|
@@ -49,22 +49,22 @@
|
|
|
49
49
|
"vue": "^3.5.26",
|
|
50
50
|
"whatwg-mimetype": "4.0.0",
|
|
51
51
|
"zod": "^4.3.5",
|
|
52
|
-
"@scalar/
|
|
53
|
-
"@scalar/
|
|
54
|
-
"@scalar/openapi-types": "0.5.3",
|
|
52
|
+
"@scalar/json-magic": "0.9.4",
|
|
53
|
+
"@scalar/components": "0.16.32",
|
|
55
54
|
"@scalar/helpers": "0.2.9",
|
|
55
|
+
"@scalar/api-client": "2.21.1",
|
|
56
|
+
"@scalar/icons": "0.5.2",
|
|
56
57
|
"@scalar/themes": "0.13.26",
|
|
57
|
-
"@scalar/
|
|
58
|
-
"@scalar/
|
|
59
|
-
"@scalar/
|
|
60
|
-
"@scalar/types": "0.5.10"
|
|
58
|
+
"@scalar/openapi-types": "0.5.3",
|
|
59
|
+
"@scalar/types": "0.5.10",
|
|
60
|
+
"@scalar/workspace-store": "0.27.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@modelcontextprotocol/sdk": "1.25.2",
|
|
64
64
|
"@tailwindcss/vite": "^4.1.18",
|
|
65
65
|
"@types/whatwg-mimetype": "3.0.2",
|
|
66
66
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
67
|
-
"hono": "4.11.
|
|
67
|
+
"hono": "4.11.7",
|
|
68
68
|
"tailwindcss": "^4.1.18",
|
|
69
69
|
"vite": "^7.3.1",
|
|
70
70
|
"@scalar/build-tooling": "0.4.1"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
text: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
-
click: () => any;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
onClick?: (() => any) | undefined;
|
|
8
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
export default _default;
|
|
10
|
-
//# sourceMappingURL=Suggestion.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Suggestion.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;AAwDpC,wBAOG"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
method: HttpMethod;
|
|
4
|
-
path: string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
export default _default;
|
|
8
|
-
//# sourceMappingURL=TestRequestButton.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/TestRequestButton.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAqEF,wBAMG"}
|