@scalar/agent-chat 0.12.41 → 0.12.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPreview.vue.d.ts","sourceRoot":"","sources":["../../src/components/RequestPreview.vue"],"names":[],"mappings":"AAiRA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,IAAI,CAAA;AAcrC,OAAO,KAAK,EACV,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,kCAAkC,CAAA;AAEzC,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EACJ,iCAAiC,GACjC,WAAW,CAAC,iCAAiC,CAAC,CAAA;IAClD,QAAQ,CAAC,EAAE,kCAAkC,CAAA;IAC7C,KAAK,EACD,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,UAAU,GACV,UAAU,GACV,iBAAiB,CAAA;CACtB,CAAC;AAgXF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"RequestPreview.vue.d.ts","sourceRoot":"","sources":["../../src/components/RequestPreview.vue"],"names":[],"mappings":"AAuRA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,IAAI,CAAA;AAcrC,OAAO,KAAK,EACV,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,kCAAkC,CAAA;AAEzC,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EACJ,iCAAiC,GACjC,WAAW,CAAC,iCAAiC,CAAC,CAAA;IAClD,QAAQ,CAAC,EAAE,kCAAkC,CAAA;IAC7C,KAAK,EACD,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,UAAU,GACV,UAAU,GACV,iBAAiB,CAAA;CACtB,CAAC;AAsXF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-he
2
2
  import RequestPreview_vue_vue_type_script_setup_true_lang_default from "./RequestPreview.vue.script.js";
3
3
  /* empty css */
4
4
  //#region src/components/RequestPreview.vue
5
- var RequestPreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RequestPreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1e1f4549"]]);
5
+ var RequestPreview_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RequestPreview_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e049f4c9"]]);
6
6
  //#endregion
