@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.
Files changed (62) hide show
  1. package/dist/App.vue.d.ts +4 -5
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/App.vue.js +16 -14
  4. package/dist/Chat.vue.d.ts.map +1 -1
  5. package/dist/Chat.vue.js +43 -16
  6. package/dist/api.d.ts +53 -2
  7. package/dist/api.d.ts.map +1 -1
  8. package/dist/api.js +67 -37
  9. package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
  10. package/dist/components/ApprovalSection.vue.js +1 -1
  11. package/dist/components/ApprovalSection.vue2.js +19 -28
  12. package/dist/components/AuthenticationProvided.vue.js +8 -8
  13. package/dist/components/PaymentSection.vue.d.ts +1 -7
  14. package/dist/components/PaymentSection.vue.d.ts.map +1 -1
  15. package/dist/components/PaymentSection.vue.js +2 -2
  16. package/dist/components/PaymentSection.vue2.js +21 -21
  17. package/dist/components/ResponseBody/helpers/media-types.d.ts +0 -4
  18. package/dist/components/ResponseBody/helpers/media-types.d.ts.map +1 -1
  19. package/dist/components/ResponseBody/helpers/media-types.js +0 -1
  20. package/dist/entities/registry/document.d.ts +3 -1
  21. package/dist/entities/registry/document.d.ts.map +1 -1
  22. package/dist/helpers.d.ts +8 -67
  23. package/dist/helpers.d.ts.map +1 -1
  24. package/dist/helpers.js +66 -57
  25. package/dist/hooks/use-agent-key-documents.d.ts +2 -0
  26. package/dist/hooks/use-agent-key-documents.d.ts.map +1 -0
  27. package/dist/hooks/use-agent-key-documents.js +16 -0
  28. package/dist/hooks/use-curated-documents.d.ts +2 -0
  29. package/dist/hooks/use-curated-documents.d.ts.map +1 -0
  30. package/dist/hooks/use-curated-documents.js +12 -0
  31. package/dist/hooks/use-search.d.ts +4 -8
  32. package/dist/hooks/use-search.d.ts.map +1 -1
  33. package/dist/hooks/use-search.js +14 -18
  34. package/dist/hooks/use-term-and-conditions.d.ts +0 -1
  35. package/dist/hooks/use-term-and-conditions.d.ts.map +1 -1
  36. package/dist/hooks/use-term-and-conditions.js +0 -1
  37. package/dist/hooks/use-upload-tmp-document.d.ts +6 -2
  38. package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -1
  39. package/dist/hooks/use-upload-tmp-document.js +45 -23
  40. package/dist/package.json +1 -1
  41. package/dist/registry/add-documents-to-store.d.ts +6 -5
  42. package/dist/registry/add-documents-to-store.d.ts.map +1 -1
  43. package/dist/registry/add-documents-to-store.js +16 -20
  44. package/dist/state/state.d.ts +16 -7
  45. package/dist/state/state.d.ts.map +1 -1
  46. package/dist/state/state.js +92 -78
  47. package/dist/style.css +1 -1
  48. package/dist/views/Chat/Chat.vue.js +2 -2
  49. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +1 -1
  50. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  51. package/dist/views/PromptForm.vue.js +2 -2
  52. package/dist/views/PromptForm.vue2.js +118 -104
  53. package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
  54. package/dist/views/Settings/DocSettings.vue.js +2 -2
  55. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  56. package/dist/views/Settings/Settings.vue.js +2 -2
  57. package/dist/views/Settings/Settings.vue2.js +33 -31
  58. package/package.json +8 -8
  59. package/dist/components/Suggestion.vue.d.ts +0 -10
  60. package/dist/components/Suggestion.vue.d.ts.map +0 -1
  61. package/dist/components/TestRequestButton.vue.d.ts +0 -8
  62. package/dist/components/TestRequestButton.vue.d.ts.map +0 -1
