@scalar/agent-chat 0.4.0 → 0.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ApprovalSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApprovalSection.vue"],"names":[],"mappings":";;;;;;;AAqMA,wBAMG"}
1
+ {"version":3,"file":"ApprovalSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApprovalSection.vue"],"names":[],"mappings":";;;;;;;AAwMA,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ApprovalSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1cb4fa51"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a7e6c699"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorMessage.vue.d.ts","sourceRoot":"","sources":["../../src/components/ErrorMessage.vue"],"names":[],"mappings":"AAqCA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;;AAoDxC,wBAMG"}
1
+ {"version":3,"file":"ErrorMessage.vue.d.ts","sourceRoot":"","sources":["../../src/components/ErrorMessage.vue"],"names":[],"mappings":"AA+CA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;;AA2DxC,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ErrorMessage.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e26328c"]]);
4
+ const t = /* @__PURE__ */ r(o, [["__scopeId", "data-v-63a481da"]]);
5
5
  export {
6
- a as default
6
+ t as default
7
7
  };
@@ -1,22 +1,25 @@
1
- import { defineComponent as o, createElementBlock as t, createCommentVNode as c, openBlock as n, createVNode as s, createTextVNode as a, unref as m, toDisplayString as i } from "vue";
2
- import { ScalarIconXCircle as d } from "@scalar/icons";
1
+ import { defineComponent as o, createElementBlock as t, createCommentVNode as c, openBlock as n, createVNode as s, createTextVNode as a, unref as m, toDisplayString as d } from "vue";
2
+ import { ScalarIconInfo as i } from "@scalar/icons";
3
3
  import { AgentErrorCodes as l } from "../entities/error/constants.js";
4
- const _ = {
4
+ const p = {
5
5
  key: 0,
6
- class: "error"
7
- }, D = /* @__PURE__ */ o({
6
+ class: "error gap-1.5"
7
+ }, C = /* @__PURE__ */ o({
8
8
  __name: "ErrorMessage",
9
9
  props: {
10
10
  error: {}
11
11
  },
12
12
  setup(e) {
13
13
  const r = [l.LIMIT_REACHED];
14
- return (p, E) => r.includes(e.error.code) ? c("", !0) : (n(), t("div", _, [
15
- s(m(d)),
16
- a(" " + i(e.error.message), 1)
14
+ return (_, f) => r.includes(e.error.code) ? c("", !0) : (n(), t("div", p, [
15
+ s(m(i), {
16
+ class: "text-red size-4",
17
+ weight: "bold"
18
+ }),
19
+ a(" " + d(e.error.message), 1)
17
20
  ]));
18
21
  }
19
22
  });
20
23
  export {
21
- D as default
24
+ C as default
22
25
  };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=FreeMessagesInfoSection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FreeMessagesInfoSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/FreeMessagesInfoSection.vue"],"names":[],"mappings":";AAkQA,wBAKG"}
@@ -0,0 +1,7 @@
1
+ import o from "./FreeMessagesInfoSection.vue2.js";
2
+ /* empty css */
3
+ import e from "../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2f53f9bf"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,49 @@
1
+ import { defineComponent as u, ref as d, withDirectives as f, createElementBlock as p, openBlock as m, createElementVNode as e, createVNode as r, createTextVNode as g, unref as i, vShow as _ } from "vue";
2
+ import { ScalarIconInfo as w, ScalarIconX as b } from "@scalar/icons";
3
+ import { useState as v } from "../state/state.js";
4
+ const h = { class: "freeMessagesInfoSection" }, x = { class: "infoText flex items-center gap-1.5" }, I = { class: "actionsContainer" }, k = /* @__PURE__ */ u({
5
+ __name: "FreeMessagesInfoSection",
6
+ setup(S) {
7
+ const t = d(!1), { dashboardUrl: o, mode: s, uploadedTmpDocumentUrl: n } = v();
8
+ function c() {
9
+ s === "full" && window.location.replace(o), s === "preview" && window.location.replace(
10
+ n.value ? `${o}/register?flow=oss-agent&docUrl=${n.value}` : o
11
+ );
12
+ }
13
+ function l() {
14
+ t.value = !0;
15
+ }
16
+ return (y, a) => f((m(), p("div", h, [
17
+ e("strong", x, [
18
+ r(i(w), {
19
+ class: "text-blue size-4",
20
+ weight: "bold"
21
+ }),
22
+ a[0] || (a[0] = g(" You get 10 free messages, you can upgrade at anytime to get more for your API. ", -1))
23
+ ]),
24
+ e("div", I, [
25
+ e("button", {
26
+ class: "actionButton upgradeButton",
27
+ type: "button",
28
+ onClick: c
29
+ }, " Upgrade "),
30
+ e("button", {
31
+ "aria-label": "Close",
32
+ class: "closeButton",
33
+ type: "button",
34
+ onClick: l
35
+ }, [
36
+ r(i(b), {
37
+ class: "size-4",
38
+ weight: "bold"
39
+ })
40
+ ])
41
+ ])
42
+ ], 512)), [
43
+ [_, !t.value]
44
+ ]);
45
+ }
46
+ });
47
+ export {
48
+ k as default
49
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/PaymentSection.vue"],"names":[],"mappings":";AAqUA,wBAKG"}
1
+ {"version":3,"file":"PaymentSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/PaymentSection.vue"],"names":[],"mappings":";AAwUA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./PaymentSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bbcefd08"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0f59d089"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,22 +1,22 @@
1
- import { defineComponent as o, createElementBlock as c, openBlock as p, createElementVNode as t, createVNode as i, createTextVNode as r, unref as b, createStaticVNode as f } from "vue";
2
- import { ScalarIconInfo as l } from "@scalar/icons";
3
- import { useState as v } from "../state/state.js";
4
- const m = { class: "paymentSection" }, u = { class: "approvalText flex items-center gap-1.5" }, x = /* @__PURE__ */ o({
1
+ import { defineComponent as o, createElementBlock as p, openBlock as i, createElementVNode as t, createVNode as r, createTextVNode as f, unref as l, createStaticVNode as v } from "vue";
2
+ import { ScalarIconInfo as c } from "@scalar/icons";
3
+ import { useState as m } from "../state/state.js";
4
+ const u = { class: "paymentSection" }, y = { class: "approvalText flex items-center gap-1.5" }, x = /* @__PURE__ */ o({
5
5
  __name: "PaymentSection",
6
- setup(y) {
7
- const { dashboardUrl: a, mode: n, uploadedTmpDocumentUrl: d } = v();
6
+ setup(I) {
7
+ const { dashboardUrl: e, mode: n, uploadedTmpDocumentUrl: d } = m();
8
8
  function s() {
9
- n === "full" && window.location.replace(a), n === "preview" && window.location.replace(
10
- d.value ? `${a}/register?flow=oss-agent&docUrl=${d.value}` : a
9
+ n === "full" && window.location.replace(e), n === "preview" && window.location.replace(
10
+ d.value ? `${e}/register?flow=oss-agent&docUrl=${d.value}` : e
11
11
  );
12
12
  }
13
- return (I, e) => (p(), c("div", m, [
14
- t("strong", u, [
15
- i(b(l), {
13
+ return (g, a) => (i(), p("div", u, [
14
+ t("strong", y, [
15
+ r(l(c), {
16
16
  class: "text-blue size-4",
17
17
  weight: "bold"
18
18
  }),
19
- e[0] || (e[0] = r(" You've used up all your free messages, upgrade for $24/mo. ", -1))
19
+ a[0] || (a[0] = f(" You've used up all your free messages, upgrade for $24/mo. ", -1))
20
20
  ]),
21
21
  t("div", { class: "paymentContainer" }, [
22
22
  t("button", {
@@ -24,7 +24,7 @@ const m = { class: "paymentSection" }, u = { class: "approvalText flex items-cen
24
24
  type: "button",
25
25
  onClick: s
26
26
  }, " Upgrade "),
27
- e[1] || (e[1] = f('<div class="paymentInfo" data-v-bbcefd08><h3 data-v-bbcefd08>$24 <span data-v-bbcefd08>/ month</span></h3><div class="paymentInfoSection" data-v-bbcefd08><div class="paymentInfoItem" data-v-bbcefd08><span data-v-bbcefd08>Members in your workspace</span><span data-v-bbcefd08>1</span></div><div class="paymentInfoItem" data-v-bbcefd08><span data-v-bbcefd08>x $24 / month / member</span><span data-v-bbcefd08>$24.00</span></div></div><div class="paymentInfoSection" data-v-bbcefd08><div class="paymentInfoItem" data-v-bbcefd08><span data-v-bbcefd08>Messages</span><span data-v-bbcefd08>1000</span></div><div class="paymentInfoItem" data-v-bbcefd08><span data-v-bbcefd08>Additional Messages</span><span data-v-bbcefd08>+ $0.15 Message</span></div></div></div>', 1))
27
+ a[1] || (a[1] = v('<div class="paymentInfo" data-v-0f59d089><h3 data-v-0f59d089>$24 <span data-v-0f59d089>/ month</span></h3><div class="paymentInfoSection" data-v-0f59d089><div class="paymentInfoItem" data-v-0f59d089><span data-v-0f59d089>Members in your workspace</span><span data-v-0f59d089>1</span></div><div class="paymentInfoItem" data-v-0f59d089><span data-v-0f59d089>x $24 / month / member</span><span data-v-0f59d089>$24.00</span></div></div><div class="paymentInfoSection" data-v-0f59d089><div class="paymentInfoItem" data-v-0f59d089><span data-v-0f59d089>Messages</span><span data-v-0f59d089>1000</span></div><div class="paymentInfoItem" data-v-0f59d089><span data-v-0f59d089>Additional Messages</span><span data-v-0f59d089>+ $0.02 Message</span></div></div></div>', 1))
28
28
  ])
29
29
  ]));
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UploadSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/UploadSection.vue"],"names":[],"mappings":"AA0GA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAE7E,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,sBAAsB,CAAA;CACpC,CAAC;;AAiJF,wBAMG"}
1
+ {"version":3,"file":"UploadSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/UploadSection.vue"],"names":[],"mappings":"AA8GA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAE7E,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,sBAAsB,CAAA;CACpC,CAAC;;AAyIF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./UploadSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4df8af00"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-805bc88b"]]);
5
5
  export {
6
- r as default
6
+ c as default
7
7
  };
@@ -1,62 +1,56 @@
1
- import { defineComponent as c, createElementBlock as a, openBlock as n, normalizeClass as u, createCommentVNode as r, createVNode as l, createTextVNode as s, unref as o, toDisplayString as p } from "vue";
2
- import { useLoadingState as g, ScalarLoading as i } from "@scalar/components";
1
+ import { defineComponent as d, createElementBlock as t, openBlock as o, normalizeClass as i, createCommentVNode as n, createVNode as s, unref as a, createTextVNode as r, toDisplayString as u } from "vue";
2
+ import { useLoadingState as p, ScalarLoading as g } from "@scalar/components";
3
3
  import { ScalarIconCheck as m, ScalarIconXCircle as S } from "@scalar/icons";
4
- const f = {
4
+ const x = {
5
5
  key: 0,
6
- class: "uploadText flex items-center gap-1.5"
7
- }, x = {
6
+ class: "flex items-center gap-1.5"
7
+ }, y = {
8
+ key: 0,
9
+ class: "uploadText"
10
+ }, f = {
11
+ key: 1,
12
+ class: "uploadText"
13
+ }, k = {
8
14
  key: 1,
9
15
  class: "uploadText flex items-center gap-1.5"
10
- }, y = {
16
+ }, h = {
11
17
  key: 2,
12
18
  class: "uploadText flex items-center gap-1.5"
13
- }, k = {
14
- key: 3,
15
- class: "uploadText flex items-center gap-1.5"
16
- }, N = /* @__PURE__ */ c({
19
+ }, V = /* @__PURE__ */ d({
17
20
  __name: "UploadSection",
18
21
  props: {
19
22
  uploadState: {}
20
23
  },
21
24
  setup(e) {
22
- const d = g();
23
- return (C, t) => (n(), a("div", {
24
- class: u(["uploadSection", {
25
+ const c = p();
26
+ return (C, l) => (o(), t("div", {
27
+ class: i(["uploadSection", {
25
28
  error: e.uploadState.type === "error",
26
29
  done: e.uploadState.type === "done"
27
30
  }])
28
31
  }, [
29
- e.uploadState.type === "uploading" ? (n(), a("strong", f, [
30
- l(o(i), {
31
- loader: {
32
- ...o(d),
33
- isLoading: !0
34
- },
35
- size: "lg"
36
- }, null, 8, ["loader"]),
37
- t[0] || (t[0] = s(" Uploading document... ", -1))
38
- ])) : r("", !0),
39
- e.uploadState.type === "processing" ? (n(), a("strong", x, [
40
- l(o(i), {
32
+ e.uploadState.type === "uploading" || e.uploadState.type === "processing" ? (o(), t("div", x, [
33
+ s(a(g), {
34
+ class: "text-blue",
41
35
  loader: {
42
- ...o(d),
36
+ ...a(c),
43
37
  isLoading: !0
44
38
  },
45
39
  size: "lg"
46
40
  }, null, 8, ["loader"]),
47
- t[1] || (t[1] = s(" Processing document... ", -1))
48
- ])) : r("", !0),
49
- e.uploadState.type === "done" ? (n(), a("strong", y, [
50
- l(o(m), { class: "icon" }),
51
- t[2] || (t[2] = s(" Document processed ", -1))
52
- ])) : r("", !0),
53
- e.uploadState.type === "error" ? (n(), a("strong", k, [
54
- l(o(S), { class: "icon" }),
55
- s(" " + p(e.uploadState.error), 1)
56
- ])) : r("", !0)
41
+ e.uploadState.type === "processing" ? (o(), t("strong", y, " Processing document... ")) : (o(), t("strong", f, " Uploading document... "))
42
+ ])) : n("", !0),
43
+ e.uploadState.type === "done" ? (o(), t("strong", k, [
44
+ s(a(m), { class: "icon text-green" }),
45
+ l[0] || (l[0] = r(" Document processed ", -1))
46
+ ])) : n("", !0),
47
+ e.uploadState.type === "error" ? (o(), t("strong", h, [
48
+ s(a(S), { class: "icon text-red" }),
49
+ r(" " + u(e.uploadState.error), 1)
50
+ ])) : n("", !0)
57
51
  ], 2));
58
52
  }
59
53
  });
60
54
  export {
61
- N as default
55
+ V as default
62
56
  };
package/dist/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.4.0",
13
+ "version": "0.4.1",
14
14
  "engines": {
15
15
  "node": ">=20"
16
16
  },