7
7
  export { RequestPreview_default as default };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPreview.vue.js","names":[],"sources":["../../src/components/RequestPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\nimport { type DeepPartial } from 'ai'\nimport { computed, ref } from 'vue'\n\nimport AutosendPaused from '@/components/AutosendPaused.vue'\nimport BuildingRequest from '@/components/BuildingRequest.vue'\nimport RequestApproved from '@/components/RequestApproved.vue'\nimport RequestFailed from '@/components/RequestFailed.vue'\nimport RequestRejected from '@/components/RequestRejected.vue'\nimport RequestSuccess from '@/components/RequestSuccess.vue'\nimport { getMediaTypeConfig } from '@/components/ResponseBody/helpers/media-types'\nimport { processResponseBody } from '@/components/ResponseBody/helpers/process-response-body'\nimport ResponseBody from '@/components/ResponseBody/ResponseBody.vue'\nimport ResponseBodyToggle from '@/components/ResponseBody/ResponseBodyToggle.vue'\nimport SendingRequest from '@/components/SendingRequest.vue'\nimport type {\n ExecuteClientSideRequestToolInput,\n ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\n\nconst { request, response, state } = defineProps<{\n request?:\n | ExecuteClientSideRequestToolInput\n | DeepPartial<ExecuteClientSideRequestToolInput>\n response?: ExecuteClientSideRequestToolOutput\n state:\n | 'requiresApproval'\n | 'sendingRequest'\n | 'requestSucceeded'\n | 'requestFailed'\n | 'approved'\n | 'rejected'\n | 'buildingRequest'\n}>()\n\nconst responseData = computed(() => {\n if (response?.success) {\n return {\n data: response.data.responseBody,\n headers: response.data.headers,\n }\n }\n\n if (response?.error?.code === 'REQUEST_NOT_OK') {\n return {\n data: response.error.detail.responseBody,\n headers: response.error.detail.headers,\n }\n }\n\n return undefined\n})\n\nconst showRequestToggle = ref(false)\n\n/** Show request preview automatically for failed requests or when approval is required. */\nconst shouldShowRequest = computed(() => {\n if (state === 'requestFailed' || state === 'requiresApproval') {\n return true\n }\n return showRequestToggle.value\n})\n\nconst responseBody = computed(() =>\n processResponseBody({\n data: responseData.value?.data,\n headers: responseData.value?.headers,\n }),\n)\n\nconst mediaConfig = computed(() =>\n getMediaTypeConfig(responseBody.value.mimeType?.essence ?? ''),\n)\n\nconst displayToggle = ref<'preview' | 'raw'>()\nfunction toggleDisplay(mode: 'preview' | 'raw') {\n displayToggle.value = mode\n}\n\nconst displayMode = computed(() => {\n if (displayToggle.value) return displayToggle.value\n\n if (mediaConfig.value?.raw && !mediaConfig.value.preview) return 'raw'\n if (mediaConfig.value?.preview) return 'preview'\n\n return 'raw'\n})\n</script>\n\n<template>\n <div\n class=\"requestPreview\"\n :class=\"{\n open: shouldShowRequest,\n succeeded: state === 'requestSucceeded',\n }\">\n <RequestApproved v-if=\"state === 'approved'\" />\n <div\n v-else-if=\"state === 'buildingRequest'\"\n class=\"autosendContainer\">\n <BuildingRequest />\n </div>\n <div\n v-else-if=\"state === 'requiresApproval'\"\n class=\"autosendContainer\">\n <AutosendPaused />\n </div>\n <button\n v-else-if=\"state === 'sendingRequest'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <SendingRequest />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'requestSucceeded'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestSuccess />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'rejected'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestRejected />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <RequestFailed v-else-if=\"state === 'requestFailed'\" />\n <div class=\"requestContent\">\n <div class=\"requestContentInner\">\n <div\n v-if=\"request\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Request</h1>\n </div>\n <ScalarCodeBlock\n class=\"codeBlock\"\n :content=\"JSON.stringify(request, null, 2)\"\n lang=\"json\" />\n </div>\n <div\n v-if=\"responseData\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Response</h1>\n <ResponseBodyToggle\n v-if=\"mediaConfig?.raw && mediaConfig.preview\"\n v-model=\"displayMode\"\n @toggle=\"toggleDisplay\" />\n </div>\n <ResponseBody\n :data=\"responseData.data\"\n :display=\"displayMode\"\n :mediaConfig=\"mediaConfig\"\n :responseBody=\"responseBody\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.requestHeaderContainer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5px;\n}\n\n.requestPreview {\n border-radius: var(--scalar-radius-2xl);\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n}\n\n.requestContent {\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}\n\n.requestPreview.open .requestContent {\n grid-template-rows: 1fr;\n}\n.requestPreview.succeeded {\n padding: 0;\n}\n\n.requestContentInner {\n min-height: 0;\n overflow: hidden;\n}\n.code {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-4);\n border-radius: var(--scalar-radius-2xl);\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n overflow: hidden;\n margin-bottom: 12px;\n}\n.dark-mode .code {\n background: var(--scalar-background-2);\n}\n.code h1 {\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-3);\n padding: 8px;\n}\n.code :deep(.codeBlock) {\n max-height: calc(50vh - 100px);\n padding-top: 0;\n}\n.autosendContainer {\n display: flex;\n justify-content: space-between;\n}\n\n.sendButton {\n background: var(--scalar-color-blue);\n color: white;\n font-weight: var(--scalar-semibold);\n padding: 5px 10px;\n}\n.sendButton:hover,\n.sendButton:active {\n background: color-mix(in srgb, var(--scalar-color-blue), black 10%);\n color: white !important;\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.toggleButton:hover {\n text-decoration: underline;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"RequestPreview.vue.js","names":[],"sources":["../../src/components/RequestPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\nimport { type DeepPartial } from 'ai'\nimport { computed, ref } from 'vue'\n\nimport AutosendPaused from '@/components/AutosendPaused.vue'\nimport BuildingRequest from '@/components/BuildingRequest.vue'\nimport RequestApproved from '@/components/RequestApproved.vue'\nimport RequestFailed from '@/components/RequestFailed.vue'\nimport RequestRejected from '@/components/RequestRejected.vue'\nimport RequestSuccess from '@/components/RequestSuccess.vue'\nimport { getMediaTypeConfig } from '@/components/ResponseBody/helpers/media-types'\nimport { processResponseBody } from '@/components/ResponseBody/helpers/process-response-body'\nimport ResponseBody from '@/components/ResponseBody/ResponseBody.vue'\nimport ResponseBodyToggle from '@/components/ResponseBody/ResponseBodyToggle.vue'\nimport SendingRequest from '@/components/SendingRequest.vue'\nimport type {\n ExecuteClientSideRequestToolInput,\n ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\n\nconst { request, response, state } = defineProps<{\n request?:\n | ExecuteClientSideRequestToolInput\n | DeepPartial<ExecuteClientSideRequestToolInput>\n response?: ExecuteClientSideRequestToolOutput\n state:\n | 'requiresApproval'\n | 'sendingRequest'\n | 'requestSucceeded'\n | 'requestFailed'\n | 'approved'\n | 'rejected'\n | 'buildingRequest'\n}>()\n\nconst responseData = computed(() => {\n if (response?.success) {\n return {\n data: response.data.responseBody,\n headers: response.data.headers,\n }\n }\n\n if (response?.error?.code === 'REQUEST_NOT_OK') {\n return {\n data: response.error.detail.responseBody,\n headers: response.error.detail.headers,\n }\n }\n\n return undefined\n})\n\nconst showRequestToggle = ref(false)\n\n/** Show request preview automatically for failed requests or when approval is required. */\nconst shouldShowRequest = computed(() => {\n if (state === 'requestFailed' || state === 'requiresApproval') {\n return true\n }\n return showRequestToggle.value\n})\n\nconst responseBody = computed(() =>\n processResponseBody({\n data: responseData.value?.data,\n headers: responseData.value?.headers,\n }),\n)\n\nconst mediaConfig = computed(() =>\n getMediaTypeConfig(responseBody.value.mimeType?.essence ?? ''),\n)\n\nconst displayToggle = ref<'preview' | 'raw'>()\nfunction toggleDisplay(mode: 'preview' | 'raw') {\n displayToggle.value = mode\n}\n\nconst displayMode = computed(() => {\n if (displayToggle.value) {\n return displayToggle.value\n }\n\n if (mediaConfig.value?.raw && !mediaConfig.value.preview) {\n return 'raw'\n }\n if (mediaConfig.value?.preview) {\n return 'preview'\n }\n\n return 'raw'\n})\n</script>\n\n<template>\n <div\n class=\"requestPreview\"\n :class=\"{\n open: shouldShowRequest,\n succeeded: state === 'requestSucceeded',\n }\">\n <RequestApproved v-if=\"state === 'approved'\" />\n <div\n v-else-if=\"state === 'buildingRequest'\"\n class=\"autosendContainer\">\n <BuildingRequest />\n </div>\n <div\n v-else-if=\"state === 'requiresApproval'\"\n class=\"autosendContainer\">\n <AutosendPaused />\n </div>\n <button\n v-else-if=\"state === 'sendingRequest'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <SendingRequest />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'requestSucceeded'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestSuccess />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'rejected'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestRejected />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <RequestFailed v-else-if=\"state === 'requestFailed'\" />\n <div class=\"requestContent\">\n <div class=\"requestContentInner\">\n <div\n v-if=\"request\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Request</h1>\n </div>\n <ScalarCodeBlock\n class=\"codeBlock\"\n :content=\"JSON.stringify(request, null, 2)\"\n lang=\"json\" />\n </div>\n <div\n v-if=\"responseData\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Response</h1>\n <ResponseBodyToggle\n v-if=\"mediaConfig?.raw && mediaConfig.preview\"\n v-model=\"displayMode\"\n @toggle=\"toggleDisplay\" />\n </div>\n <ResponseBody\n :data=\"responseData.data\"\n :display=\"displayMode\"\n :mediaConfig=\"mediaConfig\"\n :responseBody=\"responseBody\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.requestHeaderContainer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5px;\n}\n\n.requestPreview {\n border-radius: var(--scalar-radius-2xl);\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n}\n\n.requestContent {\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}\n\n.requestPreview.open .requestContent {\n grid-template-rows: 1fr;\n}\n.requestPreview.succeeded {\n padding: 0;\n}\n\n.requestContentInner {\n min-height: 0;\n overflow: hidden;\n}\n.code {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-4);\n border-radius: var(--scalar-radius-2xl);\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n overflow: hidden;\n margin-bottom: 12px;\n}\n.dark-mode .code {\n background: var(--scalar-background-2);\n}\n.code h1 {\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-3);\n padding: 8px;\n}\n.code :deep(.codeBlock) {\n max-height: calc(50vh - 100px);\n padding-top: 0;\n}\n.autosendContainer {\n display: flex;\n justify-content: space-between;\n}\n\n.sendButton {\n background: var(--scalar-color-blue);\n color: white;\n font-weight: var(--scalar-semibold);\n padding: 5px 10px;\n}\n.sendButton:hover,\n.sendButton:active {\n background: color-mix(in srgb, var(--scalar-color-blue), black 10%);\n color: white !important;\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.toggleButton:hover {\n text-decoration: underline;\n}\n</style>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestPreview.vue.script.js","names":[],"sources":["../../src/components/RequestPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\nimport { type DeepPartial } from 'ai'\nimport { computed, ref } from 'vue'\n\nimport AutosendPaused from '@/components/AutosendPaused.vue'\nimport BuildingRequest from '@/components/BuildingRequest.vue'\nimport RequestApproved from '@/components/RequestApproved.vue'\nimport RequestFailed from '@/components/RequestFailed.vue'\nimport RequestRejected from '@/components/RequestRejected.vue'\nimport RequestSuccess from '@/components/RequestSuccess.vue'\nimport { getMediaTypeConfig } from '@/components/ResponseBody/helpers/media-types'\nimport { processResponseBody } from '@/components/ResponseBody/helpers/process-response-body'\nimport ResponseBody from '@/components/ResponseBody/ResponseBody.vue'\nimport ResponseBodyToggle from '@/components/ResponseBody/ResponseBodyToggle.vue'\nimport SendingRequest from '@/components/SendingRequest.vue'\nimport type {\n ExecuteClientSideRequestToolInput,\n ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\n\nconst { request, response, state } = defineProps<{\n request?:\n | ExecuteClientSideRequestToolInput\n | DeepPartial<ExecuteClientSideRequestToolInput>\n response?: ExecuteClientSideRequestToolOutput\n state:\n | 'requiresApproval'\n | 'sendingRequest'\n | 'requestSucceeded'\n | 'requestFailed'\n | 'approved'\n | 'rejected'\n | 'buildingRequest'\n}>()\n\nconst responseData = computed(() => {\n if (response?.success) {\n return {\n data: response.data.responseBody,\n headers: response.data.headers,\n }\n }\n\n if (response?.error?.code === 'REQUEST_NOT_OK') {\n return {\n data: response.error.detail.responseBody,\n headers: response.error.detail.headers,\n }\n }\n\n return undefined\n})\n\nconst showRequestToggle = ref(false)\n\n/** Show request preview automatically for failed requests or when approval is required. */\nconst shouldShowRequest = computed(() => {\n if (state === 'requestFailed' || state === 'requiresApproval') {\n return true\n }\n return showRequestToggle.value\n})\n\nconst responseBody = computed(() =>\n processResponseBody({\n data: responseData.value?.data,\n headers: responseData.value?.headers,\n }),\n)\n\nconst mediaConfig = computed(() =>\n getMediaTypeConfig(responseBody.value.mimeType?.essence ?? ''),\n)\n\nconst displayToggle = ref<'preview' | 'raw'>()\nfunction toggleDisplay(mode: 'preview' | 'raw') {\n displayToggle.value = mode\n}\n\nconst displayMode = computed(() => {\n if (displayToggle.value) return displayToggle.value\n\n if (mediaConfig.value?.raw && !mediaConfig.value.preview) return 'raw'\n if (mediaConfig.value?.preview) return 'preview'\n\n return 'raw'\n})\n</script>\n\n<template>\n <div\n class=\"requestPreview\"\n :class=\"{\n open: shouldShowRequest,\n succeeded: state === 'requestSucceeded',\n }\">\n <RequestApproved v-if=\"state === 'approved'\" />\n <div\n v-else-if=\"state === 'buildingRequest'\"\n class=\"autosendContainer\">\n <BuildingRequest />\n </div>\n <div\n v-else-if=\"state === 'requiresApproval'\"\n class=\"autosendContainer\">\n <AutosendPaused />\n </div>\n <button\n v-else-if=\"state === 'sendingRequest'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <SendingRequest />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'requestSucceeded'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestSuccess />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'rejected'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestRejected />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <RequestFailed v-else-if=\"state === 'requestFailed'\" />\n <div class=\"requestContent\">\n <div class=\"requestContentInner\">\n <div\n v-if=\"request\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Request</h1>\n </div>\n <ScalarCodeBlock\n class=\"codeBlock\"\n :content=\"JSON.stringify(request, null, 2)\"\n lang=\"json\" />\n </div>\n <div\n v-if=\"responseData\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Response</h1>\n <ResponseBodyToggle\n v-if=\"mediaConfig?.raw && mediaConfig.preview\"\n v-model=\"displayMode\"\n @toggle=\"toggleDisplay\" />\n </div>\n <ResponseBody\n :data=\"responseData.data\"\n :display=\"displayMode\"\n :mediaConfig=\"mediaConfig\"\n :responseBody=\"responseBody\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.requestHeaderContainer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5px;\n}\n\n.requestPreview {\n border-radius: var(--scalar-radius-2xl);\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n}\n\n.requestContent {\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}\n\n.requestPreview.open .requestContent {\n grid-template-rows: 1fr;\n}\n.requestPreview.succeeded {\n padding: 0;\n}\n\n.requestContentInner {\n min-height: 0;\n overflow: hidden;\n}\n.code {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-4);\n border-radius: var(--scalar-radius-2xl);\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n overflow: hidden;\n margin-bottom: 12px;\n}\n.dark-mode .code {\n background: var(--scalar-background-2);\n}\n.code h1 {\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-3);\n padding: 8px;\n}\n.code :deep(.codeBlock) {\n max-height: calc(50vh - 100px);\n padding-top: 0;\n}\n.autosendContainer {\n display: flex;\n justify-content: space-between;\n}\n\n.sendButton {\n background: var(--scalar-color-blue);\n color: white;\n font-weight: var(--scalar-semibold);\n padding: 5px 10px;\n}\n.sendButton:hover,\n.sendButton:active {\n background: color-mix(in srgb, var(--scalar-color-blue), black 10%);\n color: white !important;\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.toggleButton:hover {\n text-decoration: underline;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,eAAe,eAAe;GAClC,IAAI,QAAA,UAAU,SACZ,OAAO;IACL,MAAM,QAAA,SAAS,KAAK;IACpB,SAAS,Q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KAAK,UAAU,QAAA,SAAO,MAAA,CAAA;IAChC,MAAK;+DAGD,aAAA,SAAA,UAAA,GADR,mBAeM,OAfN,YAeM,CAZJ,mBAMM,OANN,YAMM,CAAA,OAAA,OAAA,OAAA,KALJ,mBAAiB,MAAA,MAAb,YAAQ,EAAA,IAEJ,YAAA,OAAa,OAAO,YAAA,MAAY,WAAA,UAAA,GADxC,YAG4B,4BAAA;;gBADjB,YAAA;6EAAW,QAAA;IACnB,UAAQ;kEAEb,YAIiC,sBAAA;IAH9B,MAAM,aAAA,MAAa;IACnB,SAAS,YAAA;IACT,aAAa,YAAA;IACb,cAAc,aAAA"}
1
+ {"version":3,"file":"RequestPreview.vue.script.js","names":[],"sources":["../../src/components/RequestPreview.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarCodeBlock } from '@scalar/components/code-block'\nimport { ScalarIconCaretDown, ScalarIconCaretRight } from '@scalar/icons'\nimport { type DeepPartial } from 'ai'\nimport { computed, ref } from 'vue'\n\nimport AutosendPaused from '@/components/AutosendPaused.vue'\nimport BuildingRequest from '@/components/BuildingRequest.vue'\nimport RequestApproved from '@/components/RequestApproved.vue'\nimport RequestFailed from '@/components/RequestFailed.vue'\nimport RequestRejected from '@/components/RequestRejected.vue'\nimport RequestSuccess from '@/components/RequestSuccess.vue'\nimport { getMediaTypeConfig } from '@/components/ResponseBody/helpers/media-types'\nimport { processResponseBody } from '@/components/ResponseBody/helpers/process-response-body'\nimport ResponseBody from '@/components/ResponseBody/ResponseBody.vue'\nimport ResponseBodyToggle from '@/components/ResponseBody/ResponseBodyToggle.vue'\nimport SendingRequest from '@/components/SendingRequest.vue'\nimport type {\n ExecuteClientSideRequestToolInput,\n ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\n\nconst { request, response, state } = defineProps<{\n request?:\n | ExecuteClientSideRequestToolInput\n | DeepPartial<ExecuteClientSideRequestToolInput>\n response?: ExecuteClientSideRequestToolOutput\n state:\n | 'requiresApproval'\n | 'sendingRequest'\n | 'requestSucceeded'\n | 'requestFailed'\n | 'approved'\n | 'rejected'\n | 'buildingRequest'\n}>()\n\nconst responseData = computed(() => {\n if (response?.success) {\n return {\n data: response.data.responseBody,\n headers: response.data.headers,\n }\n }\n\n if (response?.error?.code === 'REQUEST_NOT_OK') {\n return {\n data: response.error.detail.responseBody,\n headers: response.error.detail.headers,\n }\n }\n\n return undefined\n})\n\nconst showRequestToggle = ref(false)\n\n/** Show request preview automatically for failed requests or when approval is required. */\nconst shouldShowRequest = computed(() => {\n if (state === 'requestFailed' || state === 'requiresApproval') {\n return true\n }\n return showRequestToggle.value\n})\n\nconst responseBody = computed(() =>\n processResponseBody({\n data: responseData.value?.data,\n headers: responseData.value?.headers,\n }),\n)\n\nconst mediaConfig = computed(() =>\n getMediaTypeConfig(responseBody.value.mimeType?.essence ?? ''),\n)\n\nconst displayToggle = ref<'preview' | 'raw'>()\nfunction toggleDisplay(mode: 'preview' | 'raw') {\n displayToggle.value = mode\n}\n\nconst displayMode = computed(() => {\n if (displayToggle.value) {\n return displayToggle.value\n }\n\n if (mediaConfig.value?.raw && !mediaConfig.value.preview) {\n return 'raw'\n }\n if (mediaConfig.value?.preview) {\n return 'preview'\n }\n\n return 'raw'\n})\n</script>\n\n<template>\n <div\n class=\"requestPreview\"\n :class=\"{\n open: shouldShowRequest,\n succeeded: state === 'requestSucceeded',\n }\">\n <RequestApproved v-if=\"state === 'approved'\" />\n <div\n v-else-if=\"state === 'buildingRequest'\"\n class=\"autosendContainer\">\n <BuildingRequest />\n </div>\n <div\n v-else-if=\"state === 'requiresApproval'\"\n class=\"autosendContainer\">\n <AutosendPaused />\n </div>\n <button\n v-else-if=\"state === 'sendingRequest'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <SendingRequest />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'requestSucceeded'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestSuccess />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <button\n v-else-if=\"state === 'rejected'\"\n class=\"toggleButton\"\n type=\"button\"\n @click=\"showRequestToggle = !showRequestToggle\">\n <RequestRejected />\n\n <ScalarIconCaretDown v-if=\"shouldShowRequest\" />\n <ScalarIconCaretRight v-else />\n </button>\n <RequestFailed v-else-if=\"state === 'requestFailed'\" />\n <div class=\"requestContent\">\n <div class=\"requestContentInner\">\n <div\n v-if=\"request\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Request</h1>\n </div>\n <ScalarCodeBlock\n class=\"codeBlock\"\n :content=\"JSON.stringify(request, null, 2)\"\n lang=\"json\" />\n </div>\n <div\n v-if=\"responseData\"\n class=\"code\">\n <div class=\"requestHeaderContainer\">\n <h1>Response</h1>\n <ResponseBodyToggle\n v-if=\"mediaConfig?.raw && mediaConfig.preview\"\n v-model=\"displayMode\"\n @toggle=\"toggleDisplay\" />\n </div>\n <ResponseBody\n :data=\"responseData.data\"\n :display=\"displayMode\"\n :mediaConfig=\"mediaConfig\"\n :responseBody=\"responseBody\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.requestHeaderContainer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 5px;\n}\n\n.requestPreview {\n border-radius: var(--scalar-radius-2xl);\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n}\n\n.requestContent {\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}\n\n.requestPreview.open .requestContent {\n grid-template-rows: 1fr;\n}\n.requestPreview.succeeded {\n padding: 0;\n}\n\n.requestContentInner {\n min-height: 0;\n overflow: hidden;\n}\n.code {\n display: flex;\n flex-direction: column;\n font-size: var(--scalar-font-size-4);\n border-radius: var(--scalar-radius-2xl);\n background: color-mix(\n in srgb,\n var(--scalar-background-2),\n var(--scalar-background-1)\n );\n overflow: hidden;\n margin-bottom: 12px;\n}\n.dark-mode .code {\n background: var(--scalar-background-2);\n}\n.code h1 {\n font-size: var(--scalar-font-size-3);\n color: var(--scalar-color-3);\n padding: 8px;\n}\n.code :deep(.codeBlock) {\n max-height: calc(50vh - 100px);\n padding-top: 0;\n}\n.autosendContainer {\n display: flex;\n justify-content: space-between;\n}\n\n.sendButton {\n background: var(--scalar-color-blue);\n color: white;\n font-weight: var(--scalar-semibold);\n padding: 5px 10px;\n}\n.sendButton:hover,\n.sendButton:active {\n background: color-mix(in srgb, var(--scalar-color-blue), black 10%);\n color: white !important;\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.toggleButton:hover {\n text-decoration: underline;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,eAAe,eAAe;GAClC,IAAI,QAAA,UAAU,SACZ,OAAO;IACL,MAAM,QAAA,SAAS,KAAK;IACpB,SAAS,QAAA,SAAS,KAAK;GACzB;GAGF,IAAI,QAAA,UAAU,OAAO,SAAS,kBAC5B,OAAO;IACL,MAAM,QAAA,SAAS,MAAM,OAAO;IAC5B,SAAS,QAAA,SAAS,MAAM,OAAO;GACjC;EAIJ,CAAC;EAED,MAAM,oBAAoB,IAAI,KAAK;;EAGnC,MAAM,oBAAoB,eAAe;GACvC,IAAI,QAAA,UAAU,mBAAmB,QAAA,UAAU,oBACzC,OAAO;GAET,OAAO,kBAAkB;EAC3B,CAAC;EAED,MAAM,eAAe,eACnB,oBAAoB;GAClB,MAAM,aAAa,OAAO;GAC1B,SAAS,aAAa,OAAO;EAC/B,CAAC,CACH;EAEA,MAAM,cAAc,eAClB,mBAAmB,aAAa,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../../src/entities/registry/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAmC,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEjF,eAAO,MAAM,mBAAmB;;;;;;;EAO9B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/G,MAAM,MAAM,gBAAgB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,MAAM,EACN;IACE,eAAe,EAAE,cAAc,EAAE,CAAA;IACjC,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,SAAS,CAAA;CACnD,CACF,CAAA"}
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/entities/registry/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,KAAK,MAAM,EAAmC,MAAM,oBAAoB,CAAA;AAEjF,eAAO,MAAM,mBAAmB;;;;;;;EAO9B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/G,MAAM,MAAM,gBAAgB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,MAAM,EACN;IACE,eAAe,EAAE,cAAc,EAAE,CAAA;IACjC,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,SAAS,CAAA;CACnD,CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","names":[],"sources":["../../../src/entities/registry/document.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { SecurityScheme } from '@scalar/types/entities'\nimport { nullable, object, string, union, type Static } from '@scalar/validation'\n\nexport const registryApiMetadata = object({\n id: string(),\n title: string(),\n namespace: string(),\n currentVersion: string(),\n logoUrl: union([string(), nullable()]),\n slug: string(),\n})\n\nexport type ApiMetadata = Static<typeof registryApiMetadata> & { removable?: boolean; searchEnabled?: boolean }\n\nexport type RegistryDocument = { namespace: string; slug: string }\n\nexport type DocumentSettings = Record<\n string,\n {\n securitySchemes: SecurityScheme[]\n activeServer: OpenAPIV3_1.ServerObject | undefined\n }\n>\n"],"mappings":";;AAIA,IAAa,sBAAsB,OAAO;CACxC,IAAI,OAAO;CACX,OAAO,OAAO;CACd,WAAW,OAAO;CAClB,gBAAgB,OAAO;CACvB,SAAS,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACrC,MAAM,OAAO;AACf,CAAC"}
1
+ {"version":3,"file":"document.js","names":[],"sources":["../../../src/entities/registry/document.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { SecurityScheme } from '@scalar/types/entities'\nimport { type Static, nullable, object, string, union } from '@scalar/validation'\n\nexport const registryApiMetadata = object({\n id: string(),\n title: string(),\n namespace: string(),\n currentVersion: string(),\n logoUrl: union([string(), nullable()]),\n slug: string(),\n})\n\nexport type ApiMetadata = Static<typeof registryApiMetadata> & { removable?: boolean; searchEnabled?: boolean }\n\nexport type RegistryDocument = { namespace: string; slug: string }\n\nexport type DocumentSettings = Record<\n string,\n {\n securitySchemes: SecurityScheme[]\n activeServer: OpenAPIV3_1.ServerObject | undefined\n }\n>\n"],"mappings":";;AAIA,IAAa,sBAAsB,OAAO;CACxC,IAAI,OAAO;CACX,OAAO,OAAO;CACd,WAAW,OAAO;CAClB,gBAAgB,OAAO;CACvB,SAAS,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACrC,MAAM,OAAO;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhE,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;;EAG1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
1
+ {"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,oBAAoB,CAAA;AAEhE,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;;EAG1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ask-for-authentication.js","names":[],"sources":["../../../src/entities/tools/ask-for-authentication.ts"],"sourcesContent":["import { object, string, type Static } from '@scalar/validation'\n\nexport const ASK_FOR_AUTHENTICATION_TOOL_NAME = 'ask-for-authentication' as const\n\nexport const askForAuthenticationInputSchema = object({\n documentName: string(),\n uniqueIdentifier: string({ typeComment: 'Needed for legacy support for old clients' }),\n})\n\nexport type AskForAuthenticationInput = Static<typeof askForAuthenticationInputSchema>\n"],"mappings":";;AAEA,IAAa,mCAAmC;AAEhD,IAAa,kCAAkC,OAAO;CACpD,cAAc,OAAO;CACrB,kBAAkB,OAAO,EAAE,aAAa,4CAA4C,CAAC;AACvF,CAAC"}
1
+ {"version":3,"file":"ask-for-authentication.js","names":[],"sources":["../../../src/entities/tools/ask-for-authentication.ts"],"sourcesContent":["import { type Static, object, string } from '@scalar/validation'\n\nexport const ASK_FOR_AUTHENTICATION_TOOL_NAME = 'ask-for-authentication' as const\n\nexport const askForAuthenticationInputSchema = object({\n documentName: string(),\n uniqueIdentifier: string({ typeComment: 'Needed for legacy support for old clients' }),\n})\n\nexport type AskForAuthenticationInput = Static<typeof askForAuthenticationInputSchema>\n"],"mappings":";;AAEA,IAAa,mCAAmC;AAEhD,IAAa,kCAAkC,OAAO;CACpD,cAAc,OAAO;CACrB,kBAAkB,OAAO,EAAE,aAAa,4CAA4C,CAAC;AACvF,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { Result } from 'neverpanic';
2
1
  import { type Static } from '@scalar/validation';
2
+ import type { Result } from 'neverpanic';
3
3
  import type { AgentChatError } from '../../entities/error/constants.js';
4
4
  export declare const EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME: "execute-request";
5
5
  export declare const executeClientSideRequestToolInputSchema: import("@scalar/validation").ObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAoC,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,eAAO,MAAM,qCAAqC,EAAG,iBAA0B,CAAA;AAE/E,eAAO,MAAM,uCAAuC;;;;;;;EAOlD,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEtG,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,EACrD,cAAc,CACZ,+BAA+B,EAC/B;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,gBAAgB,EAChB;IACE,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CACF,GACD,cAAc,CACZ,iBAAiB,EACjB;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,2CAA2C,EAC3C;IACE,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CACF,GACD,cAAc,CAAC,8BAA8B,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC,GACjH,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC,CACvD,CAAA"}
1
+ {"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAoC,MAAM,oBAAoB,CAAA;AAClF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,eAAO,MAAM,qCAAqC,EAAG,iBAA0B,CAAA;AAE/E,eAAO,MAAM,uCAAuC;;;;;;;EAOlD,CAAA;AAEF,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAEtG,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,EAAE,CAAA;CAAE,EACrD,cAAc,CACZ,+BAA+B,EAC/B;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,gBAAgB,EAChB;IACE,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CACF,GACD,cAAc,CACZ,iBAAiB,EACjB;IACE,aAAa,EAAE,OAAO,CAAA;CACvB,CACF,GACD,cAAc,CACZ,2CAA2C,EAC3C;IACE,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CACF,GACD,cAAc,CAAC,8BAA8B,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC,GACjH,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC,CACvD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"execute-request.js","names":[],"sources":["../../../src/entities/tools/execute-request.ts"],"sourcesContent":["import type { Result } from 'neverpanic'\nimport { object, optional, record, string, type Static } from '@scalar/validation'\n\nimport type { AgentChatError } from '@/entities/error/constants'\n\nexport const EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME = 'execute-request' as const\n\nexport const executeClientSideRequestToolInputSchema = object({\n method: string(),\n path: string(),\n headers: optional(record(string(), string())),\n body: optional(string()),\n documentName: string(),\n documentIdentifier: string({ typeComment: 'Needed for legacy support for old clients' }),\n})\n\nexport type ExecuteClientSideRequestToolInput = Static<typeof executeClientSideRequestToolInputSchema>\n\nexport type ExecuteClientSideRequestToolOutput = Result<\n { status: number; responseBody?: unknown; headers: {} },\n | AgentChatError<\n 'FAILED_TO_PARSE_RESPONSE_BODY',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'REQUEST_NOT_OK',\n {\n status: number\n url: string\n responseBody: unknown\n headers: Record<string, string>\n }\n >\n | AgentChatError<\n 'FAILED_TO_FETCH',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED',\n {\n documentName: string\n namespace: string\n slug: string\n }\n >\n | AgentChatError<'FAILED_TO_DETERMINE_DOCUMENT', { namespace?: string; slug?: string; documentIdentifier: string }>\n | AgentChatError<'FAILED_TO_EXECUTE_REQUEST', unknown>\n>\n"],"mappings":";;AAKA,IAAa,wCAAwC;AAErD,IAAa,0CAA0C,OAAO;CAC5D,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,SAAS,SAAS,OAAO,OAAO,GAAG,OAAO,CAAC,CAAC;CAC5C,MAAM,SAAS,OAAO,CAAC;CACvB,cAAc,OAAO;CACrB,oBAAoB,OAAO,EAAE,aAAa,4CAA4C,CAAC;AACzF,CAAC"}
1
+ {"version":3,"file":"execute-request.js","names":[],"sources":["../../../src/entities/tools/execute-request.ts"],"sourcesContent":["import { type Static, object, optional, record, string } from '@scalar/validation'\nimport type { Result } from 'neverpanic'\n\nimport type { AgentChatError } from '@/entities/error/constants'\n\nexport const EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME = 'execute-request' as const\n\nexport const executeClientSideRequestToolInputSchema = object({\n method: string(),\n path: string(),\n headers: optional(record(string(), string())),\n body: optional(string()),\n documentName: string(),\n documentIdentifier: string({ typeComment: 'Needed for legacy support for old clients' }),\n})\n\nexport type ExecuteClientSideRequestToolInput = Static<typeof executeClientSideRequestToolInputSchema>\n\nexport type ExecuteClientSideRequestToolOutput = Result<\n { status: number; responseBody?: unknown; headers: {} },\n | AgentChatError<\n 'FAILED_TO_PARSE_RESPONSE_BODY',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'REQUEST_NOT_OK',\n {\n status: number\n url: string\n responseBody: unknown\n headers: Record<string, string>\n }\n >\n | AgentChatError<\n 'FAILED_TO_FETCH',\n {\n originalError: unknown\n }\n >\n | AgentChatError<\n 'DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED',\n {\n documentName: string\n namespace: string\n slug: string\n }\n >\n | AgentChatError<'FAILED_TO_DETERMINE_DOCUMENT', { namespace?: string; slug?: string; documentIdentifier: string }>\n | AgentChatError<'FAILED_TO_EXECUTE_REQUEST', unknown>\n>\n"],"mappings":";;AAKA,IAAa,wCAAwC;AAErD,IAAa,0CAA0C,OAAO;CAC5D,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,SAAS,SAAS,OAAO,OAAO,GAAG,OAAO,CAAC,CAAC;CAC5C,MAAM,SAAS,OAAO,CAAC;CACvB,cAAc,OAAO;CACrB,oBAAoB,OAAO,EAAE,aAAa,4CAA4C,CAAC;AACzF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-openapi-operations.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/search-openapi-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhE,eAAO,MAAM,mCAAmC,EAAG,2BAAoC,CAAA;AAEvF,eAAO,MAAM,kCAAkC;;EAE7C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEhG,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAA"}
1
+ {"version":3,"file":"search-openapi-operations.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/search-openapi-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,oBAAoB,CAAA;AAEhE,eAAO,MAAM,mCAAmC,EAAG,2BAAoC,CAAA;AAEvF,eAAO,MAAM,kCAAkC;;EAE7C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEhG,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-openapi-operations.js","names":[],"sources":["../../../src/entities/tools/search-openapi-operations.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { object, string, type Static } from '@scalar/validation'\n\nexport const SEARCH_OPENAPI_OPERATIONS_TOOL_NAME = 'search-openapi-operations' as const\n\nexport const searchOpenAPIOperationsInputSchema = object({\n question: string(),\n})\n\nexport type SearchOpenAPIOperationsToolInput = Static<typeof searchOpenAPIOperationsInputSchema>\n\nexport type SearchOpenAPIOperationsToolOutput = Partial<OpenAPIV3_1.Document>[]\n"],"mappings":";;AAGA,IAAa,sCAAsC;AAEnD,IAAa,qCAAqC,OAAO,EACvD,UAAU,OAAO,EACnB,CAAC"}
1
+ {"version":3,"file":"search-openapi-operations.js","names":[],"sources":["../../../src/entities/tools/search-openapi-operations.ts"],"sourcesContent":["import type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport { type Static, object, string } from '@scalar/validation'\n\nexport const SEARCH_OPENAPI_OPERATIONS_TOOL_NAME = 'search-openapi-operations' as const\n\nexport const searchOpenAPIOperationsInputSchema = object({\n question: string(),\n})\n\nexport type SearchOpenAPIOperationsToolInput = Static<typeof searchOpenAPIOperationsInputSchema>\n\nexport type SearchOpenAPIOperationsToolOutput = Partial<OpenAPIV3_1.Document>[]\n"],"mappings":";;AAGA,IAAa,sCAAsC;AAEnD,IAAa,qCAAqC,OAAO,EACvD,UAAU,OAAO,EACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat-error.d.ts","sourceRoot":"","sources":["../../src/hooks/use-chat-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAMpG,QAAA,MAAM,eAAe;;;;EAInB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAEtD,wBAAgB,YAAY;;;;;gBAgB3B"}
1
+ {"version":3,"file":"use-chat-error.d.ts","sourceRoot":"","sources":["../../src/hooks/use-chat-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAsD,MAAM,oBAAoB,CAAA;AAMpG,QAAA,MAAM,eAAe;;;;EAInB,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAEtD,wBAAgB,YAAY;;;;;gBAmB3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat-error.js","names":[],"sources":["../../src/hooks/use-chat-error.ts"],"sourcesContent":["import { coerce, number, object, optional, string, validate, type Static } from '@scalar/validation'\nimport { computed } from 'vue'\n\nimport { safeParseJson } from '@/helpers'\nimport { useState } from '@/state/state'\n\nconst chatErrorSchema = object({\n message: string(),\n code: string(),\n status: optional(number()),\n})\nexport type ChatError = Static<typeof chatErrorSchema>\n\nexport function useChatError() {\n const { chat } = useState()\n\n return computed(() => {\n if (!chat.error) return\n\n const errorJson = safeParseJson(chat.error.message)\n\n if (!errorJson || !validate(chatErrorSchema, errorJson))\n return {\n message: chat.error.message,\n code: 'UNKNOWN_ERROR',\n }\n\n return coerce(chatErrorSchema, errorJson)\n })\n}\n"],"mappings":";;;;;AAMA,IAAM,kBAAkB,OAAO;CAC7B,SAAS,OAAO;CAChB,MAAM,OAAO;CACb,QAAQ,SAAS,OAAO,CAAC;AAC3B,CAAC;AAGD,SAAgB,eAAe;CAC7B,MAAM,EAAE,SAAS,SAAS;CAE1B,OAAO,eAAe;EACpB,IAAI,CAAC,KAAK,OAAO;EAEjB,MAAM,YAAY,cAAc,KAAK,MAAM,OAAO;EAElD,IAAI,CAAC,aAAa,CAAC,SAAS,iBAAiB,SAAS,GACpD,OAAO;GACL,SAAS,KAAK,MAAM;GACpB,MAAM;EACR;EAEF,OAAO,OAAO,iBAAiB,SAAS;CAC1C,CAAC;AACH"}
1
+ {"version":3,"file":"use-chat-error.js","names":[],"sources":["../../src/hooks/use-chat-error.ts"],"sourcesContent":["import { type Static, coerce, number, object, optional, string, validate } from '@scalar/validation'\nimport { computed } from 'vue'\n\nimport { safeParseJson } from '@/helpers'\nimport { useState } from '@/state/state'\n\nconst chatErrorSchema = object({\n message: string(),\n code: string(),\n status: optional(number()),\n})\nexport type ChatError = Static<typeof chatErrorSchema>\n\nexport function useChatError() {\n const { chat } = useState()\n\n return computed(() => {\n if (!chat.error) {\n return\n }\n\n const errorJson = safeParseJson(chat.error.message)\n\n if (!errorJson || !validate(chatErrorSchema, errorJson)) {\n return {\n message: chat.error.message,\n code: 'UNKNOWN_ERROR',\n }\n }\n\n return coerce(chatErrorSchema, errorJson)\n })\n}\n"],"mappings":";;;;;AAMA,IAAM,kBAAkB,OAAO;CAC7B,SAAS,OAAO;CAChB,MAAM,OAAO;CACb,QAAQ,SAAS,OAAO,CAAC;AAC3B,CAAC;AAGD,SAAgB,eAAe;CAC7B,MAAM,EAAE,SAAS,SAAS;CAE1B,OAAO,eAAe;EACpB,IAAI,CAAC,KAAK,OACR;EAGF,MAAM,YAAY,cAAc,KAAK,MAAM,OAAO;EAElD,IAAI,CAAC,aAAa,CAAC,SAAS,iBAAiB,SAAS,GACpD,OAAO;GACL,SAAS,KAAK,MAAM;GACpB,MAAM;EACR;EAGF,OAAO,OAAO,iBAAiB,SAAS;CAC1C,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat-scroll.d.ts","sourceRoot":"","sources":["../../src/hooks/use-chat-scroll.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,SAgB5B"}
1
+ {"version":3,"file":"use-chat-scroll.d.ts","sourceRoot":"","sources":["../../src/hooks/use-chat-scroll.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,SAoB5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-chat-scroll.js","names":[],"sources":["../../src/hooks/use-chat-scroll.ts"],"sourcesContent":["import type { UIMessage } from 'ai'\nimport { nextTick, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nexport function useChatScroll() {\n const state = useState()\n\n function getMsgContent(msg?: UIMessage) {\n const lastPart = msg?.parts.at(-1)\n if (!lastPart) return\n\n if (lastPart.type !== 'text') return\n\n return lastPart.text\n }\n\n watch([() => state.chat.status, () => getMsgContent(state.chat.lastMessage)], async () => {\n await nextTick()\n window.scrollTo(0, document.body.scrollHeight)\n })\n}\n"],"mappings":";;;AAKA,SAAgB,gBAAgB;CAC9B,MAAM,QAAQ,SAAS;CAEvB,SAAS,cAAc,KAAiB;EACtC,MAAM,WAAW,KAAK,MAAM,GAAG,EAAE;EACjC,IAAI,CAAC,UAAU;EAEf,IAAI,SAAS,SAAS,QAAQ;EAE9B,OAAO,SAAS;CAClB;CAEA,MAAM,OAAO,MAAM,KAAK,cAAc,cAAc,MAAM,KAAK,WAAW,CAAC,GAAG,YAAY;EACxF,MAAM,SAAS;EACf,OAAO,SAAS,GAAG,SAAS,KAAK,YAAY;CAC/C,CAAC;AACH"}
1
+ {"version":3,"file":"use-chat-scroll.js","names":[],"sources":["../../src/hooks/use-chat-scroll.ts"],"sourcesContent":["import type { UIMessage } from 'ai'\nimport { nextTick, watch } from 'vue'\n\nimport { useState } from '@/state/state'\n\nexport function useChatScroll() {\n const state = useState()\n\n function getMsgContent(msg?: UIMessage) {\n const lastPart = msg?.parts.at(-1)\n if (!lastPart) {\n return\n }\n\n if (lastPart.type !== 'text') {\n return\n }\n\n return lastPart.text\n }\n\n watch([() => state.chat.status, () => getMsgContent(state.chat.lastMessage)], async () => {\n await nextTick()\n window.scrollTo(0, document.body.scrollHeight)\n })\n}\n"],"mappings":";;;AAKA,SAAgB,gBAAgB;CAC9B,MAAM,QAAQ,SAAS;CAEvB,SAAS,cAAc,KAAiB;EACtC,MAAM,WAAW,KAAK,MAAM,GAAG,EAAE;EACjC,IAAI,CAAC,UACH;EAGF,IAAI,SAAS,SAAS,QACpB;EAGF,OAAO,SAAS;CAClB;CAEA,MAAM,OAAO,MAAM,KAAK,cAAc,cAAc,MAAM,KAAK,WAAW,CAAC,GAAG,YAAY;EACxF,MAAM,SAAS;EACf,OAAO,SAAS,GAAG,SAAS,KAAK,YAAY;CAC/C,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-search.js","names":[],"sources":["../../src/hooks/use-search.ts"],"sourcesContent":["import { useDebounceFn } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nimport type { ApiMetadata } from '@/entities/registry/document'\nimport { useState } from '@/state/state'\n\nexport function useSearch() {\n const { api } = useState()\n\n const queryRef = ref('')\n\n const search = useDebounceFn(async (q) => {\n const searchResponse = await api.search(q)\n\n if (!searchResponse.success) {\n return\n }\n\n results.value = searchResponse.data.results\n }, 200)\n\n const query = computed({\n get: () => {\n return queryRef.value\n },\n set: (v) => {\n search(v)\n queryRef.value = v\n },\n })\n\n const results = ref<ApiMetadata[]>([])\n\n search('')\n\n return {\n query,\n results,\n }\n}\n"],"mappings":";;;;AAMA,SAAgB,YAAY;CAC1B,MAAM,EAAE,QAAQ,SAAS;CAEzB,MAAM,WAAW,IAAI,EAAE;CAEvB,MAAM,SAAS,cAAc,OAAO,MAAM;EACxC,MAAM,iBAAiB,MAAM,IAAI,OAAO,CAAC;EAEzC,IAAI,CAAC,eAAe,SAClB;EAGF,QAAQ,QAAQ,eAAe,KAAK;CACtC,GAAG,GAAG;CAEN,MAAM,QAAQ,SAAS;EACrB,WAAW;GACT,OAAO,SAAS;EAClB;EACA,MAAM,MAAM;GACV,OAAO,CAAC;GACR,SAAS,QAAQ;EACnB;CACF,CAAC;CAED,MAAM,UAAU,IAAmB,CAAC,CAAC;CAErC,OAAO,EAAE;CAET,OAAO;EACL;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-search.js","names":[],"sources":["../../src/hooks/use-search.ts"],"sourcesContent":["import { useDebounceFn } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nimport type { ApiMetadata } from '@/entities/registry/document'\nimport { useState } from '@/state/state'\n\nexport function useSearch() {\n const { api } = useState()\n\n const queryRef = ref('')\n\n const search = useDebounceFn(async (q) => {\n const searchResponse = await api.search(q)\n\n if (!searchResponse.success) {\n return\n }\n\n results.value = searchResponse.data.results\n }, 200)\n\n const query = computed({\n get: () => {\n return queryRef.value\n },\n set: (v) => {\n void search(v)\n queryRef.value = v\n },\n })\n\n const results = ref<ApiMetadata[]>([])\n\n void search('')\n\n return {\n query,\n results,\n }\n}\n"],"mappings":";;;;AAMA,SAAgB,YAAY;CAC1B,MAAM,EAAE,QAAQ,SAAS;CAEzB,MAAM,WAAW,IAAI,EAAE;CAEvB,MAAM,SAAS,cAAc,OAAO,MAAM;EACxC,MAAM,iBAAiB,MAAM,IAAI,OAAO,CAAC;EAEzC,IAAI,CAAC,eAAe,SAClB;EAGF,QAAQ,QAAQ,eAAe,KAAK;CACtC,GAAG,GAAG;CAEN,MAAM,QAAQ,SAAS;EACrB,WAAW;GACT,OAAO,SAAS;EAClB;EACA,MAAM,MAAM;GACV,OAAY,CAAC;GACb,SAAS,QAAQ;EACnB;CACF,CAAC;CAED,MAAM,UAAU,IAAmB,CAAC,CAAC;CAErC,OAAY,EAAE;CAEd,OAAO;EACL;EACA;CACF;AACF"}
package/dist/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/agent-chat"
12
12
  },
13
- "version": "0.12.41",
13
+ "version": "0.12.43",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },