@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.
Files changed (53) hide show
  1. package/dist/App.vue.d.ts +4 -1
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/App.vue.js +13 -11
  4. package/dist/api.d.ts +3 -1
  5. package/dist/api.d.ts.map +1 -1
  6. package/dist/api.js +54 -53
  7. package/dist/client-tools/execute-request.d.ts +1 -0
  8. package/dist/client-tools/execute-request.d.ts.map +1 -1
  9. package/dist/client-tools/execute-request.js +33 -27
  10. package/dist/components/FreeMessagesInfoSection.vue.d.ts.map +1 -1
  11. package/dist/components/FreeMessagesInfoSection.vue.js +1 -1
  12. package/dist/components/FreeMessagesInfoSection.vue2.js +27 -25
  13. package/dist/components/PaymentSection.vue.d.ts.map +1 -1
  14. package/dist/components/PaymentSection.vue.js +1 -1
  15. package/dist/components/PaymentSection.vue2.js +16 -20
  16. package/dist/components/ServerSelector.vue.d.ts.map +1 -1
  17. package/dist/components/ServerSelector.vue.js +27 -21
  18. package/dist/components/UploadSection.vue.js +2 -2
  19. package/dist/components/UploadSection.vue2.js +13 -13
  20. package/dist/consts/urls.d.ts +8 -0
  21. package/dist/consts/urls.d.ts.map +1 -0
  22. package/dist/consts/urls.js +10 -0
  23. package/dist/helpers.d.ts +4 -10
  24. package/dist/helpers.d.ts.map +1 -1
  25. package/dist/helpers.js +34 -45
  26. package/dist/hooks/use-agent-key-documents.js +6 -6
  27. package/dist/hooks/use-chat-approvals.d.ts.map +1 -1
  28. package/dist/hooks/use-chat-approvals.js +7 -6
  29. package/dist/hooks/use-signup-link.d.ts +12 -0
  30. package/dist/hooks/use-signup-link.d.ts.map +1 -0
  31. package/dist/hooks/use-signup-link.js +12 -0
  32. package/dist/hooks/use-upload-tmp-document.d.ts +3 -0
  33. package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -1
  34. package/dist/hooks/use-upload-tmp-document.js +31 -28
  35. package/dist/package.json +1 -1
  36. package/dist/state/state.d.ts +5 -2
  37. package/dist/state/state.d.ts.map +1 -1
  38. package/dist/state/state.js +140 -131
  39. package/dist/style.css +1 -1
  40. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +1 -1
  41. package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +12 -12
  42. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  43. package/dist/views/PromptForm.vue.js +2 -2
  44. package/dist/views/PromptForm.vue2.js +132 -122
  45. package/dist/views/Settings/DocSettings.vue.js +1 -1
  46. package/dist/views/Settings/DocSettings.vue2.js +10 -10
  47. package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
  48. package/dist/views/Settings/Settings.vue.js +2 -2
  49. package/dist/views/Settings/Settings.vue2.js +53 -43
  50. package/dist/views/Start.vue.d.ts.map +1 -1
  51. package/dist/views/Start.vue.js +1 -1
  52. package/dist/views/Start.vue2.js +28 -27
  53. package/package.json +7 -7
