@scalar/agent-chat 0.4.8 → 0.5.2

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 (77) hide show
  1. package/dist/App.vue.d.ts +56 -1
  2. package/dist/App.vue.d.ts.map +1 -1
  3. package/dist/App.vue.js +25 -20
  4. package/dist/Chat.vue.d.ts +5 -1
  5. package/dist/Chat.vue.d.ts.map +1 -1
  6. package/dist/Chat.vue.js +26 -22
  7. package/dist/client-tools/execute-request.d.ts +72 -0
  8. package/dist/client-tools/execute-request.d.ts.map +1 -0
  9. package/dist/client-tools/execute-request.js +92 -0
  10. package/dist/components/ActionsDropdown.vue.d.ts +17 -0
  11. package/dist/components/ActionsDropdown.vue.d.ts.map +1 -0
  12. package/dist/components/ActionsDropdown.vue.js +7 -0
  13. package/dist/components/ActionsDropdown.vue2.js +50 -0
  14. package/dist/components/RequestPreview.vue.d.ts +3 -3
  15. package/dist/components/RequestPreview.vue.d.ts.map +1 -1
  16. package/dist/components/RequestPreview.vue.js +2 -2
  17. package/dist/components/RequestPreview.vue2.js +31 -31
  18. package/dist/entities/index.d.ts +1 -1
  19. package/dist/entities/index.d.ts.map +1 -1
  20. package/dist/entities/index.js +16 -16
  21. package/dist/entities/registry/document.d.ts +1 -0
  22. package/dist/entities/registry/document.d.ts.map +1 -1
  23. package/dist/entities/tools/execute-request.d.ts +27 -34
  24. package/dist/entities/tools/execute-request.d.ts.map +1 -1
  25. package/dist/entities/tools/execute-request.js +5 -4
  26. package/dist/helpers.d.ts +36 -275
  27. package/dist/helpers.d.ts.map +1 -1
  28. package/dist/helpers.js +44 -86
  29. package/dist/hooks/use-chat-approvals.d.ts +17 -10
  30. package/dist/hooks/use-chat-approvals.d.ts.map +1 -1
  31. package/dist/hooks/use-chat-approvals.js +28 -15
  32. package/dist/hooks/use-search.d.ts +2 -0
  33. package/dist/hooks/use-search.d.ts.map +1 -1
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/package.json +2 -1
  37. package/dist/plugins/persistance.d.ts +16 -0
  38. package/dist/plugins/persistance.d.ts.map +1 -0
  39. package/dist/plugins/persistance.js +23 -0
  40. package/dist/state/state.d.ts +16 -5
  41. package/dist/state/state.d.ts.map +1 -1
  42. package/dist/state/state.js +148 -101
  43. package/dist/style.css +1 -1
  44. package/dist/views/Catalog/Catalog.vue.d.ts +7 -0
  45. package/dist/views/Catalog/Catalog.vue.d.ts.map +1 -0
  46. package/dist/views/Catalog/Catalog.vue.js +8 -0
  47. package/dist/views/Catalog/Catalog.vue2.js +70 -0
  48. package/dist/views/Chat/Chat.vue.d.ts +2 -0
  49. package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
  50. package/dist/views/Chat/Chat.vue.js +1 -1
  51. package/dist/views/Chat/Chat.vue2.js +36 -35
  52. package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -1
  53. package/dist/views/Chat/Messages/AskForAuthentication.vue.js +2 -2
  54. package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +50 -52
  55. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
  56. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
  57. package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +2 -2
  58. package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +8 -7
  59. package/dist/views/Layout.vue.d.ts +2 -0
  60. package/dist/views/Layout.vue.d.ts.map +1 -1
  61. package/dist/views/Layout.vue.js +2 -2
  62. package/dist/views/Layout.vue2.js +16 -14
  63. package/dist/views/PromptForm.vue.d.ts +2 -0
  64. package/dist/views/PromptForm.vue.d.ts.map +1 -1
  65. package/dist/views/PromptForm.vue.js +1 -1
  66. package/dist/views/PromptForm.vue2.js +112 -99
  67. package/dist/views/Settings/Auth.vue.d.ts +2 -2
  68. package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
  69. package/dist/views/Settings/Auth.vue.js +32 -32
  70. package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
  71. package/dist/views/Settings/DocSettings.vue.js +1 -1
  72. package/dist/views/Settings/DocSettings.vue2.js +22 -21
  73. package/dist/views/Start.vue.d.ts +2 -0
  74. package/dist/views/Start.vue.d.ts.map +1 -1
  75. package/dist/views/Start.vue.js +2 -2
  76. package/dist/views/Start.vue2.js +22 -21
  77. package/package.json +8 -7
