@scalar/agent-chat 0.2.3 → 0.2.5
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/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +115 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +35 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +39 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +89 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +43 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +53 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import m from "whatwg-mimetype";
|
|
2
|
+
const a = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
return decodeURIComponent(e);
|
|
5
|
+
} catch {
|
|
6
|
+
return e;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
function f(e) {
|
|
10
|
+
let t = "";
|
|
11
|
+
if (e) {
|
|
12
|
+
const n = e.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? e.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
|
|
13
|
+
n && (t = a(n.trim()));
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
const l = (e) => e instanceof Blob, p = (e) => e ? Object.keys(e).map((t) => ({
|
|
18
|
+
name: t,
|
|
19
|
+
value: e[t] ?? ""
|
|
20
|
+
})) : [];
|
|
21
|
+
function y({ data: e, headers: t }) {
|
|
22
|
+
const n = p(t), c = n.find((r) => r.name.toLowerCase() === "content-type"), o = c?.value ? new m(c.value) : void 0, i = f(
|
|
23
|
+
n.find((r) => r.name.toLowerCase() === "content-disposition")?.value ?? ""
|
|
24
|
+
), s = l(e) ? URL.createObjectURL(e) : typeof e == "string" ? URL.createObjectURL(new Blob([e], { type: o ? o.toString() : void 0 })) : e instanceof Object && Object.keys(e).length ? URL.createObjectURL(
|
|
25
|
+
new Blob([JSON.stringify(e)], {
|
|
26
|
+
type: o ? o.toString() : void 0
|
|
27
|
+
})
|
|
28
|
+
) : "";
|
|
29
|
+
return { mimeType: o, attachmentFilename: i, dataUrl: s };
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
y as processResponseBody
|
|
33
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_6: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
3
|
+
default?: (props: typeof __VLS_6) => any;
|
|
4
4
|
};
|
|
5
5
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchPopover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/SearchPopover.vue"],"names":[],"mappings":"AAuPA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as d, computed as i, createBlock as f, openBlock as s, unref as o, withCtx as c, renderSlot as h, createVNode as m, createElementBlock as r, Fragment as _, renderList as g, createCommentVNode as y, createElementVNode as v, toDisplayString as k } from "vue";
|
|
2
|
+
import { ScalarPopover as I, ScalarTextInput as S } from "@scalar/components";
|
|
3
|
+
import { ScalarIconMagnifyingGlass as V } from "@scalar/icons";
|
|
4
|
+
import { useSearch as x } from "../hooks/use-search.js";
|
|
5
|
+
import { useState as C } from "../state/state.js";
|
|
6
|
+
const N = ["onClick"], P = ["src"], b = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "searchResultsEmpty"
|
|
9
|
+
}, w = /* @__PURE__ */ d({
|
|
10
|
+
__name: "SearchPopover",
|
|
11
|
+
setup(A) {
|
|
12
|
+
const n = C(), l = x(), u = i(
|
|
13
|
+
() => l.results.value.filter(
|
|
14
|
+
(e) => !n.registryDocuments.value.some(
|
|
15
|
+
(a) => a.namespace === e.namespace && a.slug === e.slug
|
|
16
|
+
)
|
|
17
|
+
).map((e) => ({
|
|
18
|
+
...e,
|
|
19
|
+
label: e.title,
|
|
20
|
+
id: e.id
|
|
21
|
+
}))
|
|
22
|
+
);
|
|
23
|
+
return (e, a) => (s(), f(o(I), {
|
|
24
|
+
offset: 0,
|
|
25
|
+
placement: "top-start",
|
|
26
|
+
resize: "",
|
|
27
|
+
style: { width: "220px" }
|
|
28
|
+
}, {
|
|
29
|
+
popover: c(({ close: p }) => [
|
|
30
|
+
m(o(S), {
|
|
31
|
+
autofocus: "",
|
|
32
|
+
class: "searchInput",
|
|
33
|
+
modelValue: o(l).query.value,
|
|
34
|
+
placeholder: "Add an API",
|
|
35
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => o(l).query.value = t ?? "")
|
|
36
|
+
}, {
|
|
37
|
+
prefix: c(() => [
|
|
38
|
+
m(o(V), { class: "searchIcon" })
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
}, 8, ["modelValue"]),
|
|
42
|
+
u.value.length ? (s(!0), r(_, { key: 0 }, g(u.value, (t) => (s(), r("button", {
|
|
43
|
+
key: t.id,
|
|
44
|
+
class: "searchItem",
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: () => {
|
|
47
|
+
o(n).addDocument(t), p();
|
|
48
|
+
}
|
|
49
|
+
}, [
|
|
50
|
+
t.logoUrl ? (s(), r("img", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "searchItemLogo",
|
|
53
|
+
src: t.logoUrl
|
|
54
|
+
}, null, 8, P)) : y("", !0),
|
|
55
|
+
v("span", null, k(t.title), 1)
|
|
56
|
+
], 8, N))), 128)) : (s(), r("span", b, " No APIs found "))
|
|
57
|
+
]),
|
|
58
|
+
default: c(() => [
|
|
59
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
60
|
+
]),
|
|
61
|
+
_: 3
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
w as default
|
|
67
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendingRequest.vue.d.ts","sourceRoot":"","sources":["../../src/components/SendingRequest.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SendingRequest.vue.d.ts","sourceRoot":"","sources":["../../src/components/SendingRequest.vue"],"names":[],"mappings":";AA+HA,wBAKG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElementBlock as o, openBlock as n, createElementVNode as e, createTextVNode as r } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const d = {}, c = { class: "sendingRequest" };
|
|
5
|
+
function i(a, t) {
|
|
6
|
+
return n(), o("div", c, [...t[0] || (t[0] = [
|
|
7
|
+
e("div", { class: "playIcon" }, [
|
|
8
|
+
e("svg", {
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
height: "32",
|
|
11
|
+
viewBox: "0 0 256 256",
|
|
12
|
+
width: "32",
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14
|
+
}, [
|
|
15
|
+
e("path", { d: "M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z" })
|
|
16
|
+
])
|
|
17
|
+
], -1),
|
|
18
|
+
r(" Sending Request to Endpoint ", -1)
|
|
19
|
+
])]);
|
|
20
|
+
}
|
|
21
|
+
const f = /* @__PURE__ */ s(d, [["render", i], ["__scopeId", "data-v-65dc6dfb"]]);
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggestion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Suggestion.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;AAwDpC,
|
|
1
|
+
{"version":3,"file":"Suggestion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Suggestion.vue"],"names":[],"mappings":"AA4CA,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;AAwDpC,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../src/components/TestRequestButton.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAKnE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;AAqEF,wBAMG"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type UploadTmpDocumentState } from '../hooks/use-upload-tmp-document.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
attrs: [string, string][];
|
|
5
|
-
};
|
|
3
|
+
uploadState: UploadTmpDocumentState;
|
|
6
4
|
};
|
|
7
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
6
|
export default _default;
|
|
9
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=UploadSection.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadSection.vue.d.ts","sourceRoot":"","sources":["../../src/components/UploadSection.vue"],"names":[],"mappings":"AA0GA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAE7E,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,sBAAsB,CAAA;CACpC,CAAC;;AAmJF,wBAMG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as c, createElementBlock as a, openBlock as n, normalizeClass as u, createCommentVNode as r, createVNode as l, createTextVNode as s, unref as o, toDisplayString as p } from "vue";
|
|
2
|
+
import { useLoadingState as g, ScalarLoading as i } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCheck as m, ScalarIconXCircle as S } from "@scalar/icons";
|
|
4
|
+
const f = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "uploadText flex items-center gap-1.5"
|
|
7
|
+
}, x = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "uploadText flex items-center gap-1.5"
|
|
10
|
+
}, y = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "uploadText flex items-center gap-1.5"
|
|
13
|
+
}, k = {
|
|
14
|
+
key: 3,
|
|
15
|
+
class: "uploadText flex items-center gap-1.5"
|
|
16
|
+
}, N = /* @__PURE__ */ c({
|
|
17
|
+
__name: "UploadSection",
|
|
18
|
+
props: {
|
|
19
|
+
uploadState: {}
|
|
20
|
+
},
|
|
21
|
+
setup(e) {
|
|
22
|
+
const d = g();
|
|
23
|
+
return (C, t) => (n(), a("div", {
|
|
24
|
+
class: u(["uploadSection", {
|
|
25
|
+
error: e.uploadState.type === "error",
|
|
26
|
+
done: e.uploadState.type === "done"
|
|
27
|
+
}])
|
|
28
|
+
}, [
|
|
29
|
+
e.uploadState.type === "uploading" ? (n(), a("strong", f, [
|
|
30
|
+
l(o(i), {
|
|
31
|
+
loader: {
|
|
32
|
+
...o(d),
|
|
33
|
+
isLoading: !0
|
|
34
|
+
},
|
|
35
|
+
size: "lg"
|
|
36
|
+
}, null, 8, ["loader"]),
|
|
37
|
+
t[0] || (t[0] = s(" Uploading document... ", -1))
|
|
38
|
+
])) : r("", !0),
|
|
39
|
+
e.uploadState.type === "processing" ? (n(), a("strong", x, [
|
|
40
|
+
l(o(i), {
|
|
41
|
+
loader: {
|
|
42
|
+
...o(d),
|
|
43
|
+
isLoading: !0
|
|
44
|
+
},
|
|
45
|
+
size: "lg"
|
|
46
|
+
}, null, 8, ["loader"]),
|
|
47
|
+
t[1] || (t[1] = s(" Processing document... ", -1))
|
|
48
|
+
])) : r("", !0),
|
|
49
|
+
e.uploadState.type === "done" ? (n(), a("strong", y, [
|
|
50
|
+
l(o(m), { class: "icon" }),
|
|
51
|
+
t[2] || (t[2] = s(" Document processed ", -1))
|
|
52
|
+
])) : r("", !0),
|
|
53
|
+
e.uploadState.type === "error" ? (n(), a("strong", k, [
|
|
54
|
+
l(o(S), { class: "icon" }),
|
|
55
|
+
s(" " + p(e.uploadState.error), 1)
|
|
56
|
+
])) : r("", !0)
|
|
57
|
+
], 2));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
N as default
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/entities/prompt/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,QAAS,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { SecurityScheme } from '@scalar/types/entities';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
export declare const registryApiMetadata: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
namespace: z.ZodString;
|
|
8
|
+
currentVersion: z.ZodString;
|
|
9
|
+
logoUrl: z.ZodNullable<z.ZodURL>;
|
|
10
|
+
slug: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type ApiMetadata = z.infer<typeof registryApiMetadata>;
|
|
13
|
+
export type RegistryDocument = {
|
|
14
|
+
namespace: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
};
|
|
17
|
+
export type DocumentSettings = Record<string, {
|
|
18
|
+
securitySchemes: SecurityScheme[];
|
|
19
|
+
activeServer: OpenAPIV3_1.ServerObject | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC,MAAM,KAAK,CAAA;AAEnB,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE7D,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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ASK_FOR_AUTHENTICATION_TOOL_NAME: "ask-for-authentication";
|
|
3
|
+
export declare const askForAuthenticationInputSchema: z.ZodObject<{
|
|
4
|
+
uniqueIdentifier: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type AskForAuthenticationInput = z.input<typeof askForAuthenticationInputSchema>;
|
|
7
|
+
//# sourceMappingURL=ask-for-authentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-for-authentication.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/ask-for-authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gCAAgC,EAAG,wBAAiC,CAAA;AAEjF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,QAAQ,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { AgentChatError } from '../../helpers.js';
|
|
4
|
+
export declare const EXECUTE_REQUEST_TOOL_NAME: "execute-request";
|
|
5
|
+
export declare const executeRequestToolInputSchema: z.ZodObject<{
|
|
6
|
+
method: z.ZodString;
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
body: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ExecuteRequestToolInput = z.input<typeof executeRequestToolInputSchema>;
|
|
12
|
+
export type ExecuteRequestToolOutput = CallToolResult & {
|
|
13
|
+
structuredContent: {
|
|
14
|
+
success: false;
|
|
15
|
+
error: AgentChatError<'FAILED_TO_PARSE_RESPONSE_BODY', {
|
|
16
|
+
originalError: unknown;
|
|
17
|
+
}>;
|
|
18
|
+
} | {
|
|
19
|
+
success: false;
|
|
20
|
+
error: AgentChatError<'REQUEST_NOT_OK', {
|
|
21
|
+
status: number;
|
|
22
|
+
url: string;
|
|
23
|
+
responseBody: string | undefined;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
}>;
|
|
26
|
+
data?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
success: true;
|
|
29
|
+
data: {
|
|
30
|
+
status: number;
|
|
31
|
+
responseBody: string;
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
error?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
success: false;
|
|
37
|
+
error: AgentChatError<'FAILED_TO_FETCH', {
|
|
38
|
+
originalError: unknown;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=execute-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-request.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/execute-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE/C,eAAO,MAAM,yBAAyB,EAAG,iBAA0B,CAAA;AAEnE,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,MAAM,MAAM,wBAAwB,GAAG,cAAc,GAAG;IACtD,iBAAiB,EACb;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,+BAA+B,EAC/B;YACE,aAAa,EAAE,OAAO,CAAA;SACvB,CACF,CAAA;KACF,GACD;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,gBAAgB,EAChB;YACE,MAAM,EAAE,MAAM,CAAA;YACd,GAAG,EAAE,MAAM,CAAA;YACX,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;YAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAChC,CACF,CAAA;QACD,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB,GACD;QACE,OAAO,EAAE,IAAI,CAAA;QACb,IAAI,EAAE;YACJ,MAAM,EAAE,MAAM,CAAA;YACd,YAAY,EAAE,MAAM,CAAA;YACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAChC,CAAA;QACD,KAAK,CAAC,EAAE,SAAS,CAAA;KAClB,GACD;QACE,OAAO,EAAE,KAAK,CAAA;QACd,KAAK,EAAE,cAAc,CACnB,iBAAiB,EACjB;YACE,aAAa,EAAE,OAAO,CAAA;SACvB,CACF,CAAA;KACF,CAAA;CACN,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const GET_MINI_OPENAPI_SPEC_TOOL_NAME: "get-mini-openapi-spec";
|
|
5
|
+
export declare const getMiniOpenAPIDocToolInputSchema: z.ZodObject<{
|
|
6
|
+
question: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type GetMiniOpenAPIDocToolInput = z.input<typeof getMiniOpenAPIDocToolInputSchema>;
|
|
9
|
+
export type GetMiniOpenAPIDocToolOutput = CallToolResult & {
|
|
10
|
+
structuredContent: Partial<OpenAPIV3_1.Document>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=get-mini-openapi-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-mini-openapi-spec.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/get-mini-openapi-spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,+BAA+B,EAAG,uBAAgC,CAAA;AAE/E,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,cAAc,GAAG;IACzD,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;CACjD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
3
|
+
export declare const GET_OPENAPI_SPECS_SUMMARY_TOOL_NAME: "get-openapi-specs-summary";
|
|
4
|
+
export type GetOpenAPISpecsSummaryToolOutput = CallToolResult & {
|
|
5
|
+
structuredContent: {
|
|
6
|
+
info?: OpenAPIV3_1.InfoObject;
|
|
7
|
+
paths: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=get-openapi-spec-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-openapi-spec-summary.d.ts","sourceRoot":"","sources":["../../../src/entities/tools/get-openapi-spec-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,eAAO,MAAM,mCAAmC,EAAG,2BAAoC,CAAA;AAEvF,MAAM,MAAM,gCAAgC,GAAG,cAAc,GAAG;IAC9D,iBAAiB,EAAE;QACjB,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAA;QAC7B,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;CACF,CAAA"}
|
package/dist/helpers.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ToolUIPart, UIDataTypes, UIMessagePart } from 'ai';
|
|
2
1
|
import type { MergedSecuritySchemes } from '@scalar/api-client/v2/blocks/scalar-auth-selector-block';
|
|
3
2
|
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
4
3
|
import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
@@ -7,7 +6,8 @@ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas';
|
|
|
7
6
|
import type { XScalarSelectedSecurity } from '@scalar/workspace-store/schemas/extensions/security/x-scalar-selected-security';
|
|
8
7
|
import type { OpenApiDocument, OperationObject, ParameterObject, PathItemObject, SecurityRequirementObject, SecuritySchemeObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
9
8
|
import { type SecuritySchemes } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
10
|
-
import type {
|
|
9
|
+
import type { ToolUIPart, UIDataTypes, UIMessagePart } from 'ai';
|
|
10
|
+
import type { Tools } from './state/state.js';
|
|
11
11
|
/** Combine pathItem and operation parameters into a single, dereferenced parameter array */
|
|
12
12
|
export declare const combineParams: (pathParams?: PathItemObject["parameters"], operationParams?: OperationObject["parameters"]) => ParameterObject[];
|
|
13
13
|
/**
|
|
@@ -80,7 +80,7 @@ export declare const authStorage: () => {
|
|
|
80
80
|
'x-scalar-secret-token': string;
|
|
81
81
|
} & {
|
|
82
82
|
type: "apiKey";
|
|
83
|
-
in: "
|
|
83
|
+
in: "cookie" | "query" | "header";
|
|
84
84
|
name: string;
|
|
85
85
|
}) | ({
|
|
86
86
|
description?: string | undefined;
|
|
@@ -125,7 +125,7 @@ export declare const authStorage: () => {
|
|
|
125
125
|
} & {
|
|
126
126
|
'x-scalar-secret-client-secret': string;
|
|
127
127
|
} & {
|
|
128
|
-
'x-scalar-credentials-location'?: "
|
|
128
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
129
129
|
}) | undefined;
|
|
130
130
|
implicit?: ({
|
|
131
131
|
refreshUrl: string;
|
|
@@ -175,7 +175,7 @@ export declare const authStorage: () => {
|
|
|
175
175
|
} & {
|
|
176
176
|
'x-scalar-secret-client-secret': string;
|
|
177
177
|
} & {
|
|
178
|
-
'x-scalar-credentials-location'?: "
|
|
178
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
179
179
|
}) | undefined;
|
|
180
180
|
authorizationCode?: ({
|
|
181
181
|
refreshUrl: string;
|
|
@@ -206,7 +206,7 @@ export declare const authStorage: () => {
|
|
|
206
206
|
} & {
|
|
207
207
|
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
208
208
|
} & {
|
|
209
|
-
'x-scalar-credentials-location'?: "
|
|
209
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
210
210
|
}) | undefined;
|
|
211
211
|
};
|
|
212
212
|
} & {
|
|
@@ -217,11 +217,11 @@ export declare const authStorage: () => {
|
|
|
217
217
|
type: "openIdConnect";
|
|
218
218
|
openIdConnectUrl: string;
|
|
219
219
|
}) | ({
|
|
220
|
-
summary?: string | undefined;
|
|
221
220
|
description?: string | undefined;
|
|
221
|
+
summary?: string | undefined;
|
|
222
222
|
$ref: string;
|
|
223
223
|
} & {
|
|
224
|
-
$status?: "
|
|
224
|
+
$status?: "loading" | "error" | undefined;
|
|
225
225
|
$global?: boolean | undefined;
|
|
226
226
|
} & {
|
|
227
227
|
'$ref-value': ({
|
|
@@ -230,7 +230,7 @@ export declare const authStorage: () => {
|
|
|
230
230
|
'x-scalar-secret-token': string;
|
|
231
231
|
} & {
|
|
232
232
|
type: "apiKey";
|
|
233
|
-
in: "
|
|
233
|
+
in: "cookie" | "query" | "header";
|
|
234
234
|
name: string;
|
|
235
235
|
}) | ({
|
|
236
236
|
description?: string | undefined;
|
|
@@ -275,7 +275,7 @@ export declare const authStorage: () => {
|
|
|
275
275
|
} & {
|
|
276
276
|
'x-scalar-secret-client-secret': string;
|
|
277
277
|
} & {
|
|
278
|
-
'x-scalar-credentials-location'?: "
|
|
278
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
279
279
|
}) | undefined;
|
|
280
280
|
implicit?: ({
|
|
281
281
|
refreshUrl: string;
|
|
@@ -325,7 +325,7 @@ export declare const authStorage: () => {
|
|
|
325
325
|
} & {
|
|
326
326
|
'x-scalar-secret-client-secret': string;
|
|
327
327
|
} & {
|
|
328
|
-
'x-scalar-credentials-location'?: "
|
|
328
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
329
329
|
}) | undefined;
|
|
330
330
|
authorizationCode?: ({
|
|
331
331
|
refreshUrl: string;
|
|
@@ -356,7 +356,7 @@ export declare const authStorage: () => {
|
|
|
356
356
|
} & {
|
|
357
357
|
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
358
358
|
} & {
|
|
359
|
-
'x-scalar-credentials-location'?: "
|
|
359
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
360
360
|
}) | undefined;
|
|
361
361
|
};
|
|
362
362
|
} & {
|
|
@@ -415,4 +415,12 @@ export declare const restoreAuthSecretsFromStorage: ({ documentName, workspaceSt
|
|
|
415
415
|
workspaceStore: WorkspaceStore;
|
|
416
416
|
}) => void;
|
|
417
417
|
export declare function safeParseJson(value: string): any;
|
|
418
|
+
export type AgentChatError<T extends string = string, D = unknown> = {
|
|
419
|
+
code: T;
|
|
420
|
+
detail: D;
|
|
421
|
+
};
|
|
422
|
+
export declare const AgentErrorCodes: {
|
|
423
|
+
readonly LIMIT_REACHED: "LIMIT_REACHED";
|
|
424
|
+
};
|
|
425
|
+
export declare function createError<const T extends string, D>(code: T, detail: D): AgentChatError<T, D>;
|
|
418
426
|
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"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"}
|