@@ -1,63 +1,73 @@
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 = {
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
- }, R = { class: "proxyUrlContainer" }, F = /* @__PURE__ */ k({
10
+ }, E = { class: "proxyUrlContainer" }, I = ["href"], z = /* @__PURE__ */ k({
10
11
  __name: "Settings",
11
12
  props: {
12
13
  modalState: {}
13
14
  },
14
- setup(u) {
15
- const { workspaceStore: o, proxyUrl: c } = V();
16
- function p(m) {
17
- o.update("x-scalar-active-document", m);
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 (m, s) => (t(), i(e(w), {
20
+ return (u, t) => (r(), c(e(x), {
20
21
  class: "settingsModal",
21
- state: u.modalState
22
+ state: f.modalState
22
23
  }, {
23
- default: g(() => [
24
- r("div", I, [
25
- s[1] || (s[1] = r("h1", null, "Settings", -1)),
26
- d(e(D), { class: "colorToggle ml-auto" })
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
- r("div", T, [
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,
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
- r("button", {
36
- class: x(["documentName", {
37
- documentNameActive: e(o).workspace.activeDocument === l
36
+ o("button", {
37
+ class: C(["documentName", {
38
+ documentNameActive: e(s).workspace.activeDocument === n
38
39
  }]),
39
40
  type: "button",
40
- onClick: (j) => p(a)
41
+ onClick: (B) => g(l)
41
42
  }, [
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
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
- ])) : v("", !0)
51
- ]))), 128)) : (t(), n("div", M, " No APIs selected. Use + to add context. "))
51
+ ])) : y("", !0)
52
+ ]))), 128)) : (r(), a("div", A, " There's no API definition loaded. Use the + button to load APIs. "))
52
53
  ]),
53
- r("div", R, [
54
- s[2] || (s[2] = r("label", { for: "proxyUrl" }, "Proxy URL", -1)),
55
- d(e(h), {
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(c),
58
- "onUpdate:modelValue": s[0] || (s[0] = (a) => C(c) ? c.value = a : null),
59
- placeholder: "https://proxy.scalar.com"
60
- }, null, 8, ["modelValue"])
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
- F as default
78
+ z as default
69
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Start.vue.d.ts","sourceRoot":"","sources":["../../src/views/Start.vue"],"names":[],"mappings":"AA2MA,QAAA,MAAM,YAAY;;;;;;iFAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
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"}
@@ -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-1fbb0eb5"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-56f7e8dd"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,42 +1,43 @@
1
- import { defineComponent as d, createElementBlock as r, openBlock as s, createVNode as n, createElementVNode as t, createTextVNode as o, unref as u, Fragment as i } from "vue";
2
- import g from "../components/Logo.vue.js";
3
- import { useState as y } from "../state/state.js";
4
- import f from "./PromptForm.vue.js";
5
- const c = { class: "startContainer" }, k = { class: "disclaimerText" }, F = /* @__PURE__ */ d({
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(v, { emit: l }) {
9
- const a = l, { mode: m } = y();
10
- return (S, e) => (s(), r("div", c, [
11
- n(g, { class: "agentLogo" }),
12
- e[6] || (e[6] = t("h1", { class: "heading" }, "How can I help you today?", -1)),
13
- n(f, {
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] = (p) => a("submit")),
16
- onUploadApi: e[1] || (e[1] = (p) => a("uploadApi"))
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", k, [
19
- u(m) === "preview" ? (s(), r(i, { key: 0 }, [
20
- o(" By messaging Agent Scalar your OpenAPI Document will be Temporarily uploaded to Scalar's Servers. You must agree to our ")
21
- ], 64)) : (s(), r(i, { key: 1 }, [
22
- o(" By messaging Agent Scalar you agree to our ")
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
- e[2] || (e[2] = t("a", {
25
+ t("a", {
25
26
  class: "disclaimerLink",
26
- href: "https://scalar.com/legal/terms-and-conditions",
27
+ href: a(l).TERMS_AND_CONDITIONS,
27
28
  target: "_blank"
28
- }, "Terms ", -1)),
29
- e[3] || (e[3] = o(" and ", -1)),
30
- e[4] || (e[4] = t("a", {
29
+ }, "Terms", 8, k),
30
+ e[2] || (e[2] = o(" and ", -1)),
31
+ t("a", {
31
32
  class: "disclaimerLink",
32
- href: "https://scalar.com/legal/privacy-policy",
33
+ href: a(l).PRIVACY_POLICY,
33
34
  target: "_blank"
34
- }, " Privacy Policy", -1)),
35
- e[5] || (e[5] = o(". ", -1))
35
+ }, "Privacy Policy", 8, A),
36
+ e[3] || (e[3] = o(". ", -1))
36
37
  ])
37
38
  ]));
38
39
  }
39
40
  });
40
41
  export {
41
- F as default
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.5.17",
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.29.3",
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/types": "0.6.7",
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.34.3"
62
+ "@scalar/workspace-store": "0.35.1"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@modelcontextprotocol/sdk": "1.26.0",