@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.
- package/dist/App.vue.d.ts +56 -1
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +25 -20
- package/dist/Chat.vue.d.ts +5 -1
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +26 -22
- package/dist/client-tools/execute-request.d.ts +72 -0
- package/dist/client-tools/execute-request.d.ts.map +1 -0
- package/dist/client-tools/execute-request.js +92 -0
- package/dist/components/ActionsDropdown.vue.d.ts +17 -0
- package/dist/components/ActionsDropdown.vue.d.ts.map +1 -0
- package/dist/components/ActionsDropdown.vue.js +7 -0
- package/dist/components/ActionsDropdown.vue2.js +50 -0
- package/dist/components/RequestPreview.vue.d.ts +3 -3
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +2 -2
- package/dist/components/RequestPreview.vue2.js +31 -31
- package/dist/entities/index.d.ts +1 -1
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +16 -16
- package/dist/entities/registry/document.d.ts +1 -0
- package/dist/entities/registry/document.d.ts.map +1 -1
- package/dist/entities/tools/execute-request.d.ts +27 -34
- package/dist/entities/tools/execute-request.d.ts.map +1 -1
- package/dist/entities/tools/execute-request.js +5 -4
- package/dist/helpers.d.ts +36 -275
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +44 -86
- package/dist/hooks/use-chat-approvals.d.ts +17 -10
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -1
- package/dist/hooks/use-chat-approvals.js +28 -15
- package/dist/hooks/use-search.d.ts +2 -0
- package/dist/hooks/use-search.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/package.json +2 -1
- package/dist/plugins/persistance.d.ts +16 -0
- package/dist/plugins/persistance.d.ts.map +1 -0
- package/dist/plugins/persistance.js +23 -0
- package/dist/state/state.d.ts +16 -5
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +148 -101
- package/dist/style.css +1 -1
- package/dist/views/Catalog/Catalog.vue.d.ts +7 -0
- package/dist/views/Catalog/Catalog.vue.d.ts.map +1 -0
- package/dist/views/Catalog/Catalog.vue.js +8 -0
- package/dist/views/Catalog/Catalog.vue2.js +70 -0
- package/dist/views/Chat/Chat.vue.d.ts +2 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +1 -1
- package/dist/views/Chat/Chat.vue2.js +36 -35
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +2 -2
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +50 -52
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +8 -7
- package/dist/views/Layout.vue.d.ts +2 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +2 -2
- package/dist/views/Layout.vue2.js +16 -14
- package/dist/views/PromptForm.vue.d.ts +2 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +1 -1
- package/dist/views/PromptForm.vue2.js +112 -99
- package/dist/views/Settings/Auth.vue.d.ts +2 -2
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +32 -32
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +1 -1
- package/dist/views/Settings/DocSettings.vue2.js +22 -21
- package/dist/views/Start.vue.d.ts +2 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +2 -2
- package/dist/views/Start.vue2.js +22 -21
- 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":"
|
|
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-
|
|
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
|
|
2
|
-
import { ASK_FOR_AUTHENTICATION_TOOL_NAME as
|
|
3
|
-
import {
|
|
4
|
-
import { GET_MINI_OPENAPI_SPEC_TOOL_NAME as
|
|
5
|
-
import { GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME as
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
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
|
|
13
|
-
const
|
|
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:
|
|
17
|
-
const
|
|
18
|
-
return (
|
|
19
|
-
_("div",
|
|
20
|
-
(t(!0),
|
|
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),
|
|
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(),
|
|
28
|
-
]))), 128)) :
|
|
29
|
-
r.role === "assistant" ? (t(!0),
|
|
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(),
|
|
32
|
+
e.type === "text" ? (t(), u(v, {
|
|
33
33
|
key: 0,
|
|
34
34
|
messagePart: a(e)
|
|
35
|
-
}, null, 8, ["messagePart"])) :
|
|
36
|
-
e.type.endsWith(
|
|
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"])) :
|
|
42
|
-
e.type.endsWith(
|
|
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"])) :
|
|
49
|
-
e.type.endsWith(
|
|
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"])) :
|
|
56
|
-
e.type.endsWith(
|
|
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"])) :
|
|
63
|
-
]))), 128)) :
|
|
62
|
+
}, null, 8, ["message", "messagePart"])) : s("", !0)
|
|
63
|
+
]))), 128)) : s("", !0)
|
|
64
64
|
], 64))), 128)),
|
|
65
|
-
|
|
65
|
+
m[2] || (m[2] = _("div", { class: "spacer" }, null, -1))
|
|
66
66
|
]),
|
|
67
67
|
_("div", L, [
|
|
68
|
-
|
|
69
|
-
onSubmit:
|
|
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":"
|
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4bdb6d21"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,93 +1,91 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getSelectedServer as
|
|
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
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ASK_FOR_AUTHENTICATION_TOOL_NAME as
|
|
9
|
-
import { TOOL_NAMESPACE_SLUG_DELIMITER as
|
|
10
|
-
import { createDocumentName as
|
|
11
|
-
import { useState as
|
|
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" },
|
|
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:
|
|
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 [
|
|
23
|
-
|
|
22
|
+
const [o, r] = t.messagePart.value.input.uniqueIdentifier.split(
|
|
23
|
+
y
|
|
24
24
|
);
|
|
25
|
-
if (!(!
|
|
26
|
-
return
|
|
27
|
-
}), e =
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
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(
|
|
33
|
-
}),
|
|
32
|
+
return B(c, e.value);
|
|
33
|
+
}), v = n(() => {
|
|
34
34
|
if (!e.value)
|
|
35
35
|
return;
|
|
36
|
-
const
|
|
36
|
+
const o = T(e.value.servers, {
|
|
37
37
|
documentUrl: e.value["x-scalar-original-source-url"]
|
|
38
38
|
});
|
|
39
|
-
return
|
|
40
|
-
}), g =
|
|
41
|
-
() =>
|
|
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
|
|
44
|
+
await h.addToolOutput({
|
|
47
45
|
toolCallId: t.messagePart.value.toolCallId,
|
|
48
46
|
output: "Authentication provided.",
|
|
49
|
-
tool:
|
|
47
|
+
tool: w,
|
|
50
48
|
state: "output-available"
|
|
51
|
-
})
|
|
49
|
+
});
|
|
52
50
|
}
|
|
53
|
-
return (
|
|
54
|
-
class:
|
|
55
|
-
open:
|
|
51
|
+
return (o, r) => (u(), k("div", {
|
|
52
|
+
class: C(["askForAuthentication", {
|
|
53
|
+
open: g.value
|
|
56
54
|
}])
|
|
57
55
|
}, [
|
|
58
|
-
|
|
59
|
-
t.messagePart.value.state === "output-available" ? (u(),
|
|
60
|
-
t.messagePart.value.state === "input-available" ? (u(),
|
|
61
|
-
t.messagePart.value.state === "input-available" ? (u(),
|
|
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:
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
default: E(() => [
|
|
66
|
+
r[0] || (r[0] = I(" Authorize ", -1)),
|
|
67
|
+
N(i(x), { weight: "bold" })
|
|
70
68
|
]),
|
|
71
69
|
_: 1
|
|
72
|
-
})) :
|
|
70
|
+
})) : s("", !0)
|
|
73
71
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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:
|
|
80
|
-
eventBus:
|
|
81
|
-
name:
|
|
82
|
-
options:
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
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,
|
|
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
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49d28052"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
|
|
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 =
|
|
11
|
-
return (d,
|
|
12
|
-
a.value ? (s(),
|
|
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"])) :
|
|
18
|
+
}, null, 8, ["request", "response", "state"])) : n("", !0)
|
|
18
19
|
]));
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
export {
|
|
22
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"Layout.vue.d.ts","sourceRoot":"","sources":["../../src/views/Layout.vue"],"names":[],"mappings":";;;;;;;AA8JA,wBAMG"}
|
package/dist/views/Layout.vue.js
CHANGED
|
@@ -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
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f1eee0af"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
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:
|
|
9
|
-
const
|
|
10
|
-
return (
|
|
11
|
-
o
|
|
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] = (
|
|
14
|
-
|
|
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[
|
|
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
|
-
|
|
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":"
|
|
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-
|
|
4
|
+
const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fe2a6215"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|