@@ -1,7 +1,9 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
2
  submit: () => any;
3
+ uploadApi: () => any;
3
4
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
5
  onSubmit?: (() => any) | undefined;
6
+ onUploadApi?: (() => any) | undefined;
5
7
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
8
  export default _default;
7
9
  //# sourceMappingURL=Chat.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/Chat.vue"],"names":[],"mappings":";;;;;AAqXA,wBAMG"}
1
+ {"version":3,"file":"Chat.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Chat/Chat.vue"],"names":[],"mappings":";;;;;;;AA+XA,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Chat.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-28fdf4f0"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-525fb4f5"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,72 +1,73 @@
1
- import { defineComponent as y, createElementBlock as s, openBlock as t, Fragment as m, createElementVNode as _, renderList as c, unref as i, createCommentVNode as o, toDisplayString as P, createBlock as n, toRef as a, reactive as d, createVNode as k } from "vue";
2
- import { ASK_FOR_AUTHENTICATION_TOOL_NAME as A } from "../../entities/tools/ask-for-authentication.js";
3
- import { EXECUTE_REQUEST_TOOL_NAME as O } from "../../entities/tools/execute-request.js";
4
- import { GET_MINI_OPENAPI_SPEC_TOOL_NAME as T } from "../../entities/tools/get-mini-openapi-spec.js";
5
- import { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME as N } from "../../entities/tools/get-openapi-spec-summary.js";
1
+ import { defineComponent as y, createElementBlock as o, openBlock as t, Fragment as i, createElementVNode as _, renderList as p, unref as n, createCommentVNode as s, toDisplayString as P, createBlock as u, toRef as a, reactive as d, createVNode as A } from "vue";
2
+ import { ASK_FOR_AUTHENTICATION_TOOL_NAME as k } from "../../entities/tools/ask-for-authentication.js";
3
+ import { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME as T } from "../../entities/tools/execute-request.js";
4
+ import { GET_MINI_OPENAPI_SPEC_TOOL_NAME as N } from "../../entities/tools/get-mini-openapi-spec.js";
5
+ import { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME as O } from "../../entities/tools/get-openapi-spec-summary.js";
6
6
  import { useState as g } from "../../state/state.js";
7
- import M from "./Messages/AskForAuthentication.vue.js";
8
- import S from "./Messages/ExecuteRequestTool.vue.js";
9
- import h from "./Messages/GetMiniOpenAPIDocTool.vue.js";
10
- import C from "./Messages/GetOpenAPISpecsSummary.vue.js";
7
+ import S from "./Messages/AskForAuthentication.vue.js";
8
+ import C from "./Messages/ExecuteRequestTool.vue.js";
9
+ import I from "./Messages/GetMiniOpenAPIDocTool.vue.js";
10
+ import M from "./Messages/GetOpenAPISpecsSummary.vue.js";
11
11
  import v from "./Messages/Text.vue.js";
