@scalar/agent-chat 0.10.13 → 0.10.15
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.js +3 -3
- package/dist/App.vue.script.js +24 -20
- package/dist/App.vue.script.js.map +1 -1
- package/dist/Chat.vue.js +3 -3
- package/dist/Chat.vue.script.js +50 -39
- package/dist/Chat.vue.script.js.map +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +5 -5
- package/dist/api.js +66 -57
- package/dist/api.js.map +1 -1
- package/dist/client-tools/execute-request.js +84 -60
- package/dist/client-tools/execute-request.js.map +1 -1
- package/dist/components/ActionsDropdown.vue.js +4 -4
- package/dist/components/ActionsDropdown.vue.script.js +29 -25
- package/dist/components/ActionsDropdown.vue.script.js.map +1 -1
- package/dist/components/ApprovalSection.vue.js +4 -4
- package/dist/components/ApprovalSection.vue.script.js +23 -18
- package/dist/components/ApprovalSection.vue.script.js.map +1 -1
- package/dist/components/AuthenticationProvided.vue.js +8 -7
- package/dist/components/AuthenticationProvided.vue.js.map +1 -1
- package/dist/components/AuthenticationRequired.vue.js +8 -7
- package/dist/components/AuthenticationRequired.vue.js.map +1 -1
- package/dist/components/AutosendPaused.vue.js +8 -7
- package/dist/components/AutosendPaused.vue.js.map +1 -1
- package/dist/components/BuildingRequest.vue.js +9 -8
- package/dist/components/BuildingRequest.vue.js.map +1 -1
- package/dist/components/ContextItem.vue.js +4 -4
- package/dist/components/ContextItem.vue.script.js +8 -5
- package/dist/components/ContextItem.vue.script.js.map +1 -1
- package/dist/components/ErrorMessage.vue.js +4 -4
- package/dist/components/ErrorMessage.vue.script.js +15 -12
- package/dist/components/ErrorMessage.vue.script.js.map +1 -1
- package/dist/components/FreeMessagesInfoSection.vue.js +4 -4
- package/dist/components/FreeMessagesInfoSection.vue.script.js +45 -34
- package/dist/components/FreeMessagesInfoSection.vue.script.js.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +8 -7
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js.map +1 -1
- package/dist/components/LoadingSearchOpenAPIOperations.vue.js +8 -7
- package/dist/components/LoadingSearchOpenAPIOperations.vue.js.map +1 -1
- package/dist/components/Logo.vue.js +9 -8
- package/dist/components/Logo.vue.js.map +1 -1
- package/dist/components/PaymentSection.vue.js +4 -4
- package/dist/components/PaymentSection.vue.script.js +20 -15
- package/dist/components/PaymentSection.vue.script.js.map +1 -1
- package/dist/components/RequestApproved.vue.js +8 -7
- package/dist/components/RequestApproved.vue.js.map +1 -1
- package/dist/components/RequestFailed.vue.js +9 -8
- package/dist/components/RequestFailed.vue.js.map +1 -1
- package/dist/components/RequestPreview.vue.js +4 -4
- package/dist/components/RequestPreview.vue.script.js +96 -73
- package/dist/components/RequestPreview.vue.script.js.map +1 -1
- package/dist/components/RequestRejected.vue.js +9 -8
- package/dist/components/RequestRejected.vue.js.map +1 -1
- package/dist/components/RequestSuccess.vue.js +8 -7
- package/dist/components/RequestSuccess.vue.js.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +3 -3
- package/dist/components/ResponseBody/ResponseBody.vue.script.js +33 -30
- package/dist/components/ResponseBody/ResponseBody.vue.script.js.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +9 -7
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +4 -4
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.script.js +51 -44
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +3 -3
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.script.js +13 -11
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.script.js.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +3 -3
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.script.js +17 -14
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.script.js.map +1 -1
- package/dist/components/ResponseBody/helpers/media-types.js +37 -35
- package/dist/components/ResponseBody/helpers/media-types.js.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +30 -20
- package/dist/components/ResponseBody/helpers/process-response-body.js.map +1 -1
- package/dist/components/SearchPopover.vue.js +4 -4
- package/dist/components/SearchPopover.vue.script.js +52 -42
- package/dist/components/SearchPopover.vue.script.js.map +1 -1
- package/dist/components/Selector.vue.js +3 -3
- package/dist/components/Selector.vue.script.js +54 -45
- package/dist/components/Selector.vue.script.js.map +1 -1
- package/dist/components/SendingRequest.vue.js +9 -8
- package/dist/components/SendingRequest.vue.js.map +1 -1
- package/dist/components/ServerSelector.vue.js +3 -3
- package/dist/components/ServerSelector.vue.script.js +52 -43
- package/dist/components/ServerSelector.vue.script.js.map +1 -1
- package/dist/components/UploadSection.vue.js +4 -4
- package/dist/components/UploadSection.vue.script.js +38 -29
- package/dist/components/UploadSection.vue.script.js.map +1 -1
- package/dist/consts/urls.js +2 -2
- package/dist/consts/urls.js.map +1 -1
- package/dist/entities/error/constants.js +2 -2
- package/dist/entities/error/constants.js.map +1 -1
- package/dist/entities/error/helpers.js +4 -4
- package/dist/entities/error/helpers.js.map +1 -1
- package/dist/entities/index.js +10 -10
- package/dist/entities/prompt/constants.js +2 -2
- package/dist/entities/prompt/constants.js.map +1 -1
- package/dist/entities/registry/document.js +9 -9
- package/dist/entities/registry/document.js.map +1 -1
- package/dist/entities/tools/ask-for-authentication.js +6 -5
- package/dist/entities/tools/ask-for-authentication.js.map +1 -1
- package/dist/entities/tools/execute-request.js +10 -9
- package/dist/entities/tools/execute-request.js.map +1 -1
- package/dist/entities/tools/get-openapi-specs-summary.js +2 -2
- package/dist/entities/tools/get-openapi-specs-summary.js.map +1 -1
- package/dist/entities/tools/search-openapi-operations.js +4 -3
- package/dist/entities/tools/search-openapi-operations.js.map +1 -1
- package/dist/helpers.js +53 -27
- package/dist/helpers.js.map +1 -1
- package/dist/hooks/use-agent-key-documents.js +16 -15
- package/dist/hooks/use-agent-key-documents.js.map +1 -1
- package/dist/hooks/use-chat-approvals.js +27 -24
- package/dist/hooks/use-chat-approvals.js.map +1 -1
- package/dist/hooks/use-chat-error.js +19 -17
- package/dist/hooks/use-chat-error.js.map +1 -1
- package/dist/hooks/use-chat-pending-client-tool-parts.js +10 -8
- package/dist/hooks/use-chat-pending-client-tool-parts.js.map +1 -1
- package/dist/hooks/use-chat-scroll.js +13 -10
- package/dist/hooks/use-chat-scroll.js.map +1 -1
- package/dist/hooks/use-curated-documents.js +9 -8
- package/dist/hooks/use-curated-documents.js.map +1 -1
- package/dist/hooks/use-search.js +25 -16
- package/dist/hooks/use-search.js.map +1 -1
- package/dist/hooks/use-signup-link.js +19 -9
- package/dist/hooks/use-signup-link.js.map +1 -1
- package/dist/hooks/use-term-and-conditions.js +12 -11
- package/dist/hooks/use-term-and-conditions.js.map +1 -1
- package/dist/hooks/use-upload-tmp-document.js +67 -54
- package/dist/hooks/use-upload-tmp-document.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/package.json +9 -2
- package/dist/plugins/persistance.js +18 -10
- package/dist/plugins/persistance.js.map +1 -1
- package/dist/registry/add-documents-to-store.js +39 -33
- package/dist/registry/add-documents-to-store.js.map +1 -1
- package/dist/registry/create-document-name.js +3 -3
- package/dist/registry/create-document-name.js.map +1 -1
- package/dist/state/state.js +176 -132
- package/dist/state/state.js.map +1 -1
- package/dist/style.css +6604 -1
- package/dist/styles/tailwind.config.css +12 -0
- package/dist/views/Catalog/Catalog.vue.js +4 -4
- package/dist/views/Catalog/Catalog.vue.script.js +56 -39
- package/dist/views/Catalog/Catalog.vue.script.js.map +1 -1
- package/dist/views/Chat/Chat.vue.js +4 -4
- package/dist/views/Chat/Chat.vue.script.js +55 -43
- package/dist/views/Chat/Chat.vue.script.js.map +1 -1
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +4 -4
- package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js +67 -55
- package/dist/views/Chat/Messages/AskForAuthentication.vue.script.js.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +4 -4
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.script.js +29 -18
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.script.js.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +3 -3
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.script.js +15 -10
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.script.js.map +1 -1
- package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.js +4 -4
- package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js +55 -40
- package/dist/views/Chat/Messages/SearchOpenAPIOperationsTool.vue.script.js.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +3 -3
- package/dist/views/Chat/Messages/Text.vue.script.js +8 -6
- package/dist/views/Chat/Messages/Text.vue.script.js.map +1 -1
- package/dist/views/Layout.vue.js +4 -4
- package/dist/views/Layout.vue.script.js +21 -17
- package/dist/views/Layout.vue.script.js.map +1 -1
- package/dist/views/PromptForm.vue.js +4 -4
- package/dist/views/PromptForm.vue.script.js +214 -170
- package/dist/views/PromptForm.vue.script.js.map +1 -1
- package/dist/views/Settings/Auth.vue.js +3 -3
- package/dist/views/Settings/Auth.vue.script.js +58 -46
- package/dist/views/Settings/Auth.vue.script.js.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +4 -4
- package/dist/views/Settings/DocSettings.vue.script.js +45 -39
- package/dist/views/Settings/DocSettings.vue.script.js.map +1 -1
- package/dist/views/Settings/Settings.vue.js +4 -4
- package/dist/views/Settings/Settings.vue.script.js +59 -48
- package/dist/views/Settings/Settings.vue.script.js.map +1 -1
- package/dist/views/Start.vue.js +4 -4
- package/dist/views/Start.vue.script.js +40 -33
- package/dist/views/Start.vue.script.js.map +1 -1
- package/dist/vue-styles.css +1341 -0
- package/package.json +17 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Chat Tailwind Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file can be imported into other projects using Tailwind to
|
|
5
|
+
* generate the appropriate Tailwind utilities for Agent Chat.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@import "@scalar/components/tailwind.config.css";
|
|
9
|
+
@import "@scalar/api-client/tailwind.config.css";
|
|
10
|
+
|
|
11
|
+
/* Search for Tailwind classes in Agent Chat */
|
|
12
|
+
@source "../";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import Catalog_vue_vue_type_script_setup_true_lang_default from "./Catalog.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/views/Catalog/Catalog.vue
|
|
6
|
-
var
|
|
6
|
+
var Catalog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Catalog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-bc24f891"]]);
|
|
7
7
|
//#endregion
|
|
8
|
-
export {
|
|
8
|
+
export { Catalog_default as default };
|
|
9
9
|
|
|
10
10
|
//# sourceMappingURL=Catalog.vue.js.map
|
|
@@ -1,50 +1,67 @@
|
|
|
1
|
-
import { useState
|
|
2
|
-
import { useSearch
|
|
3
|
-
import { Fragment
|
|
4
|
-
import { ScalarIcon
|
|
1
|
+
import { useState } from "../../state/state.js";
|
|
2
|
+
import { useSearch } from "../../hooks/use-search.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
4
|
+
import { ScalarIcon, ScalarModal, ScalarSearchInput } from "@scalar/components";
|
|
5
5
|
//#region src/views/Catalog/Catalog.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "catalog custom-scroll"
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
var _hoisted_2 = ["onClick"];
|
|
11
|
+
var _hoisted_3 = { class: "left" };
|
|
12
|
+
var _hoisted_4 = ["src"];
|
|
13
|
+
var _hoisted_5 = { class: "right" };
|
|
14
|
+
var _hoisted_6 = { class: "item-top" };
|
|
15
|
+
var _hoisted_7 = { class: "version" };
|
|
16
|
+
var _hoisted_8 = { class: "description" };
|
|
17
|
+
var Catalog_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10
18
|
__name: "Catalog",
|
|
11
19
|
props: { modal: {} },
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const search = useSearch();
|
|
22
|
+
const state = useState();
|
|
23
|
+
const searchOptions = computed(() => search.results.value.filter((r) => {
|
|
24
|
+
return !state.registryDocuments.value.some((d) => d.namespace === r.namespace && d.slug === r.slug);
|
|
25
|
+
}).map((result) => ({
|
|
26
|
+
...result,
|
|
27
|
+
label: result.title,
|
|
28
|
+
id: result.id
|
|
17
29
|
})));
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createBlock(unref(ScalarModal), {
|
|
32
|
+
class: "catalogModal",
|
|
33
|
+
state: __props.modal
|
|
34
|
+
}, {
|
|
35
|
+
default: withCtx(() => [createVNode(unref(ScalarSearchInput), {
|
|
36
|
+
autofocus: "",
|
|
37
|
+
class: "searchInput",
|
|
38
|
+
modelValue: unref(search).query.value,
|
|
39
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (v) => unref(search).query.value = v ?? "")
|
|
40
|
+
}, null, 8, ["modelValue"]), searchOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(searchOptions.value, (option) => {
|
|
41
|
+
return openBlock(), createElementBlock("button", {
|
|
42
|
+
key: option.id,
|
|
43
|
+
class: "item",
|
|
44
|
+
type: "button",
|
|
45
|
+
onClick: () => {
|
|
46
|
+
unref(state).addDocument(option);
|
|
47
|
+
__props.modal.hide();
|
|
48
|
+
}
|
|
49
|
+
}, [createElementVNode("div", _hoisted_3, [option.logoUrl ? (openBlock(), createElementBlock("img", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "logo",
|
|
52
|
+
src: option.logoUrl
|
|
53
|
+
}, null, 8, _hoisted_4)) : (openBlock(), createBlock(unref(ScalarIcon), {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "logo",
|
|
56
|
+
logo: "Openapi"
|
|
57
|
+
}))]), createElementVNode("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createElementVNode("span", null, toDisplayString(option.title), 1), createElementVNode("span", _hoisted_7, "v" + toDisplayString(option.currentVersion), 1)]), createElementVNode("span", _hoisted_8, " @" + toDisplayString(option.namespace) + "/" + toDisplayString(option.slug), 1)])], 8, _hoisted_2);
|
|
58
|
+
}), 128))])) : createCommentVNode("", true)]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["state"]);
|
|
61
|
+
};
|
|
45
62
|
}
|
|
46
63
|
});
|
|
47
64
|
//#endregion
|
|
48
|
-
export {
|
|
65
|
+
export { Catalog_vue_vue_type_script_setup_true_lang_default as default };
|
|
49
66
|
|
|
50
67
|
//# sourceMappingURL=Catalog.vue.script.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Catalog.vue.script.js","names":[],"sources":["../../../src/views/Catalog/Catalog.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIcon,\n ScalarModal,\n ScalarSearchInput,\n type ModalState,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nimport { useSearch } from '@/hooks/use-search'\nimport { useState } from '@/state/state'\n\ndefineProps<{\n modal: ModalState\n}>()\n\nconst search = useSearch()\n\nconst state = useState()\n\nconst searchOptions = computed(() =>\n search.results.value\n .filter((r) => {\n return !state.registryDocuments.value.some(\n (d) => d.namespace === r.namespace && d.slug === r.slug,\n )\n })\n .map((result) => ({\n ...result,\n label: result.title,\n id: result.id,\n })),\n)\n</script>\n\n<template>\n <ScalarModal\n class=\"catalogModal\"\n :state=\"modal\">\n <ScalarSearchInput\n autofocus\n class=\"searchInput\"\n :modelValue=\"search.query.value\"\n @update:modelValue=\"(v) => (search.query.value = v ?? '')\" />\n <template v-if=\"searchOptions.length\">\n <div class=\"catalog custom-scroll\">\n <button\n v-for=\"option in searchOptions\"\n :key=\"option.id\"\n class=\"item\"\n type=\"button\"\n @click=\"\n () => {\n state.addDocument(option)\n modal.hide()\n }\n \">\n <div class=\"left\">\n <img\n v-if=\"option.logoUrl\"\n class=\"logo\"\n :src=\"option.logoUrl\" />\n <ScalarIcon\n v-else\n class=\"logo\"\n logo=\"Openapi\" />\n </div>\n\n <div class=\"right\">\n <div class=\"item-top\">\n <span>{{ option.title }}</span>\n\n <span class=\"version\">v{{ option.currentVersion }}</span>\n </div>\n\n <span class=\"description\">\n @{{ option.namespace }}/{{ option.slug }}\n </span>\n </div>\n </button>\n </div>\n </template>\n </ScalarModal>\n</template>\n\n<style>\n.catalogModal .scalar-modal-body {\n display: flex;\n flex-direction: column;\n}\n</style>\n\n<style scoped>\n.searchInput {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n margin-bottom: 10px;\n}\n.catalog {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n overflow-y: scroll;\n font-size: var(--scalar-font-size-3);\n}\n.item {\n display: flex;\n padding: 15px;\n gap: 10px;\n align-items: center;\n background-color: var(--scalar-background-2);\n border-radius: var(--scalar-radius-lg);\n transition: background-color 160ms ease;\n}\n.item:hover {\n background-color: color-mix(\n in srgb,\n var(--scalar-background-3),\n transparent 40%\n ) !important;\n}\n.left {\n align-items: center;\n}\n.right {\n display: flex;\n flex-direction: column;\n}\n.logo {\n width: 25px;\n}\n.item-top {\n display: flex;\n gap: 10px;\n}\n.version {\n background: var(--scalar-background-3);\n padding: 2px 5px;\n border-radius: var(--scalar-radius);\n font-size: var(--scalar-font-size-5);\n color: var(--scalar-color-3);\n}\n.description {\n color: var(--scalar-color-2);\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Catalog.vue.script.js","names":[],"sources":["../../../src/views/Catalog/Catalog.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n ScalarIcon,\n ScalarModal,\n ScalarSearchInput,\n type ModalState,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nimport { useSearch } from '@/hooks/use-search'\nimport { useState } from '@/state/state'\n\ndefineProps<{\n modal: ModalState\n}>()\n\nconst search = useSearch()\n\nconst state = useState()\n\nconst searchOptions = computed(() =>\n search.results.value\n .filter((r) => {\n return !state.registryDocuments.value.some(\n (d) => d.namespace === r.namespace && d.slug === r.slug,\n )\n })\n .map((result) => ({\n ...result,\n label: result.title,\n id: result.id,\n })),\n)\n</script>\n\n<template>\n <ScalarModal\n class=\"catalogModal\"\n :state=\"modal\">\n <ScalarSearchInput\n autofocus\n class=\"searchInput\"\n :modelValue=\"search.query.value\"\n @update:modelValue=\"(v) => (search.query.value = v ?? '')\" />\n <template v-if=\"searchOptions.length\">\n <div class=\"catalog custom-scroll\">\n <button\n v-for=\"option in searchOptions\"\n :key=\"option.id\"\n class=\"item\"\n type=\"button\"\n @click=\"\n () => {\n state.addDocument(option)\n modal.hide()\n }\n \">\n <div class=\"left\">\n <img\n v-if=\"option.logoUrl\"\n class=\"logo\"\n :src=\"option.logoUrl\" />\n <ScalarIcon\n v-else\n class=\"logo\"\n logo=\"Openapi\" />\n </div>\n\n <div class=\"right\">\n <div class=\"item-top\">\n <span>{{ option.title }}</span>\n\n <span class=\"version\">v{{ option.currentVersion }}</span>\n </div>\n\n <span class=\"description\">\n @{{ option.namespace }}/{{ option.slug }}\n </span>\n </div>\n </button>\n </div>\n </template>\n </ScalarModal>\n</template>\n\n<style>\n.catalogModal .scalar-modal-body {\n display: flex;\n flex-direction: column;\n}\n</style>\n\n<style scoped>\n.searchInput {\n border: var(--scalar-border-width) solid var(--scalar-border-color);\n border-radius: var(--scalar-radius-lg);\n margin-bottom: 10px;\n}\n.catalog {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n overflow-y: scroll;\n font-size: var(--scalar-font-size-3);\n}\n.item {\n display: flex;\n padding: 15px;\n gap: 10px;\n align-items: center;\n background-color: var(--scalar-background-2);\n border-radius: var(--scalar-radius-lg);\n transition: background-color 160ms ease;\n}\n.item:hover {\n background-color: color-mix(\n in srgb,\n var(--scalar-background-3),\n transparent 40%\n ) !important;\n}\n.left {\n align-items: center;\n}\n.right {\n display: flex;\n flex-direction: column;\n}\n.logo {\n width: 25px;\n}\n.item-top {\n display: flex;\n gap: 10px;\n}\n.version {\n background: var(--scalar-background-3);\n padding: 2px 5px;\n border-radius: var(--scalar-radius);\n font-size: var(--scalar-font-size-5);\n color: var(--scalar-color-3);\n}\n.description {\n color: var(--scalar-color-2);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,SAAS,WAAU;EAEzB,MAAM,QAAQ,UAAS;EAEvB,MAAM,gBAAgB,eACpB,OAAO,QAAQ,MACZ,QAAQ,MAAM;AACb,UAAO,CAAC,MAAM,kBAAkB,MAAM,MACnC,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,KACrD;IACD,CACA,KAAK,YAAY;GAChB,GAAG;GACH,OAAO,OAAO;GACd,IAAI,OAAO;GACZ,EAAE,CACP;;uBAIE,YA8Cc,MAAA,YAAA,EAAA;IA7CZ,OAAM;IACL,OAAO,QAAA;;2BAKuD,CAJ/D,YAI+D,MAAA,kBAAA,EAAA;KAH7D,WAAA;KACA,OAAM;KACL,YAAY,MAAA,OAAM,CAAC,MAAM;KACzB,uBAAiB,OAAA,OAAA,OAAA,MAAG,MAAO,MAAA,OAAM,CAAC,MAAM,QAAQ,KAAC;iCACpC,cAAA,MAAc,UAAA,WAAA,EAC5B,mBAmCM,OAnCN,YAmCM,EAAA,UAAA,KAAA,EAlCJ,mBAiCS,UAAA,MAAA,WAhCU,cAAA,QAAV,WAAM;yBADf,mBAiCS,UAAA;MA/BN,KAAK,OAAO;MACb,OAAM;MACN,MAAK;MACJ,eAAA;AAA0C,aAAA,MAAK,CAAC,YAAY,OAAM;AAAgB,eAAA,MAAM,MAAI;;SAM7F,mBASM,OATN,YASM,CAPI,OAAO,WAAA,WAAA,EADf,mBAG0B,OAAA;;MADxB,OAAM;MACL,KAAK,OAAO;8CACf,YAGmB,MAAA,WAAA,EAAA;;MADjB,OAAM;MACN,MAAK;YAGT,mBAUM,OAVN,YAUM,CATJ,mBAIM,OAJN,YAIM,CAHJ,mBAA+B,QAAA,MAAA,gBAAtB,OAAO,MAAK,EAAA,EAAA,EAErB,mBAAyD,QAAzD,YAAsB,MAAC,gBAAG,OAAO,eAAc,EAAA,EAAA,CAAA,CAAA,EAGjD,mBAEO,QAFP,YAA0B,OACvB,gBAAG,OAAO,UAAS,GAAG,MAAC,gBAAG,OAAO,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import Chat_vue_vue_type_script_setup_true_lang_default from "./Chat.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/views/Chat/Chat.vue
|
|
5
|
-
var
|
|
5
|
+
var Chat_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Chat_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8e43ed7a"]]);
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { Chat_default as default };
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=Chat.vue.js.map
|
|
@@ -2,54 +2,66 @@ import "../../entities/tools/ask-for-authentication.js";
|
|
|
2
2
|
import "../../entities/tools/execute-request.js";
|
|
3
3
|
import "../../entities/tools/get-openapi-specs-summary.js";
|
|
4
4
|
import "../../entities/tools/search-openapi-operations.js";
|
|
5
|
-
import { useState
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { Fragment
|
|
5
|
+
import { useState } from "../../state/state.js";
|
|
6
|
+
import AskForAuthentication_default from "./Messages/AskForAuthentication.vue.js";
|
|
7
|
+
import ExecuteRequestTool_default from "./Messages/ExecuteRequestTool.vue.js";
|
|
8
|
+
import GetOpenAPISpecsSummary_default from "./Messages/GetOpenAPISpecsSummary.vue.js";
|
|
9
|
+
import SearchOpenAPIOperationsTool_default from "./Messages/SearchOpenAPIOperationsTool.vue.js";
|
|
10
|
+
import Text_default from "./Messages/Text.vue.js";
|
|
11
|
+
import PromptForm_default from "../PromptForm.vue.js";
|
|
12
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, openBlock, reactive, renderList, toDisplayString, toRef, unref } from "vue";
|
|
13
13
|
//#region src/views/Chat/Chat.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var _hoisted_1 = { class: "chat" };
|
|
15
|
+
var _hoisted_2 = { key: 0 };
|
|
16
|
+
var _hoisted_3 = { class: "formContainer" };
|
|
17
|
+
var Chat_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
15
18
|
__name: "Chat",
|
|
16
19
|
emits: ["submit", "uploadApi"],
|
|
17
|
-
setup(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const state = useState();
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(state).chat.messages, (message) => {
|
|
25
|
+
return openBlock(), createElementBlock(Fragment, { key: message.id }, [message.role === "user" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(message.parts, (part, index) => {
|
|
26
|
+
return openBlock(), createElementBlock("div", {
|
|
27
|
+
key: `${message.id}-${index}`,
|
|
28
|
+
class: "userMessage"
|
|
29
|
+
}, [part.type === "text" ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(part.text), 1)) : createCommentVNode("", true)]);
|
|
30
|
+
}), 128)) : createCommentVNode("", true), message.role === "assistant" ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(message.parts, (part, index) => {
|
|
31
|
+
return openBlock(), createElementBlock("div", { key: `${message.id}-${index}` }, [
|
|
32
|
+
part.type === "text" ? (openBlock(), createBlock(Text_default, {
|
|
33
|
+
key: 0,
|
|
34
|
+
messagePart: toRef(part)
|
|
35
|
+
}, null, 8, ["messagePart"])) : createCommentVNode("", true),
|
|
36
|
+
part.type === `tool-${unref("execute-request")}` ? (openBlock(), createBlock(ExecuteRequestTool_default, {
|
|
37
|
+
key: 1,
|
|
38
|
+
messagePart: toRef(part)
|
|
39
|
+
}, null, 8, ["messagePart"])) : createCommentVNode("", true),
|
|
40
|
+
part.type === `tool-${unref("search-openapi-operations")}` ? (openBlock(), createBlock(SearchOpenAPIOperationsTool_default, {
|
|
41
|
+
key: 2,
|
|
42
|
+
message: reactive(message),
|
|
43
|
+
messagePart: toRef(part)
|
|
44
|
+
}, null, 8, ["message", "messagePart"])) : createCommentVNode("", true),
|
|
45
|
+
part.type === `tool-${unref("summarize-openapi-specs")}` ? (openBlock(), createBlock(GetOpenAPISpecsSummary_default, {
|
|
46
|
+
key: 3,
|
|
47
|
+
message: reactive(message),
|
|
48
|
+
messagePart: toRef(part)
|
|
49
|
+
}, null, 8, ["message", "messagePart"])) : createCommentVNode("", true),
|
|
50
|
+
part.type === `tool-${unref("ask-for-authentication")}` ? (openBlock(), createBlock(AskForAuthentication_default, {
|
|
51
|
+
key: 4,
|
|
52
|
+
message: reactive(message),
|
|
53
|
+
messagePart: toRef(part)
|
|
54
|
+
}, null, 8, ["message", "messagePart"])) : createCommentVNode("", true)
|
|
55
|
+
]);
|
|
56
|
+
}), 128)) : createCommentVNode("", true)], 64);
|
|
57
|
+
}), 128)), _cache[2] || (_cache[2] = createElementVNode("div", { class: "spacer" }, null, -1))]), createElementVNode("div", _hoisted_3, [createVNode(PromptForm_default, {
|
|
58
|
+
onSubmit: _cache[0] || (_cache[0] = ($event) => emit("submit")),
|
|
59
|
+
onUploadApi: _cache[1] || (_cache[1] = ($event) => emit("uploadApi"))
|
|
60
|
+
})])], 64);
|
|
61
|
+
};
|
|
50
62
|
}
|
|
51
63
|
});
|
|
52
64
|
//#endregion
|
|
53
|
-
export {
|
|
65
|
+
export { Chat_vue_vue_type_script_setup_true_lang_default as default };
|
|
54
66
|
|
|
55
67
|
//# sourceMappingURL=Chat.vue.script.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.vue.script.js","names":[],"sources":["../../../src/views/Chat/Chat.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { reactive, toRef } from 'vue'\n\nimport { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '@/entities/tools/ask-for-authentication'\nimport { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '@/entities/tools/execute-request'\nimport { SUMMARIZE_OPENAPI_SPECS_TOOL_NAME } from '@/entities/tools/get-openapi-specs-summary'\nimport { SEARCH_OPENAPI_OPERATIONS_TOOL_NAME } from '@/entities/tools/search-openapi-operations'\nimport { useState } from '@/state/state'\nimport AskForAuthentication from '@/views/Chat/Messages/AskForAuthentication.vue'\nimport ExecuteRequestTool from '@/views/Chat/Messages/ExecuteRequestTool.vue'\nimport GetOpenAPISpecsSummary from '@/views/Chat/Messages/GetOpenAPISpecsSummary.vue'\nimport SearchOpenAPIOperationsTool from '@/views/Chat/Messages/SearchOpenAPIOperationsTool.vue'\nimport Text from '@/views/Chat/Messages/Text.vue'\nimport PromptForm from '@/views/PromptForm.vue'\n\nconst emit = defineEmits<{\n (e: 'submit'): void\n (e: 'uploadApi'): void\n}>()\n\nconst state = useState()\n</script>\n\n<template>\n <div class=\"chat\">\n <template\n v-for=\"message in state.chat.messages\"\n :key=\"message.id\">\n <template v-if=\"message.role === 'user'\">\n <div\n v-for=\"(part, index) in message.parts\"\n :key=\"`${message.id}-${index}`\"\n class=\"userMessage\">\n <p v-if=\"part.type === 'text'\">{{ part.text }}</p>\n </div>\n </template>\n <template v-if=\"message.role === 'assistant'\">\n <div\n v-for=\"(part, index) in message.parts\"\n :key=\"`${message.id}-${index}`\">\n <Text\n v-if=\"part.type === 'text'\"\n :messagePart=\"toRef(part)\" />\n <ExecuteRequestTool\n v-if=\"\n part.type ===\n (`tool-${EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME}` as const)\n \"\n :messagePart=\"toRef(part)\" />\n <SearchOpenAPIOperationsTool\n v-if=\"\n part.type ===\n (`tool-${SEARCH_OPENAPI_OPERATIONS_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n <GetOpenAPISpecsSummary\n v-if=\"\n part.type ===\n (`tool-${SUMMARIZE_OPENAPI_SPECS_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n <AskForAuthentication\n v-if=\"\n part.type ===\n (`tool-${ASK_FOR_AUTHENTICATION_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n </div>\n </template>\n </template>\n <div class=\"spacer\"></div>\n </div>\n <div class=\"formContainer\">\n <PromptForm\n @submit=\"emit('submit')\"\n @uploadApi=\"emit('uploadApi')\" />\n </div>\n</template>\n\n<style scoped>\n.chat {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 24px 0;\n max-width: 744px;\n}\n\n.userMessage {\n padding-top: 6px;\n padding-bottom: 6px;\n padding-inline: 16px;\n border-radius: 18px;\n background: var(--scalar-background-2);\n width: fit-content;\n max-width: 80%;\n margin-left: auto;\n font-size: 16px;\n line-height: 24px;\n color: var(--scalar-color-1);\n margin-bottom: 12px;\n}\ndiv + .userMessage {\n margin-top: 64px;\n}\n.chat > :deep(div:has(.executeRequestTool)) + div:has(.executeRequestTool) {\n margin-top: -12px;\n}\n.spacer {\n min-height: 280px;\n width: 100%;\n}\n\n.formContainer {\n position: fixed;\n bottom: 20px;\n width: 100%;\n max-width: 744px;\n z-index: 1;\n}\n.chat :deep(.markdown) {\n margin-bottom: 12px;\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chat.vue.script.js","names":[],"sources":["../../../src/views/Chat/Chat.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { reactive, toRef } from 'vue'\n\nimport { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '@/entities/tools/ask-for-authentication'\nimport { EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME } from '@/entities/tools/execute-request'\nimport { SUMMARIZE_OPENAPI_SPECS_TOOL_NAME } from '@/entities/tools/get-openapi-specs-summary'\nimport { SEARCH_OPENAPI_OPERATIONS_TOOL_NAME } from '@/entities/tools/search-openapi-operations'\nimport { useState } from '@/state/state'\nimport AskForAuthentication from '@/views/Chat/Messages/AskForAuthentication.vue'\nimport ExecuteRequestTool from '@/views/Chat/Messages/ExecuteRequestTool.vue'\nimport GetOpenAPISpecsSummary from '@/views/Chat/Messages/GetOpenAPISpecsSummary.vue'\nimport SearchOpenAPIOperationsTool from '@/views/Chat/Messages/SearchOpenAPIOperationsTool.vue'\nimport Text from '@/views/Chat/Messages/Text.vue'\nimport PromptForm from '@/views/PromptForm.vue'\n\nconst emit = defineEmits<{\n (e: 'submit'): void\n (e: 'uploadApi'): void\n}>()\n\nconst state = useState()\n</script>\n\n<template>\n <div class=\"chat\">\n <template\n v-for=\"message in state.chat.messages\"\n :key=\"message.id\">\n <template v-if=\"message.role === 'user'\">\n <div\n v-for=\"(part, index) in message.parts\"\n :key=\"`${message.id}-${index}`\"\n class=\"userMessage\">\n <p v-if=\"part.type === 'text'\">{{ part.text }}</p>\n </div>\n </template>\n <template v-if=\"message.role === 'assistant'\">\n <div\n v-for=\"(part, index) in message.parts\"\n :key=\"`${message.id}-${index}`\">\n <Text\n v-if=\"part.type === 'text'\"\n :messagePart=\"toRef(part)\" />\n <ExecuteRequestTool\n v-if=\"\n part.type ===\n (`tool-${EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME}` as const)\n \"\n :messagePart=\"toRef(part)\" />\n <SearchOpenAPIOperationsTool\n v-if=\"\n part.type ===\n (`tool-${SEARCH_OPENAPI_OPERATIONS_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n <GetOpenAPISpecsSummary\n v-if=\"\n part.type ===\n (`tool-${SUMMARIZE_OPENAPI_SPECS_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n <AskForAuthentication\n v-if=\"\n part.type ===\n (`tool-${ASK_FOR_AUTHENTICATION_TOOL_NAME}` as const)\n \"\n :message=\"reactive(message)\"\n :messagePart=\"toRef(part)\" />\n </div>\n </template>\n </template>\n <div class=\"spacer\"></div>\n </div>\n <div class=\"formContainer\">\n <PromptForm\n @submit=\"emit('submit')\"\n @uploadApi=\"emit('uploadApi')\" />\n </div>\n</template>\n\n<style scoped>\n.chat {\n flex: 1;\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 24px 0;\n max-width: 744px;\n}\n\n.userMessage {\n padding-top: 6px;\n padding-bottom: 6px;\n padding-inline: 16px;\n border-radius: 18px;\n background: var(--scalar-background-2);\n width: fit-content;\n max-width: 80%;\n margin-left: auto;\n font-size: 16px;\n line-height: 24px;\n color: var(--scalar-color-1);\n margin-bottom: 12px;\n}\ndiv + .userMessage {\n margin-top: 64px;\n}\n.chat > :deep(div:has(.executeRequestTool)) + div:has(.executeRequestTool) {\n margin-top: -12px;\n}\n.spacer {\n min-height: 280px;\n width: 100%;\n}\n\n.formContainer {\n position: fixed;\n bottom: 20px;\n width: 100%;\n max-width: 744px;\n z-index: 1;\n}\n.chat :deep(.markdown) {\n margin-bottom: 12px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAeA,MAAM,OAAO;EAKb,MAAM,QAAQ,UAAS;;2DAIrB,mBAkDM,OAlDN,YAkDM,EAAA,UAAA,KAAA,EAjDJ,mBA+CW,UAAA,MAAA,WA9CS,MAAA,MAAK,CAAC,KAAK,WAAtB,YAAO;4DACR,QAAQ,IAAA,EAAA,CACE,QAAQ,SAAI,UAAA,UAAA,KAAA,EAC1B,mBAKM,UAAA,EAAA,KAAA,GAAA,EAAA,WAJoB,QAAQ,QAAxB,MAAM,UAAK;yBADrB,mBAKM,OAAA;MAHH,KAAG,GAAK,QAAQ,GAAE,GAAI;MACvB,OAAM;SACG,KAAK,SAAI,UAAA,WAAA,EAAlB,mBAAkD,KAAA,YAAA,gBAAhB,KAAK,KAAI,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;8CAG/B,QAAQ,SAAI,eAAA,UAAA,KAAA,EAC1B,mBAiCM,UAAA,EAAA,KAAA,GAAA,EAAA,WAhCoB,QAAQ,QAAxB,MAAM,UAAK;yBADrB,mBAiCM,OAAA,EA/BH,KAAG,GAAK,QAAQ,GAAE,GAAI,SAAA,EAAA;MAEf,KAAK,SAAI,UAAA,WAAA,EADjB,YAE+B,cAAA;;OAA5B,aAAa,MAAM,KAAI;;MAEH,KAAK,SAAA,QAAgC,MAAA,kBAAqC,MAAA,WAAA,EADjG,YAK+B,4BAAA;;OAA5B,aAAa,MAAM,KAAI;;MAEH,KAAK,SAAA,QAAgC,MAAA,4BAAmC,MAAA,WAAA,EAD/F,YAM+B,qCAAA;;OAD5B,SAAS,SAAS,QAAO;OACzB,aAAa,MAAM,KAAI;;MAEH,KAAK,SAAA,QAAgC,MAAA,0BAAiC,MAAA,WAAA,EAD7F,YAM+B,gCAAA;;OAD5B,SAAS,SAAS,QAAO;OACzB,aAAa,MAAM,KAAI;;MAEH,KAAK,SAAA,QAAgC,MAAA,yBAAgC,MAAA,WAAA,EAD5F,YAM+B,8BAAA;;OAD5B,SAAS,SAAS,QAAO;OACzB,aAAa,MAAM,KAAI;;;;wCAIhC,mBAA0B,OAAA,EAArB,OAAM,UAAQ,EAAA,MAAA,GAAA,EAAA,CAAA,EAErB,mBAIM,OAJN,YAIM,CAHJ,YAEmC,oBAAA;IADhC,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,SAAA;IACZ,aAAS,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,YAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import AskForAuthentication_vue_vue_type_script_setup_true_lang_default from "./AskForAuthentication.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/views/Chat/Messages/AskForAuthentication.vue
|
|
5
|
-
var
|
|
5
|
+
var AskForAuthentication_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AskForAuthentication_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-fd5c15f7"]]);
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { AskForAuthentication_default as default };
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=AskForAuthentication.vue.js.map
|
|
@@ -1,67 +1,79 @@
|
|
|
1
|
-
import { ASK_FOR_AUTHENTICATION_TOOL_NAME
|
|
2
|
-
import { useState
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { computed
|
|
7
|
-
import { ScalarButton
|
|
8
|
-
import { getActiveEnvironment
|
|
9
|
-
import { ScalarIconArrowRight
|
|
1
|
+
import { ASK_FOR_AUTHENTICATION_TOOL_NAME } from "../../../entities/tools/ask-for-authentication.js";
|
|
2
|
+
import { useState } from "../../../state/state.js";
|
|
3
|
+
import AuthenticationProvided_default from "../../../components/AuthenticationProvided.vue.js";
|
|
4
|
+
import AuthenticationRequired_default from "../../../components/AuthenticationRequired.vue.js";
|
|
5
|
+
import Auth_default from "../../Settings/Auth.vue.js";
|
|
6
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, unref, withCtx } from "vue";
|
|
7
|
+
import { ScalarButton } from "@scalar/components";
|
|
8
|
+
import { getActiveEnvironment, getSelectedServer, getServers } from "@scalar/workspace-store/request-example";
|
|
9
|
+
import { ScalarIconArrowRight } from "@scalar/icons";
|
|
10
10
|
//#region src/views/Chat/Messages/AskForAuthentication.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
11
|
+
var _hoisted_1 = { class: "toggleButton" };
|
|
12
|
+
var _hoisted_2 = { class: "authContent" };
|
|
13
|
+
var _hoisted_3 = { class: "authContentInner" };
|
|
14
|
+
var AskForAuthentication_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
15
|
__name: "AskForAuthentication",
|
|
13
16
|
props: { messagePart: {} },
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const { workspaceStore, eventBus, config, chat } = useState();
|
|
19
|
+
const documentName = computed(() => __props.messagePart.value.input?.documentName);
|
|
20
|
+
const document = computed(() => {
|
|
21
|
+
if (!documentName.value) return;
|
|
22
|
+
return workspaceStore.workspace.documents[documentName.value];
|
|
23
|
+
});
|
|
24
|
+
const environment = computed(() => {
|
|
25
|
+
if (!document.value) return;
|
|
26
|
+
return getActiveEnvironment(workspaceStore, document.value).environment;
|
|
27
|
+
});
|
|
28
|
+
const selectedServer = computed(() => {
|
|
29
|
+
if (!document.value) return;
|
|
30
|
+
const servers = getServers(document.value.servers, { documentUrl: document.value["x-scalar-original-source-url"] });
|
|
31
|
+
return getSelectedServer(document.value, null, null, servers);
|
|
32
|
+
});
|
|
33
|
+
const isAuthenticationExpanded = computed(() => documentName.value && environment.value && selectedServer.value);
|
|
34
|
+
async function authorizeClicked() {
|
|
35
|
+
await chat.addToolOutput({
|
|
36
|
+
toolCallId: __props.messagePart.value.toolCallId,
|
|
27
37
|
output: "Authentication provided.",
|
|
28
|
-
tool:
|
|
38
|
+
tool: ASK_FOR_AUTHENTICATION_TOOL_NAME,
|
|
29
39
|
state: "output-available"
|
|
30
40
|
});
|
|
31
41
|
}
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["askForAuthentication", { open: isAuthenticationExpanded.value }]) }, [createElementVNode("div", _hoisted_1, [
|
|
44
|
+
__props.messagePart.value.state === "output-available" ? (openBlock(), createBlock(AuthenticationProvided_default, { key: 0 })) : createCommentVNode("", true),
|
|
45
|
+
__props.messagePart.value.state === "input-available" ? (openBlock(), createBlock(AuthenticationRequired_default, { key: 1 })) : createCommentVNode("", true),
|
|
46
|
+
__props.messagePart.value.state === "input-available" ? (openBlock(), createBlock(unref(ScalarButton), {
|
|
47
|
+
key: 2,
|
|
48
|
+
class: "authorizeButton",
|
|
49
|
+
size: "xs",
|
|
50
|
+
onClick: authorizeClicked
|
|
51
|
+
}, {
|
|
52
|
+
default: withCtx(() => [_cache[0] || (_cache[0] = createTextVNode(" Authorize ", -1)), createVNode(unref(ScalarIconArrowRight), { weight: "bold" })]),
|
|
53
|
+
_: 1
|
|
54
|
+
})) : createCommentVNode("", true)
|
|
55
|
+
]), createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [documentName.value && document.value && environment.value && selectedServer.value ? (openBlock(), createBlock(Auth_default, {
|
|
56
|
+
key: 0,
|
|
57
|
+
authStore: unref(workspaceStore).auth,
|
|
58
|
+
document: document.value,
|
|
59
|
+
environment: environment.value,
|
|
60
|
+
eventBus: unref(eventBus),
|
|
61
|
+
name: documentName.value,
|
|
62
|
+
options: unref(config),
|
|
63
|
+
selectedServer: selectedServer.value
|
|
64
|
+
}, null, 8, [
|
|
65
|
+
"authStore",
|
|
66
|
+
"document",
|
|
67
|
+
"environment",
|
|
68
|
+
"eventBus",
|
|
69
|
+
"name",
|
|
70
|
+
"options",
|
|
71
|
+
"selectedServer"
|
|
72
|
+
])) : createCommentVNode("", true)])])], 2);
|
|
73
|
+
};
|
|
62
74
|
}
|
|
63
75
|
});
|
|
64
76
|
//#endregion
|
|
65
|
-
export {
|
|
77
|
+
export { AskForAuthentication_vue_vue_type_script_setup_true_lang_default as default };
|
|
66
78
|
|
|
67
79
|
//# sourceMappingURL=AskForAuthentication.vue.script.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskForAuthentication.vue.script.js","names":[],"sources":["../../../../src/views/Chat/Messages/AskForAuthentication.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { ScalarIconArrowRight } from '@scalar/icons'\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { ToolUIPart } from 'ai'\nimport { computed, type Ref } from 'vue'\n\nimport AuthenticationProvided from '@/components/AuthenticationProvided.vue'\nimport AuthenticationRequired from '@/components/AuthenticationRequired.vue'\nimport { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '@/entities/tools/ask-for-authentication'\nimport { useState, type Tools } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { messagePart } = defineProps<{\n messagePart: Ref<\n ToolUIPart<Pick<Tools, typeof ASK_FOR_AUTHENTICATION_TOOL_NAME>>\n >\n}>()\n\nconst { workspaceStore, eventBus, config, chat } = useState()\n\nconst documentName = computed(() => messagePart.value.input?.documentName)\n\nconst document = computed(() => {\n if (!documentName.value) {\n return\n }\n\n return workspaceStore.workspace.documents[documentName.value]\n})\n\nconst environment = computed(() => {\n if (!document.value) {\n return\n }\n\n return getActiveEnvironment(workspaceStore, document.value).environment\n})\n\nconst selectedServer = computed(() => {\n if (!document.value) {\n return\n }\n\n const servers = getServers(document.value.servers, {\n documentUrl: document.value['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document.value, null, null, servers)\n})\n\nconst isAuthenticationExpanded = computed(\n () => documentName.value && environment.value && selectedServer.value,\n)\n\nasync function authorizeClicked() {\n await chat.addToolOutput({\n toolCallId: messagePart.value.toolCallId,\n output: 'Authentication provided.',\n tool: ASK_FOR_AUTHENTICATION_TOOL_NAME,\n state: 'output-available',\n })\n}\n</script>\n\n<template>\n <div\n class=\"askForAuthentication\"\n :class=\"{\n open: isAuthenticationExpanded,\n }\">\n <div class=\"toggleButton\">\n <AuthenticationProvided\n v-if=\"messagePart.value.state === 'output-available'\" />\n <AuthenticationRequired\n v-if=\"messagePart.value.state === 'input-available'\" />\n <ScalarButton\n v-if=\"messagePart.value.state === 'input-available'\"\n class=\"authorizeButton\"\n size=\"xs\"\n @click=\"authorizeClicked\">\n Authorize\n <ScalarIconArrowRight weight=\"bold\" />\n </ScalarButton>\n </div>\n <div class=\"authContent\">\n <div class=\"authContentInner\">\n <Auth\n v-if=\"documentName && document && environment && selectedServer\"\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name=\"documentName\"\n :options=\"config\"\n :selectedServer />\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.askForAuthentication {\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n margin-bottom: 12px;\n box-shadow:\n 0 var(--scalar-border-width) 0 var(--scalar-background-1),\n 0 calc(-1 * var(--scalar-border-width)) 0 var(--scalar-background-1);\n padding: 0;\n}\n\n.authContent {\n display: grid;\n grid-template-rows: 0fr;\n min-height: 0;\n overflow: hidden;\n transition: grid-template-rows 0.2s ease-out;\n max-width: 520px;\n margin: auto;\n width: 100%;\n}\n.authContentInner :deep(> div) {\n margin: 36px 0 48px 0;\n}\n.authContent :deep(.markdown) {\n margin-bottom: 0 !important;\n}\n.askForAuthentication.open .authContent {\n grid-template-rows: 1fr;\n}\n\n.continueButton {\n align-self: flex-end;\n}\n\n.toggleButton {\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n position: relative;\n display: flex;\n align-items: center;\n color: var(--scalar-color-3);\n justify-content: space-between;\n border-radius: var(--scalar-radius-lg);\n}\n\n.authContentInner {\n min-height: 0;\n overflow: hidden;\n}\n\n.authorizeButton {\n background: var(--scalar-color-blue) !important;\n color: white !important;\n margin: 0 !important;\n z-index: 1;\n display: flex;\n gap: 5px;\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AskForAuthentication.vue.script.js","names":[],"sources":["../../../../src/views/Chat/Messages/AskForAuthentication.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { ScalarIconArrowRight } from '@scalar/icons'\nimport {\n getActiveEnvironment,\n getSelectedServer,\n getServers,\n} from '@scalar/workspace-store/request-example'\nimport type { ToolUIPart } from 'ai'\nimport { computed, type Ref } from 'vue'\n\nimport AuthenticationProvided from '@/components/AuthenticationProvided.vue'\nimport AuthenticationRequired from '@/components/AuthenticationRequired.vue'\nimport { ASK_FOR_AUTHENTICATION_TOOL_NAME } from '@/entities/tools/ask-for-authentication'\nimport { useState, type Tools } from '@/state/state'\nimport Auth from '@/views/Settings/Auth.vue'\n\nconst { messagePart } = defineProps<{\n messagePart: Ref<\n ToolUIPart<Pick<Tools, typeof ASK_FOR_AUTHENTICATION_TOOL_NAME>>\n >\n}>()\n\nconst { workspaceStore, eventBus, config, chat } = useState()\n\nconst documentName = computed(() => messagePart.value.input?.documentName)\n\nconst document = computed(() => {\n if (!documentName.value) {\n return\n }\n\n return workspaceStore.workspace.documents[documentName.value]\n})\n\nconst environment = computed(() => {\n if (!document.value) {\n return\n }\n\n return getActiveEnvironment(workspaceStore, document.value).environment\n})\n\nconst selectedServer = computed(() => {\n if (!document.value) {\n return\n }\n\n const servers = getServers(document.value.servers, {\n documentUrl: document.value['x-scalar-original-source-url'],\n })\n\n return getSelectedServer(document.value, null, null, servers)\n})\n\nconst isAuthenticationExpanded = computed(\n () => documentName.value && environment.value && selectedServer.value,\n)\n\nasync function authorizeClicked() {\n await chat.addToolOutput({\n toolCallId: messagePart.value.toolCallId,\n output: 'Authentication provided.',\n tool: ASK_FOR_AUTHENTICATION_TOOL_NAME,\n state: 'output-available',\n })\n}\n</script>\n\n<template>\n <div\n class=\"askForAuthentication\"\n :class=\"{\n open: isAuthenticationExpanded,\n }\">\n <div class=\"toggleButton\">\n <AuthenticationProvided\n v-if=\"messagePart.value.state === 'output-available'\" />\n <AuthenticationRequired\n v-if=\"messagePart.value.state === 'input-available'\" />\n <ScalarButton\n v-if=\"messagePart.value.state === 'input-available'\"\n class=\"authorizeButton\"\n size=\"xs\"\n @click=\"authorizeClicked\">\n Authorize\n <ScalarIconArrowRight weight=\"bold\" />\n </ScalarButton>\n </div>\n <div class=\"authContent\">\n <div class=\"authContentInner\">\n <Auth\n v-if=\"documentName && document && environment && selectedServer\"\n :authStore=\"workspaceStore.auth\"\n :document\n :environment\n :eventBus\n :name=\"documentName\"\n :options=\"config\"\n :selectedServer />\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.askForAuthentication {\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n margin-bottom: 12px;\n box-shadow:\n 0 var(--scalar-border-width) 0 var(--scalar-background-1),\n 0 calc(-1 * var(--scalar-border-width)) 0 var(--scalar-background-1);\n padding: 0;\n}\n\n.authContent {\n display: grid;\n grid-template-rows: 0fr;\n min-height: 0;\n overflow: hidden;\n transition: grid-template-rows 0.2s ease-out;\n max-width: 520px;\n margin: auto;\n width: 100%;\n}\n.authContentInner :deep(> div) {\n margin: 36px 0 48px 0;\n}\n.authContent :deep(.markdown) {\n margin-bottom: 0 !important;\n}\n.askForAuthentication.open .authContent {\n grid-template-rows: 1fr;\n}\n\n.continueButton {\n align-self: flex-end;\n}\n\n.toggleButton {\n background: none;\n border: none;\n cursor: pointer;\n text-align: left;\n position: relative;\n display: flex;\n align-items: center;\n color: var(--scalar-color-3);\n justify-content: space-between;\n border-radius: var(--scalar-radius-lg);\n}\n\n.authContentInner {\n min-height: 0;\n overflow: hidden;\n}\n\n.authorizeButton {\n background: var(--scalar-color-blue) !important;\n color: white !important;\n margin: 0 !important;\n z-index: 1;\n display: flex;\n gap: 5px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;EAuBA,MAAM,EAAE,gBAAgB,UAAU,QAAQ,SAAS,UAAS;EAE5D,MAAM,eAAe,eAAe,QAAA,YAAY,MAAM,OAAO,aAAY;EAEzE,MAAM,WAAW,eAAe;AAC9B,OAAI,CAAC,aAAa,MAChB;AAGF,UAAO,eAAe,UAAU,UAAU,aAAa;IACxD;EAED,MAAM,cAAc,eAAe;AACjC,OAAI,CAAC,SAAS,MACZ;AAGF,UAAO,qBAAqB,gBAAgB,SAAS,MAAM,CAAC;IAC7D;EAED,MAAM,iBAAiB,eAAe;AACpC,OAAI,CAAC,SAAS,MACZ;GAGF,MAAM,UAAU,WAAW,SAAS,MAAM,SAAS,EACjD,aAAa,SAAS,MAAM,iCAC7B,CAAA;AAED,UAAO,kBAAkB,SAAS,OAAO,MAAM,MAAM,QAAO;IAC7D;EAED,MAAM,2BAA2B,eACzB,aAAa,SAAS,YAAY,SAAS,eAAe,MAClE;EAEA,eAAe,mBAAmB;AAChC,SAAM,KAAK,cAAc;IACvB,YAAY,QAAA,YAAY,MAAM;IAC9B,QAAQ;IACR,MAAM;IACN,OAAO;IACR,CAAA;;;uBAKD,mBAgCM,OAAA,EA/BJ,OAAK,eAAA,CAAC,wBAAsB,EAAA,MACN,yBAAA,OAAA,CAAA,CAAA,EAAA,EAAA,CAGtB,mBAaM,OAbN,YAaM;IAXI,QAAA,YAAY,MAAM,UAAK,sBAAA,WAAA,EAD/B,YAC0D,gCAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;IAElD,QAAA,YAAY,MAAM,UAAK,qBAAA,WAAA,EAD/B,YACyD,gCAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;IAEjD,QAAA,YAAY,MAAM,UAAK,qBAAA,WAAA,EAD/B,YAOe,MAAA,aAAA,EAAA;;KALb,OAAM;KACN,MAAK;KACJ,SAAO;;4BAER,CAAA,OAAA,OAAA,OAAA,KAAA,gBAF0B,eAE1B,GAAA,GAAA,YAAsC,MAAA,qBAAA,EAAA,EAAhB,QAAO,QAAM,CAAA,CAAA,CAAA;;;OAGvC,mBAYM,OAZN,YAYM,CAXJ,mBAUM,OAVN,YAUM,CARI,aAAA,SAAgB,SAAA,SAAY,YAAA,SAAe,eAAA,SAAA,WAAA,EADnD,YAQoB,cAAA;;IANjB,WAAW,MAAA,eAAc,CAAC;IAC1B,UAAA,SAAA;IACA,aAAA,YAAA;IACA,UAAA,MAAA,SAAQ;IACR,MAAM,aAAA;IACN,SAAS,MAAA,OAAM;IACf,gBAAA,eAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import ExecuteRequestTool_vue_vue_type_script_setup_true_lang_default from "./ExecuteRequestTool.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/views/Chat/Messages/ExecuteRequestTool.vue
|
|
5
|
-
var
|
|
5
|
+
var ExecuteRequestTool_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ExecuteRequestTool_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3e825a81"]]);
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { ExecuteRequestTool_default as default };
|
|
8
8
|
|
|
9
9
|
//# sourceMappingURL=ExecuteRequestTool.vue.js.map
|
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
import { useState
|
|
2
|
-
import
|
|
3
|
-
import { requestPartRequiresApproval
|
|
4
|
-
import { computed
|
|
1
|
+
import { useState } from "../../../state/state.js";
|
|
2
|
+
import RequestPreview_default from "../../../components/RequestPreview.vue.js";
|
|
3
|
+
import { requestPartRequiresApproval } from "../../../hooks/use-chat-approvals.js";
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock } from "vue";
|
|
5
5
|
//#region src/views/Chat/Messages/ExecuteRequestTool.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var _hoisted_1 = { class: "executeRequestTool" };
|
|
7
|
+
var ExecuteRequestTool_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "ExecuteRequestTool",
|
|
8
9
|
props: { messagePart: {} },
|
|
9
|
-
setup(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
state
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const state = useState();
|
|
12
|
+
const requestState = computed(() => {
|
|
13
|
+
if (__props.messagePart.value.state === "input-streaming") return "buildingRequest";
|
|
14
|
+
if (__props.messagePart.value.state === "approval-responded" && state.chat.status === "submitted") return "sendingRequest";
|
|
15
|
+
if (requestPartRequiresApproval(__props.messagePart.value)) return "requiresApproval";
|
|
16
|
+
if (__props.messagePart.value.state === "output-available") return __props.messagePart.value.output.success ? "requestSucceeded" : "requestFailed";
|
|
17
|
+
if (__props.messagePart.value.state === "output-error") return "rejected";
|
|
18
|
+
return null;
|
|
19
|
+
});
|
|
20
|
+
return (_ctx, _cache) => {
|
|
21
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [requestState.value ? (openBlock(), createBlock(RequestPreview_default, {
|
|
22
|
+
key: 0,
|
|
23
|
+
request: __props.messagePart.value.input,
|
|
24
|
+
response: __props.messagePart.value.output,
|
|
25
|
+
state: requestState.value
|
|
26
|
+
}, null, 8, [
|
|
27
|
+
"request",
|
|
28
|
+
"response",
|
|
29
|
+
"state"
|
|
30
|
+
])) : createCommentVNode("", true)]);
|
|
31
|
+
};
|
|
21
32
|
}
|
|
22
33
|
});
|
|
23
34
|
//#endregion
|
|
24
|
-
export {
|
|
35
|
+
export { ExecuteRequestTool_vue_vue_type_script_setup_true_lang_default as default };
|
|
25
36
|
|
|
26
37
|
//# sourceMappingURL=ExecuteRequestTool.vue.script.js.map
|