@@ -1,116 +1,114 @@
1
- import { defineComponent as R, useTemplateRef as L, computed as g, watch as y, createElementBlock as d, openBlock as n, Fragment as C, createBlock as i, createCommentVNode as c, createElementVNode as a, unref as t, withDirectives as S, withModifiers as M, vModelText as B, createVNode as m, withCtx as V, renderList as U, createTextVNode as A, toDisplayString as $, createStaticVNode as N, vShow as H } from "vue";
2
- import { ScalarIconButton as k, ScalarLoading as F } from "@scalar/components";
3
- import { ScalarIconPlus as K, ScalarIconX as j, ScalarIconLockSimple as q, ScalarIconCheck as X, ScalarIconArrowUp as O } from "@scalar/icons";
4
- import Z from "../components/ApprovalSection.vue.js";
5
- import G from "../components/ErrorMessage.vue.js";
6
- import J from "../components/PaymentSection.vue.js";
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 tt } from "../entities/prompt/constants.js";
11
- import { useChatApprovals as et } from "../hooks/use-chat-approvals.js";
12
- import { useChatError as ot } from "../hooks/use-chat-error.js";
13
- import { useChatPendingClientToolParts as at } from "../hooks/use-chat-pending-client-tool-parts.js";
14
- import { useUploadTmpDocument as st } from "../hooks/use-upload-tmp-document.js";
15
- import { useState as nt } from "../state/state.js";
16
- const lt = { class: "actionContainer" }, rt = ["disabled"], it = { class: "inputActionsContainer" }, ct = { class: "inputActionsLeft" }, dt = {
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
- }, pt = ["src"], ut = ["onClick"], mt = { class: "inputActionsRight" }, vt = { class: "sendCheckboxContinue" }, gt = {
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
- }, ft = {
22
+ }, fe = {
23
23
  class: "termsAgree",
24
24
  for: "agentTermsAgree"
25
- }, ht = { class: "addMoreContext" }, Mt = /* @__PURE__ */ R({
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(bt, { expose: w, emit: x }) {
29
- const P = x;
30
- w({ focusPrompt: z });
31
- const l = L("agentPrompt"), e = nt(), T = g(() => e.prompt.value.trim().length > 0), I = g(
32
- () => e.prompt.value.trim().length > tt
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
- y(e.prompt, () => {
35
- if (l?.value) {
36
- if (!e.prompt.value.length) {
37
- l.value.style.height = "0px";
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
- l.value.style.height = "auto", l.value.style.height = l.value.scrollHeight + "px";
40
+ i.value.style.height = "auto", i.value.style.height = i.value.scrollHeight + "px";
41
41
  }
42
42
  });
43
- function _(r) {
44
- e.loading.value || r.key === "Enter" && !r.shiftKey && (r.preventDefault(), b(), window.scrollTo(0, document.body.scrollHeight));
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 z() {
47
- l.value?.focus();
46
+ function E() {
47
+ i.value?.focus();
48
48
  }
49
- y(
50
- () => e.chat.status,
51
- (r) => {
52
- (r === "ready" || r === "error") && l.value?.focus();
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: f } = et(), { pendingClientToolParts: D } = at(), u = st();
56
- function E() {
57
- e.terms.accept(), e.mode === "preview" && e.workspaceStore.workspace.activeDocument && u.uploadTempDocument(
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 h = g(
62
- () => !T.value || I.value || !!f.value.length || !!D.value.length || !e.terms.accepted.value || !!u.uploadState.value
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
- h.value || P("submit");
63
+ y.value || P("submit");
66
64
  }
67
- const v = ot();
68
- return (r, o) => (n(), d(C, null, [
69
- t(u).uploadState.value ? (n(), i(W, {
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: t(u).uploadState.value
72
- }, null, 8, ["uploadState"])) : c("", !0),
73
- t(v) ? (n(), i(G, {
69
+ uploadState: e(d).uploadState.value
70
+ }, null, 8, ["uploadState"])) : a("", !0),
71
+ e(v) ? (s(), c(Z, {
74
72
  key: 1,
75
- error: t(v)
76
- }, null, 8, ["error"])) : c("", !0),
77
- t(f).length ? (n(), i(Z, {
73
+ error: e(v)
74
+ }, null, 8, ["error"])) : a("", !0),
75
+ e(h).length ? (s(), c(O, {
78
76
  key: 2,
79
- onApprove: o[0] || (o[0] = (s) => t(p)(!0)),
80
- onReject: o[1] || (o[1] = (s) => t(p)(!1))
81
- })) : c("", !0),
82
- t(v)?.code === t(Y).LIMIT_REACHED ? (n(), i(J, {
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: o[2] || (o[2] = (s) => t(p)(!0)),
85
- onReject: o[3] || (o[3] = (s) => t(p)(!1))
86
- })) : c("", !0),
87
- a("div", lt, [
88
- a("form", {
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: M(b, ["prevent"])
88
+ onSubmit: B(b, ["prevent"])
91
89
  }, [
92
- o[7] || (o[7] = a("label", {
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
- S(a("textarea", {
94
+ C(n("textarea", {
97
95
  id: "agentTextarea",
98
96
  ref: "agentPrompt",
99
- "onUpdate:modelValue": o[4] || (o[4] = (s) => t(e).prompt.value = s),
97
+ "onUpdate:modelValue": l[4] || (l[4] = (o) => e(t).prompt.value = o),
100
98
  class: "prompt custom-scroll",
101
- disabled: t(e).loading.value,
99
+ disabled: e(t).loading.value,
102
100
  name: "prompt",
103
101
  placeholder: "Ask me anything...",
104
- onKeydown: _
105
- }, null, 40, rt), [
106
- [B, t(e).prompt.value]
102
+ onKeydown: I
103
+ }, null, 40, ae), [
104
+ [$, e(t).prompt.value]
107
105
  ]),
108
- a("div", it, [
109
- a("div", ct, [
106
+ n("div", ie, [
107
+ n("div", ue, [
110
108
  m(Q, null, {
111
109
  default: V(() => [
112
- a("button", dt, [
113
- m(t(K), {
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
- (n(!0), d(C, null, U(t(e).registryDocuments.value, (s) => (n(), d("div", {
122
- key: s.id,
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
- s.logoUrl ? (n(), d("img", {
123
+ o.logoUrl ? (s(), r("img", {
126
124
  key: 0,
127
125
  class: "apiPillLogo",
128
- src: s.logoUrl
129
- }, null, 8, pt)) : c("", !0),
130
- A(" " + $(s.title) + " ", 1),
131
- a("button", {
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: (yt) => t(e).removeDocument(s)
133
+ onClick: (M) => e(t).removeDocument(o)
135
134
  }, [
136
- m(t(j), {
135
+ m(e(j), {
137
136
  class: "size-4",
138
137
  weight: "bold"
139
138
  })
140
- ], 8, ut)
139
+ ], 8, de)) : a("", !0)
141
140
  ]))), 128))
142
141
  ]),
143
- a("div", mt, [
144
- t(e).loading.value ? c("", !0) : (n(), i(t(k), {
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: t(q),
146
+ icon: e(q),
148
147
  label: "Scalar",
149
148
  size: "md",
150
149
  weight: "bold",
151
- onClick: o[5] || (o[5] = (s) => t(e).settingsModal.show())
150
+ onClick: l[5] || (l[5] = (o) => e(t).settingsModal.show())
152
151
  }, null, 8, ["icon"])),
153
- a("div", vt, [
154
- !t(e).terms.accepted.value && t(e).mode === "preview" ? (n(), d("div", gt, [
155
- a("input", {
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: E
158
+ onChange: L
160
159
  }, null, 32),
161
- a("label", ft, [
162
- m(t(X), {
160
+ n("label", fe, [
161
+ m(e(J), {
163
162
  class: "termsAgreeIcon",
164
163
  weight: "bold"
165
164
  }),
166
- o[6] || (o[6] = A(" Agree to Terms & Conditions ", -1))
165
+ l[6] || (l[6] = A(" Agree to Terms & Conditions ", -1))
167
166
  ])
168
- ])) : c("", !0),
169
- t(e).loading.value ? (n(), i(t(F), {
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(e).loading.value,
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"])) : (n(), i(t(k), {
186
+ }, null, 8, ["loader"])) : (s(), c(e(_), {
188
187
  key: 1,
189
188
  class: "sendButton h-7 w-7 p-1.5",
190
- disabled: h.value,
191
- icon: t(O),
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
- S(a("div", ht, [...o[8] || (o[8] = [
202
- N('<span data-v-58345013>Add context from dozens of API&#39;s</span><div class="ml-auto flex items-center gap-1" data-v-58345013><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/stripe.png" data-v-58345013></button><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/notion.png" data-v-58345013></button><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/zoom-meetings.png" data-v-58345013></button><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/fathom.png" data-v-58345013></button><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/discord.png" data-v-58345013></button><button class="addAPIContext" type="button" data-v-58345013><img class="size-4" src="https://cdn.scalar.com/agent/x.png" data-v-58345013></button></div>', 2)
203
- ])], 512), [
204
- [H, t(e).chat.messages.length <= 1]
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
- Mt as default
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":"AA0EA,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
+ {"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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d556a3a1"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0cf7195a"]]);
5
5
  export {
6
- p as default
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":"AAwIA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAA;AAM3B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC;;AA6KF,wBAMG"}
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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fb9acd5f"]]);
5
+ const s = /* @__PURE__ */ o(t, [["__scopeId", "data-v-745651bc"]]);
6
6
  export {
7
- a as default
7
+ s as default
8
8
  };
@@ -1,59 +1,61 @@
1
- import { defineComponent as k, createBlock as i, openBlock as o, unref as e, withCtx as y, createElementVNode as r, createVNode as d, createElementBlock as n, Fragment as f, renderList as g, 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 N } from "@scalar/components";
3
- import { ScalarIconCaretDown as U, ScalarIconCaretRight as V } from "@scalar/icons";
4
- import { useState as b } from "../../state/state.js";
5
- import h from "./DocSettings.vue.js";
6
- const I = { class: "settingsHeading" }, T = { class: "documentList" }, A = ["onClick"], B = { key: 0 }, L = {
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
- }, P = { class: "proxyUrlContainer" }, F = /* @__PURE__ */ k({
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: s, proxyUrl: c } = b();
15
+ const { workspaceStore: o, proxyUrl: c } = V();
16
16
  function p(m) {
17
- s.update("x-scalar-active-document", m);
17
+ o.update("x-scalar-active-document", m);
18
18
  }
19
- return (m, t) => (o(), i(e(w), { state: u.modalState }, {
20
- default: y(() => [
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
- t[1] || (t[1] = r("h1", null, "Settings", -1)),
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
- t[2] || (t[2] = r("label", null, " APIs ", -1)),
27
- Object.entries(e(s).workspace.documents).length ? (o(!0), n(f, { key: 0 }, g(Object.entries(
28
- e(s).workspace.documents
29
- ), ([l, a]) => (o(), n("div", {
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(s).workspace.activeDocument === a
37
+ documentNameActive: e(o).workspace.activeDocument === l
36
38
  }]),
37
39
  type: "button",
38
- onClick: (R) => p(l)
40
+ onClick: (j) => p(a)
39
41
  }, [
40
- e(s).workspace.activeDocument === a ? (o(), i(e(U), { key: 0 })) : (o(), i(e(V), { key: 1 })),
41
- S(" @" + _(l), 1)
42
- ], 10, A),
43
- e(s).workspace.activeDocument === a ? (o(), n("div", B, [
44
- d(h, {
45
- document: a,
46
- name: l
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)) : (o(), n("div", L, " No APIs selected. Use + to add context. "))
51
+ ]))), 128)) : (t(), n("div", M, " No APIs selected. Use + to add context. "))
50
52
  ]),
51
- r("div", P, [
52
- t[3] || (t[3] = r("label", { for: "proxyUrl" }, "Proxy URL", -1)),
53
- d(e(N), {
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": t[0] || (t[0] = (l) => C(c) ? c.value = l : null),
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.2",
13
+ "version": "0.3.4",
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/api-client": "2.20.2",
52
+ "@scalar/api-client": "2.21.1",
53
+ "@scalar/components": "0.16.32",
53
54
  "@scalar/icons": "0.5.2",
54
- "@scalar/openapi-types": "0.5.3",
55
55
  "@scalar/helpers": "0.2.9",
56
+ "@scalar/openapi-types": "0.5.3",
56
57
  "@scalar/themes": "0.13.26",
57
- "@scalar/json-magic": "0.9.3",
58
- "@scalar/workspace-store": "0.26.2",
59
- "@scalar/components": "0.16.30",
60
- "@scalar/types": "0.5.10"
58
+ "@scalar/types": "0.5.10",
59
+ "@scalar/workspace-store": "0.27.1",
60
+ "@scalar/json-magic": "0.9.4"
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.4",
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"}