12
- import I from "../PromptForm.vue.js";
13
- const $ = { class: "chat" }, x = { key: 0 }, L = { class: "formContainer" }, Y = /* @__PURE__ */ y({
12
+ import $ from "../PromptForm.vue.js";
13
+ const h = { class: "chat" }, x = { key: 0 }, L = { class: "formContainer" }, Y = /* @__PURE__ */ y({
14
14
  __name: "Chat",
15
- emits: ["submit"],
16
- setup(R, { emit: p }) {
17
- const f = p, E = g();
18
- return (F, u) => (t(), s(m, null, [
19
- _("div", $, [
20
- (t(!0), s(m, null, c(i(E).chat.messages, (r) => (t(), s(m, {
15
+ emits: ["submit", "uploadApi"],
16
+ setup(R, { emit: f }) {
17
+ const E = f, c = g();
18
+ return (U, m) => (t(), o(i, null, [
19
+ _("div", h, [
20
+ (t(!0), o(i, null, p(n(c).chat.messages, (r) => (t(), o(i, {
21
21
  key: r.id
22
22
  }, [
23
- r.role === "user" ? (t(!0), s(m, { key: 0 }, c(r.parts, (e, l) => (t(), s("div", {
23
+ r.role === "user" ? (t(!0), o(i, { key: 0 }, p(r.parts, (e, l) => (t(), o("div", {
24
24
  key: `${r.id}-${l}`,
25
25
  class: "userMessage"
26
26
  }, [
27
- e.type === "text" ? (t(), s("p", x, P(e.text), 1)) : o("", !0)
28
- ]))), 128)) : o("", !0),
29
- r.role === "assistant" ? (t(!0), s(m, { key: 1 }, c(r.parts, (e, l) => (t(), s("div", {
27
+ e.type === "text" ? (t(), o("p", x, P(e.text), 1)) : s("", !0)
28
+ ]))), 128)) : s("", !0),
29
+ r.role === "assistant" ? (t(!0), o(i, { key: 1 }, p(r.parts, (e, l) => (t(), o("div", {
30
30
  key: `${r.id}-${l}`
31
31
  }, [
32
- e.type === "text" ? (t(), n(v, {
32
+ e.type === "text" ? (t(), u(v, {
33
33
  key: 0,
34
34
  messagePart: a(e)
35
- }, null, 8, ["messagePart"])) : o("", !0),
36
- e.type.endsWith(i(O)) ? (t(), n(S, {
35
+ }, null, 8, ["messagePart"])) : s("", !0),
36
+ e.type.endsWith(n(T)) ? (t(), u(C, {
37
37
  key: 1,
38
38
  messagePart: a(
39
39
  e
40
40
  )
41
- }, null, 8, ["messagePart"])) : o("", !0),
42
- e.type.endsWith(i(T)) ? (t(), n(h, {
41
+ }, null, 8, ["messagePart"])) : s("", !0),
42
+ e.type.endsWith(n(N)) ? (t(), u(I, {
43
43
  key: 2,
44
44
  message: d(r),
45
45
  messagePart: a(
46
46
  e
47
47
  )
48
- }, null, 8, ["message", "messagePart"])) : o("", !0),
49
- e.type.endsWith(i(N)) ? (t(), n(C, {
48
+ }, null, 8, ["message", "messagePart"])) : s("", !0),
49
+ e.type.endsWith(n(O)) ? (t(), u(M, {
50
50
  key: 3,
51
51
  message: d(r),
52
52
  messagePart: a(
53
53
  e
54
54
  )
55
- }, null, 8, ["message", "messagePart"])) : o("", !0),
56
- e.type.endsWith(i(A)) ? (t(), n(M, {
55
+ }, null, 8, ["message", "messagePart"])) : s("", !0),
56
+ e.type.endsWith(n(k)) ? (t(), u(S, {
57
57
  key: 4,
58
58
  message: d(r),
59
59
  messagePart: a(
60
60
  e
61
61
  )
62
- }, null, 8, ["message", "messagePart"])) : o("", !0)
63
- ]))), 128)) : o("", !0)
62
+ }, null, 8, ["message", "messagePart"])) : s("", !0)
63
+ ]))), 128)) : s("", !0)
64
64
  ], 64))), 128)),
65
- u[1] || (u[1] = _("div", { class: "spacer" }, null, -1))
65
+ m[2] || (m[2] = _("div", { class: "spacer" }, null, -1))
66
66
  ]),
67
67
  _("div", L, [
68
- k(I, {
69
- onSubmit: u[0] || (u[0] = (r) => f("submit"))
68
+ A($, {
69
+ onSubmit: m[0] || (m[0] = (r) => E("submit")),
70
+ onUploadApi: m[1] || (m[1] = (r) => E("uploadApi"))
70
71
  })
71
72
  ])
72
73
  ], 64));
@@ -1 +1 @@
1
- {"version":3,"file":"AskForAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Chat/Messages/AskForAuthentication.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAA;AAG1F,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAGpD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,GAAG,CACd,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,gCAAgC,CAAC,CAAC,CACjE,CAAA;CACF,CAAC;;AAsNF,wBAMG"}
1
+ {"version":3,"file":"AskForAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Chat/Messages/AskForAuthentication.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAA;AAG1F,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAGpD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,GAAG,CACd,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,gCAAgC,CAAC,CAAC,CACjE,CAAA;CACF,CAAC;;AAiNF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AskForAuthentication.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67be87f9"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4bdb6d21"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,93 +1,91 @@
1
- import { defineComponent as k, computed as a, createElementBlock as C, openBlock as u, normalizeClass as E, createElementVNode as v, createBlock as s, createCommentVNode as i, unref as l, withCtx as I, createTextVNode as N, createVNode as P } from "vue";
2
- import { getSelectedServer as y } from "@scalar/api-client/v2/features/operation";
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
+ import { getSelectedServer as P } from "@scalar/api-client/v2/features/operation";
3
3
  import { getActiveEnvironment as B, getServers as T } from "@scalar/api-client/v2/helpers";
4
4
  import { ScalarButton as _ } from "@scalar/components";
5
- import { ScalarIconArrowRight as w } from "@scalar/icons";
6
- import x from "../../../components/AuthenticationProvided.vue.js";
7
- import O from "../../../components/AuthenticationRequired.vue.js";
8
- import { ASK_FOR_AUTHENTICATION_TOOL_NAME as b } from "../../../entities/tools/ask-for-authentication.js";
9
- import { TOOL_NAMESPACE_SLUG_DELIMITER as z } from "../../../entities/tools/constants.js";
10
- import { createDocumentName as L } from "../../../registry/create-document-name.js";
11
- import { useState as M } from "../../../state/state.js";
5
+ import { ScalarIconArrowRight as x } from "@scalar/icons";
6
+ import O from "../../../components/AuthenticationProvided.vue.js";
7
+ import b from "../../../components/AuthenticationRequired.vue.js";
8
+ import { ASK_FOR_AUTHENTICATION_TOOL_NAME as w } from "../../../entities/tools/ask-for-authentication.js";
9
+ import { TOOL_NAMESPACE_SLUG_DELIMITER as y } from "../../../entities/tools/constants.js";
10
+ import { createDocumentName as z } from "../../../registry/create-document-name.js";
11
+ import { useState as L } from "../../../state/state.js";
12
12
  import R from "../../Settings/Auth.vue.js";
13
- const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class: "authContentInner" }, Z = /* @__PURE__ */ k({
13
+ const V = { class: "toggleButton" }, q = { class: "authContent" }, F = { class: "authContentInner" }, Y = /* @__PURE__ */ S({
14
14
  __name: "AskForAuthentication",
15
15
  props: {
16
16
  messagePart: {}
17
17
  },
18
18
  setup(t) {
19
- const { workspaceStore: d, eventBus: p, config: h, chat: f } = M(), o = a(() => {
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 [r, n] = t.messagePart.value.input.uniqueIdentifier.split(
23
- z
22
+ const [o, r] = t.messagePart.value.input.uniqueIdentifier.split(
23
+ y
24
24
  );
25
- if (!(!r || !n))
26
- return L(r, n);
27
- }), e = a(() => {
28
- if (o.value)
29
- return d.workspace.documents[o.value];
30
- }), c = a(() => {
25
+ if (!(!o || !r))
26
+ return z(o, r);
27
+ }), e = n(() => {
28
+ if (a.value)
29
+ return c.workspace.documents[a.value];
30
+ }), m = n(() => {
31
31
  if (e.value)
32
- return B(d, e.value);
33
- }), m = a(() => {
32
+ return B(c, e.value);
33
+ }), v = n(() => {
34
34
  if (!e.value)
35
35
  return;
36
- const r = T(e.value.servers, {
36
+ const o = T(e.value.servers, {
37
37
  documentUrl: e.value["x-scalar-original-source-url"]
38
38
  });
39
- return y(e.value, r);
40
- }), g = a(
41
- () => e?.value?.components?.securitySchemes ?? {}
42
- ), S = a(
43
- () => o.value && c.value && m.value
39
+ return P(e.value, o);
40
+ }), g = n(
41
+ () => a.value && m.value && v.value
44
42
  );
45
43
  async function A() {
46
- await f.addToolOutput({
44
+ await h.addToolOutput({
47
45
  toolCallId: t.messagePart.value.toolCallId,
48
46
  output: "Authentication provided.",
49
- tool: b,
47
+ tool: w,
50
48
  state: "output-available"
51
- }), await f.sendMessage();
49
+ });
52
50
  }
53
- return (r, n) => (u(), C("div", {
54
- class: E(["askForAuthentication", {
55
- open: S.value
51
+ return (o, r) => (u(), k("div", {
52
+ class: C(["askForAuthentication", {
53
+ open: g.value
56
54
  }])
57
55
  }, [
58
- v("div", V, [
59
- t.messagePart.value.state === "output-available" ? (u(), s(x, { key: 0 })) : i("", !0),
60
- t.messagePart.value.state === "input-available" ? (u(), s(O, { key: 1 })) : i("", !0),
61
- t.messagePart.value.state === "input-available" ? (u(), s(l(_), {
56
+ d("div", V, [
57
+ t.messagePart.value.state === "output-available" ? (u(), l(O, { key: 0 })) : s("", !0),
58
+ t.messagePart.value.state === "input-available" ? (u(), l(b, { key: 1 })) : s("", !0),
59
+ t.messagePart.value.state === "input-available" ? (u(), l(i(_), {
62
60
  key: 2,
63
61
  class: "authorizeButton",
64
62
  size: "xs",
65
63
  onClick: A
66
64
  }, {
67
- default: I(() => [
68
- n[0] || (n[0] = N(" Authorize ", -1)),
69
- P(l(w), { weight: "bold" })
65
+ default: E(() => [
66
+ r[0] || (r[0] = I(" Authorize ", -1)),
67
+ N(i(x), { weight: "bold" })
70
68
  ]),
71
69
  _: 1
72
- })) : i("", !0)
70
+ })) : s("", !0)
73
71
  ]),
74
- v("div", q, [
75
- v("div", F, [
76
- o.value && e.value && c.value && m.value ? (u(), s(R, {
72
+ d("div", q, [
73
+ d("div", F, [
74
+ a.value && e.value && m.value && v.value ? (u(), l(R, {
77
75
  key: 0,
76
+ authStore: i(c).auth,
78
77
  document: e.value,
79
- environment: c.value,
80
- eventBus: l(p),
81
- name: o.value,
82
- options: l(h),
83
- securitySchemes: g.value,
84
- selectedServer: m.value
85
- }, null, 8, ["document", "environment", "eventBus", "name", "options", "securitySchemes", "selectedServer"])) : i("", !0)
78
+ environment: m.value,
79
+ eventBus: i(f),
80
+ name: a.value,
81
+ options: i(p),
82
+ selectedServer: v.value
83
+ }, null, 8, ["authStore", "document", "environment", "eventBus", "name", "options", "selectedServer"])) : s("", !0)
86
84
  ])
87
85
  ])
88
86
  ], 2));
89
87
  }
90
88
  });
91
89
  export {
92
- Z as default
90
+ Y as default
93
91
  };
@@ -1,9 +1,9 @@
1
1
  import { type ToolUIPart } from 'ai';
2
2
  import { type Ref } from 'vue';
3
- import type { EXECUTE_REQUEST_TOOL_NAME } from '../../../entities/tools/execute-request.js';
3
+ import type { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '../../../entities/tools/execute-request.js';
4
4
  import { type Tools } from '../../../state/state.js';
5
5
  type __VLS_Props = {
6
- messagePart: Ref<ToolUIPart<Pick<Tools, typeof EXECUTE_REQUEST_TOOL_NAME>>>;
6
+ messagePart: Ref<ToolUIPart<Pick<Tools, typeof EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME>>>;
7
7
  };
8
8
  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>;
9
9
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ExecuteRequestTool.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Chat/Messages/ExecuteRequestTool.vue"],"names":[],"mappings":"AA6EA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEpD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAA;CAC5E,CAAC;;AAuFF,wBAMG"}
1
+ {"version":3,"file":"ExecuteRequestTool.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Chat/Messages/ExecuteRequestTool.vue"],"names":[],"mappings":"AA6EA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,IAAI,CAAA;AACpC,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGxC,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,kCAAkC,CAAA;AAE7F,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEpD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,GAAG,CACd,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,qCAAqC,CAAC,CAAC,CACtE,CAAA;CACF,CAAC;;AAoFF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ExecuteRequestTool.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-cbadda4f"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49d28052"]]);
5
5
  export {
6
- c as default
6
+ p as default
7
7
  };
@@ -1,23 +1,24 @@
1
- import { defineComponent as r, computed as u, createElementBlock as l, openBlock as s, createBlock as n, createCommentVNode as o } from "vue";
1
+ import { defineComponent as u, computed as r, createElementBlock as o, openBlock as s, createBlock as l, createCommentVNode as n } from "vue";
2
2
  import m from "../../../components/RequestPreview.vue.js";
3
+ import { requestPartRequiresApproval as c } from "../../../hooks/use-chat-approvals.js";
3
4
  import { useState as i } from "../../../state/state.js";
4
- const c = { class: "executeRequestTool" }, q = /* @__PURE__ */ r({
5
+ const v = { class: "executeRequestTool" }, R = /* @__PURE__ */ u({
5
6
  __name: "ExecuteRequestTool",
6
7
  props: {
7
8
  messagePart: {}
8
9
  },
9
10
  setup(e) {
10
- const t = i(), a = u(() => e.messagePart.value.state === "input-available" && t.chat.status === "streaming" || e.messagePart.value.state === "approval-responded" && t.chat.status === "submitted" ? "sendingRequest" : e.messagePart.value.state === "approval-requested" ? "requiresApproval" : e.messagePart.value.state === "output-available" ? e.messagePart.value.output.isError ? "requestFailed" : "requestSucceeded" : e.messagePart.value.state === "approval-responded" ? "approved" : e.messagePart.value.state === "output-denied" ? "rejected" : null);
11
- return (d, v) => (s(), l("div", c, [
12
- a.value ? (s(), n(m, {
11
+ const t = i(), a = r(() => e.messagePart.value.state === "input-available" && t.chat.status === "streaming" || e.messagePart.value.state === "approval-responded" && t.chat.status === "submitted" ? "sendingRequest" : c(e.messagePart.value) ? "requiresApproval" : e.messagePart.value.state === "output-available" ? e.messagePart.value.output.success ? "requestSucceeded" : "requestFailed" : e.messagePart.value.state === "output-error" ? "rejected" : null);
12
+ return (d, p) => (s(), o("div", v, [
13
+ a.value ? (s(), l(m, {
13
14
  key: 0,
14
15
  request: e.messagePart.value.input,
15
16
  response: e.messagePart.value.output,
16
17
  state: a.value
17
- }, null, 8, ["request", "response", "state"])) : o("", !0)
18
+ }, null, 8, ["request", "response", "state"])) : n("", !0)
18
19
  ]));
19
20
  }
20
21
  });
21
22
  export {
22
- q as default
23
+ R as default
23
24
  };
@@ -1,7 +1,9 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
2
2
  submit: () => any;
3
+ uploadApi: () => any;
3
4
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
4
5
  onSubmit?: (() => any) | undefined;
6
+ onUploadApi?: (() => any) | undefined;
5
7
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
8
  export default _default;
7
9
  //# sourceMappingURL=Layout.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.vue.d.ts","sourceRoot":"","sources":["../../src/views/Layout.vue"],"names":[],"mappings":";;;;;AAsIA,wBAMG"}
1
+ {"version":3,"file":"Layout.vue.d.ts","sourceRoot":"","sources":["../../src/views/Layout.vue"],"names":[],"mappings":";;;;;;;AA8JA,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Layout.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-df02b46b"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1eee0af"]]);
5
5
  export {
6
- m as default
6
+ r as default
7
7
  };
@@ -1,23 +1,25 @@
1
- import { defineComponent as u, createElementBlock as a, openBlock as s, createBlock as n, unref as o } from "vue";
2
- import { useState as p } from "../state/state.js";
3
- import f from "./Chat/Chat.vue.js";
4
- import l from "./Start.vue.js";
5
- const c = { class: "wrapper" }, v = /* @__PURE__ */ u({
1
+ import { defineComponent as r, createElementBlock as u, openBlock as n, createBlock as i, unref as m } from "vue";
2
+ import { useState as a } from "../state/state.js";
3
+ import l from "./Chat/Chat.vue.js";
4
+ import d from "./Start.vue.js";
5
+ const f = { class: "wrapper" }, $ = /* @__PURE__ */ r({
6
6
  __name: "Layout",
7
- emits: ["submit"],
8
- setup(b, { emit: r }) {
9
- const m = r, { chat: e } = p();
10
- return (_, t) => (s(), a("div", c, [
11
- o(e).messages.length && (o(e).messages.length > 1 || o(e).status !== "submitted") ? (s(), n(f, {
7
+ emits: ["submit", "uploadApi"],
8
+ setup(b, { emit: p }) {
9
+ const e = p, { chat: o } = a();
10
+ return (k, t) => (n(), u("div", f, [
11
+ m(o).messages.length && (m(o).messages.length > 1 || m(o).status !== "submitted") ? (n(), i(l, {
12
12
  key: 0,
13
- onSubmit: t[0] || (t[0] = (i) => m("submit"))
14
- })) : (s(), n(l, {
13
+ onSubmit: t[0] || (t[0] = (s) => e("submit")),
14
+ onUploadApi: t[1] || (t[1] = (s) => e("uploadApi"))
15
+ })) : (n(), i(d, {
15
16
  key: 1,
16
- onSubmit: t[1] || (t[1] = (i) => m("submit"))
17
+ onSubmit: t[2] || (t[2] = (s) => e("submit")),
18
+ onUploadApi: t[3] || (t[3] = (s) => e("uploadApi"))
17
19
  }))
18
20
  ]));
19
21
  }
20
22
  });
21
23
  export {
22
- v as default
24
+ $ as default
23
25
  };
@@ -3,8 +3,10 @@ declare const _default: import("vue").DefineComponent<{}, {
3
3
  focusPrompt: typeof focusPrompt;
4
4
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
5
  submit: () => any;
6
+ uploadApi: () => any;
6
7
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
7
8
  onSubmit?: (() => any) | undefined;
9
+ onUploadApi?: (() => any) | undefined;
8
10
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9
11
  export default _default;
10
12
  //# sourceMappingURL=PromptForm.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PromptForm.vue.d.ts","sourceRoot":"","sources":["../../src/views/PromptForm.vue"],"names":[],"mappings":"AAkoBA,iBAAS,WAAW,SAEnB;;;;;;;;AA6fD,wBAOG"}
1
+ {"version":3,"file":"PromptForm.vue.d.ts","sourceRoot":"","sources":["../../src/views/PromptForm.vue"],"names":[],"mappings":"AAipBA,iBAAS,WAAW,SAEnB;;;;;;;;;;AAshBD,wBAOG"}
@@ -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 a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c8acf778"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fe2a6215"]]);
5
5
  export {
6
6
  a as default
7
7
  };