@scalar/agent-chat 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.vue.d.ts +10 -0
- package/dist/App.vue.d.ts.map +1 -0
- package/dist/App.vue.js +23 -0
- package/dist/App.vue.js.map +1 -0
- package/dist/App.vue2.js +5 -0
- package/dist/App.vue2.js.map +1 -0
- package/dist/Chat.vue.d.ts +3 -0
- package/dist/Chat.vue.d.ts.map +1 -0
- package/dist/Chat.vue.js +55 -0
- package/dist/Chat.vue.js.map +1 -0
- package/dist/Chat.vue2.js +5 -0
- package/dist/Chat.vue2.js.map +1 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +11 -0
- package/dist/_virtual/_plugin-vue_export-helper.js.map +1 -0
- package/dist/components/ContextItem.vue.d.ts +16 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -0
- package/dist/components/ContextItem.vue.js +8 -0
- package/dist/components/ContextItem.vue.js.map +1 -0
- package/dist/components/ContextItem.vue2.js +22 -0
- package/dist/components/ContextItem.vue2.js.map +1 -0
- package/dist/components/Endpoint.vue.d.ts +9 -0
- package/dist/components/Endpoint.vue.d.ts.map +1 -0
- package/dist/components/Endpoint.vue.js +8 -0
- package/dist/components/Endpoint.vue.js.map +1 -0
- package/dist/components/Endpoint.vue2.js +98 -0
- package/dist/components/Endpoint.vue2.js.map +1 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts +3 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +32 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js.map +1 -0
- package/dist/components/Logo.vue.d.ts +3 -0
- package/dist/components/Logo.vue.d.ts.map +1 -0
- package/dist/components/Logo.vue.js +25 -0
- package/dist/components/Logo.vue.js.map +1 -0
- package/dist/components/SendingRequest.vue.d.ts +3 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -0
- package/dist/components/SendingRequest.vue.js +26 -0
- package/dist/components/SendingRequest.vue.js.map +1 -0
- package/dist/components/Suggestion.vue.d.ts +10 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -0
- package/dist/components/Suggestion.vue.js +8 -0
- package/dist/components/Suggestion.vue.js.map +1 -0
- package/dist/components/Suggestion.vue2.js +28 -0
- package/dist/components/Suggestion.vue2.js.map +1 -0
- package/dist/components/TestRequestButton.vue.d.ts +8 -0
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -0
- package/dist/components/TestRequestButton.vue.js +8 -0
- package/dist/components/TestRequestButton.vue.js.map +1 -0
- package/dist/components/TestRequestButton.vue2.js +37 -0
- package/dist/components/TestRequestButton.vue2.js.map +1 -0
- package/dist/helpers.d.ts +39 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +111 -0
- package/dist/helpers.js.map +1 -0
- package/dist/hooks/useActiveServer.d.ts +2 -0
- package/dist/hooks/useActiveServer.d.ts.map +1 -0
- package/dist/hooks/useActiveServer.js +20 -0
- package/dist/hooks/useActiveServer.js.map +1 -0
- package/dist/hooks/useChatOperationBlocks.d.ts +3 -0
- package/dist/hooks/useChatOperationBlocks.d.ts.map +1 -0
- package/dist/hooks/useChatOperationBlocks.js +29 -0
- package/dist/hooks/useChatOperationBlocks.js.map +1 -0
- package/dist/hooks/useChatScroll.d.ts +2 -0
- package/dist/hooks/useChatScroll.d.ts.map +1 -0
- package/dist/hooks/useChatScroll.js +22 -0
- package/dist/hooks/useChatScroll.js.map +1 -0
- package/dist/hooks/useSecuritySchemes.d.ts +2 -0
- package/dist/hooks/useSecuritySchemes.d.ts.map +1 -0
- package/dist/hooks/useSecuritySchemes.js +29 -0
- package/dist/hooks/useSecuritySchemes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/api.js +11 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/core.js +58 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/errors.js +25 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/parse.js +64 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/regexes.js +8 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/schemas.js +181 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/util.js +61 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/schemas.js +60 -0
- package/dist/node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/schemas.js.map +1 -0
- package/dist/package.json +63 -0
- package/dist/registry/get-document.d.ts +4 -0
- package/dist/registry/get-document.d.ts.map +1 -0
- package/dist/registry/get-document.js +23 -0
- package/dist/registry/get-document.js.map +1 -0
- package/dist/state/state.d.ts +47 -0
- package/dist/state/state.d.ts.map +1 -0
- package/dist/state/state.js +107 -0
- package/dist/state/state.js.map +1 -0
- package/dist/style.css +12261 -0
- package/dist/views/Auth.vue.d.ts +17 -0
- package/dist/views/Auth.vue.d.ts.map +1 -0
- package/dist/views/Auth.vue.js +71 -0
- package/dist/views/Auth.vue.js.map +1 -0
- package/dist/views/Auth.vue2.js +5 -0
- package/dist/views/Auth.vue2.js.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts +7 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.js +8 -0
- package/dist/views/Chat/Chat.vue.js.map +1 -0
- package/dist/views/Chat/Chat.vue2.js +72 -0
- package/dist/views/Chat/Chat.vue2.js.map +1 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +8 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js.map +1 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +62 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js.map +1 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +11 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +8 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js.map +1 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +66 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js.map +1 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts +8 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/Text.vue.js +21 -0
- package/dist/views/Chat/Messages/Text.vue.js.map +1 -0
- package/dist/views/Chat/Messages/Text.vue2.js +5 -0
- package/dist/views/Chat/Messages/Text.vue2.js.map +1 -0
- package/dist/views/Layout.vue.d.ts +7 -0
- package/dist/views/Layout.vue.d.ts.map +1 -0
- package/dist/views/Layout.vue.js +8 -0
- package/dist/views/Layout.vue.js.map +1 -0
- package/dist/views/Layout.vue2.js +32 -0
- package/dist/views/Layout.vue2.js.map +1 -0
- package/dist/views/PromptForm.vue.d.ts +10 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -0
- package/dist/views/PromptForm.vue.js +8 -0
- package/dist/views/PromptForm.vue.js.map +1 -0
- package/dist/views/PromptForm.vue2.js +125 -0
- package/dist/views/PromptForm.vue2.js.map +1 -0
- package/dist/views/Settings.vue.d.ts +7 -0
- package/dist/views/Settings.vue.d.ts.map +1 -0
- package/dist/views/Settings.vue.js +9 -0
- package/dist/views/Settings.vue.js.map +1 -0
- package/dist/views/Settings.vue2.js +81 -0
- package/dist/views/Settings.vue2.js.map +1 -0
- package/dist/views/Start.vue.d.ts +7 -0
- package/dist/views/Start.vue.d.ts.map +1 -0
- package/dist/views/Start.vue.js +8 -0
- package/dist/views/Start.vue.js.map +1 -0
- package/dist/views/Start.vue2.js +57 -0
- package/dist/views/Start.vue2.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { $constructor } from "../core/core.js";
|
|
2
|
+
import { normalizeParams, clone } from "../core/util.js";
|
|
3
|
+
import { _string } from "../core/api.js";
|
|
4
|
+
import { $ZodArray, $ZodString, $ZodType } from "../core/schemas.js";
|
|
5
|
+
import { parse, safeParse, parseAsync, safeParseAsync } from "../core/parse.js";
|
|
6
|
+
const ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
7
|
+
if (!inst._zod)
|
|
8
|
+
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
9
|
+
$ZodType.init(inst, def);
|
|
10
|
+
inst.def = def;
|
|
11
|
+
inst.type = def.type;
|
|
12
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
13
|
+
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
14
|
+
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
15
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
16
|
+
inst.check = (...checks) => {
|
|
17
|
+
return inst.clone(
|
|
18
|
+
{
|
|
19
|
+
...def,
|
|
20
|
+
checks: [
|
|
21
|
+
...def.checks ?? [],
|
|
22
|
+
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
// { parent: true }
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
inst.clone = (_def, params) => clone(inst, _def, params);
|
|
29
|
+
inst.brand = () => inst;
|
|
30
|
+
inst.register = ((reg, meta) => {
|
|
31
|
+
reg.add(inst, meta);
|
|
32
|
+
return inst;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
|
|
36
|
+
$ZodString.init(inst, def);
|
|
37
|
+
ZodMiniType.init(inst, def);
|
|
38
|
+
});
|
|
39
|
+
function string(params) {
|
|
40
|
+
return _string(ZodMiniString);
|
|
41
|
+
}
|
|
42
|
+
const ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
|
|
43
|
+
$ZodArray.init(inst, def);
|
|
44
|
+
ZodMiniType.init(inst, def);
|
|
45
|
+
});
|
|
46
|
+
function array(element, params) {
|
|
47
|
+
return new ZodMiniArray({
|
|
48
|
+
type: "array",
|
|
49
|
+
element,
|
|
50
|
+
...normalizeParams()
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
ZodMiniArray,
|
|
55
|
+
ZodMiniString,
|
|
56
|
+
ZodMiniType,
|
|
57
|
+
array,
|
|
58
|
+
string
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sources":["../../../../../../../../../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/schemas.js"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodMiniType = /*@__PURE__*/ core.$constructor(\"ZodMiniType\", (inst, def) => {\n if (!inst._zod)\n throw new Error(\"Uninitialized schema in ZodMiniType.\");\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.check = (...checks) => {\n return inst.clone({\n ...def,\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }\n // { parent: true }\n );\n };\n inst.clone = (_def, params) => core.clone(inst, _def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n});\nexport const ZodMiniString = /*@__PURE__*/ core.$constructor(\"ZodMiniString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function string(params) {\n return core._string(ZodMiniString, params);\n}\nexport const ZodMiniStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n ZodMiniString.init(inst, def);\n});\nexport const ZodMiniEmail = /*@__PURE__*/ core.$constructor(\"ZodMiniEmail\", (inst, def) => {\n core.$ZodEmail.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodMiniEmail, params);\n}\nexport const ZodMiniGUID = /*@__PURE__*/ core.$constructor(\"ZodMiniGUID\", (inst, def) => {\n core.$ZodGUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodMiniGUID, params);\n}\nexport const ZodMiniUUID = /*@__PURE__*/ core.$constructor(\"ZodMiniUUID\", (inst, def) => {\n core.$ZodUUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodMiniUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodMiniUUID, params);\n}\nexport const ZodMiniURL = /*@__PURE__*/ core.$constructor(\"ZodMiniURL\", (inst, def) => {\n core.$ZodURL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodMiniURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodMiniURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEmoji = /*@__PURE__*/ core.$constructor(\"ZodMiniEmoji\", (inst, def) => {\n core.$ZodEmoji.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodMiniEmoji, params);\n}\nexport const ZodMiniNanoID = /*@__PURE__*/ core.$constructor(\"ZodMiniNanoID\", (inst, def) => {\n core.$ZodNanoID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodMiniNanoID, params);\n}\nexport const ZodMiniCUID = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID\", (inst, def) => {\n core.$ZodCUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function cuid(params) {\n return core._cuid(ZodMiniCUID, params);\n}\nexport const ZodMiniCUID2 = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID2\", (inst, def) => {\n core.$ZodCUID2.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodMiniCUID2, params);\n}\nexport const ZodMiniULID = /*@__PURE__*/ core.$constructor(\"ZodMiniULID\", (inst, def) => {\n core.$ZodULID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodMiniULID, params);\n}\nexport const ZodMiniXID = /*@__PURE__*/ core.$constructor(\"ZodMiniXID\", (inst, def) => {\n core.$ZodXID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodMiniXID, params);\n}\nexport const ZodMiniKSUID = /*@__PURE__*/ core.$constructor(\"ZodMiniKSUID\", (inst, def) => {\n core.$ZodKSUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodMiniKSUID, params);\n}\nexport const ZodMiniIPv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv4\", (inst, def) => {\n core.$ZodIPv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodMiniIPv4, params);\n}\nexport const ZodMiniIPv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv6\", (inst, def) => {\n core.$ZodIPv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodMiniIPv6, params);\n}\nexport const ZodMiniCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodMiniCIDRv4, params);\n}\nexport const ZodMiniCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodMiniCIDRv6, params);\n}\nexport const ZodMiniBase64 = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64\", (inst, def) => {\n core.$ZodBase64.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodMiniBase64, params);\n}\nexport const ZodMiniBase64URL = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64URL\", (inst, def) => {\n core.$ZodBase64URL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodMiniBase64URL, params);\n}\nexport const ZodMiniE164 = /*@__PURE__*/ core.$constructor(\"ZodMiniE164\", (inst, def) => {\n core.$ZodE164.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodMiniE164, params);\n}\nexport const ZodMiniJWT = /*@__PURE__*/ core.$constructor(\"ZodMiniJWT\", (inst, def) => {\n core.$ZodJWT.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodMiniJWT, params);\n}\nexport const ZodMiniCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniCustomStringFormat\", (inst, def) => {\n core.$ZodCustomStringFormat.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n // check for unrecognized format\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodMiniCustomStringFormat, format, regex, params);\n}\nexport const ZodMiniNumber = /*@__PURE__*/ core.$constructor(\"ZodMiniNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function number(params) {\n return core._number(ZodMiniNumber, params);\n}\nexport const ZodMiniNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodMiniNumber.init(inst, def);\n});\n// int\nexport function int(params) {\n return core._int(ZodMiniNumberFormat, params);\n}\n// float32\nexport function float32(params) {\n return core._float32(ZodMiniNumberFormat, params);\n}\n// float64\nexport function float64(params) {\n return core._float64(ZodMiniNumberFormat, params);\n}\n// int32\nexport function int32(params) {\n return core._int32(ZodMiniNumberFormat, params);\n}\n// uint32\nexport function uint32(params) {\n return core._uint32(ZodMiniNumberFormat, params);\n}\nexport const ZodMiniBoolean = /*@__PURE__*/ core.$constructor(\"ZodMiniBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function boolean(params) {\n return core._boolean(ZodMiniBoolean, params);\n}\nexport const ZodMiniBigInt = /*@__PURE__*/ core.$constructor(\"ZodMiniBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function bigint(params) {\n return core._bigint(ZodMiniBigInt, params);\n}\nexport const ZodMiniBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodMiniBigInt.init(inst, def);\n});\n// int64\nexport function int64(params) {\n return core._int64(ZodMiniBigIntFormat, params);\n}\n// uint64\nexport function uint64(params) {\n return core._uint64(ZodMiniBigIntFormat, params);\n}\nexport const ZodMiniSymbol = /*@__PURE__*/ core.$constructor(\"ZodMiniSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function symbol(params) {\n return core._symbol(ZodMiniSymbol, params);\n}\nexport const ZodMiniUndefined = /*@__PURE__*/ core.$constructor(\"ZodMiniUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nfunction _undefined(params) {\n return core._undefined(ZodMiniUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodMiniNull = /*@__PURE__*/ core.$constructor(\"ZodMiniNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nfunction _null(params) {\n return core._null(ZodMiniNull, params);\n}\nexport { _null as null };\nexport const ZodMiniAny = /*@__PURE__*/ core.$constructor(\"ZodMiniAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function any() {\n return core._any(ZodMiniAny);\n}\nexport const ZodMiniUnknown = /*@__PURE__*/ core.$constructor(\"ZodMiniUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function unknown() {\n return core._unknown(ZodMiniUnknown);\n}\nexport const ZodMiniNever = /*@__PURE__*/ core.$constructor(\"ZodMiniNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function never(params) {\n return core._never(ZodMiniNever, params);\n}\nexport const ZodMiniVoid = /*@__PURE__*/ core.$constructor(\"ZodMiniVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nfunction _void(params) {\n return core._void(ZodMiniVoid, params);\n}\nexport { _void as void };\nexport const ZodMiniDate = /*@__PURE__*/ core.$constructor(\"ZodMiniDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function date(params) {\n return core._date(ZodMiniDate, params);\n}\nexport const ZodMiniArray = /*@__PURE__*/ core.$constructor(\"ZodMiniArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function array(element, params) {\n return new ZodMiniArray({\n type: \"array\",\n element: element,\n ...util.normalizeParams(params),\n });\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodMiniObject = /*@__PURE__*/ core.$constructor(\"ZodMiniObject\", (inst, def) => {\n core.$ZodObject.init(inst, def);\n ZodMiniType.init(inst, def);\n util.defineLazy(inst, \"shape\", () => def.shape);\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodMiniObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\n// object methods\nexport function extend(schema, shape) {\n return util.extend(schema, shape);\n}\nexport function safeExtend(schema, shape) {\n return util.safeExtend(schema, shape);\n}\nexport function merge(schema, shape) {\n return util.extend(schema, shape);\n}\nexport function pick(schema, mask) {\n return util.pick(schema, mask);\n}\n// .omit\nexport function omit(schema, mask) {\n return util.omit(schema, mask);\n}\nexport function partial(schema, mask) {\n return util.partial(ZodMiniOptional, schema, mask);\n}\nexport function required(schema, mask) {\n return util.required(ZodMiniNonOptional, schema, mask);\n}\nexport function catchall(inst, catchall) {\n return inst.clone({ ...inst._zod.def, catchall: catchall });\n}\nexport const ZodMiniUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function union(options, params) {\n return new ZodMiniUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniDiscriminatedUnion\", (inst, def) => {\n core.$ZodDiscriminatedUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n return new ZodMiniDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniIntersection = /*@__PURE__*/ core.$constructor(\"ZodMiniIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function intersection(left, right) {\n return new ZodMiniIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodMiniTuple = /*@__PURE__*/ core.$constructor(\"ZodMiniTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodMiniTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniRecord = /*@__PURE__*/ core.$constructor(\"ZodMiniRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function record(keyType, valueType, params) {\n return new ZodMiniRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodMiniRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniMap = /*@__PURE__*/ core.$constructor(\"ZodMiniMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function map(keyType, valueType, params) {\n return new ZodMiniMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSet = /*@__PURE__*/ core.$constructor(\"ZodMiniSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function set(valueType, params) {\n return new ZodMiniSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEnum = /*@__PURE__*/ core.$constructor(\"ZodMiniEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodMiniType.init(inst, def);\n inst.options = Object.values(def.entries);\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function literal(value, params) {\n return new ZodMiniLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniFile = /*@__PURE__*/ core.$constructor(\"ZodMiniFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function file(params) {\n return core._file(ZodMiniFile, params);\n}\nexport const ZodMiniTransform = /*@__PURE__*/ core.$constructor(\"ZodMiniTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function transform(fn) {\n return new ZodMiniTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodMiniOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function optional(innerType) {\n return new ZodMiniOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodMiniNullable = /*@__PURE__*/ core.$constructor(\"ZodMiniNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function nullable(innerType) {\n return new ZodMiniNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodMiniDefault = /*@__PURE__*/ core.$constructor(\"ZodMiniDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function _default(innerType, defaultValue) {\n return new ZodMiniDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniPrefault = /*@__PURE__*/ core.$constructor(\"ZodMiniPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodMiniPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniNonOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function nonoptional(innerType, params) {\n return new ZodMiniNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSuccess = /*@__PURE__*/ core.$constructor(\"ZodMiniSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function success(innerType) {\n return new ZodMiniSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCatch = /*@__PURE__*/ core.$constructor(\"ZodMiniCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nfunction _catch(innerType, catchValue) {\n return new ZodMiniCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodMiniNaN = /*@__PURE__*/ core.$constructor(\"ZodMiniNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function nan(params) {\n return core._nan(ZodMiniNaN, params);\n}\nexport const ZodMiniPipe = /*@__PURE__*/ core.$constructor(\"ZodMiniPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function pipe(in_, out) {\n return new ZodMiniPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n });\n}\nexport const ZodMiniCodec = /*@__PURE__*/ core.$constructor(\"ZodMiniCodec\", (inst, def) => {\n ZodMiniPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodMiniCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodMiniReadonly = /*@__PURE__*/ core.$constructor(\"ZodMiniReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function readonly(innerType) {\n return new ZodMiniReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodMiniTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function templateLiteral(parts, params) {\n return new ZodMiniTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLazy = /*@__PURE__*/ core.$constructor(\"ZodMiniLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// export function lazy<T extends object>(getter: () => T): T {\n// return util.createTransparentProxy<T>(getter);\n// }\nfunction _lazy(getter) {\n return new ZodMiniLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport { _lazy as lazy };\nexport const ZodMiniPromise = /*@__PURE__*/ core.$constructor(\"ZodMiniPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function promise(innerType) {\n return new ZodMiniPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCustom = /*@__PURE__*/ core.$constructor(\"ZodMiniCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// custom checks\nexport function check(fn, params) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// ZodCustom\n// custom schema\nexport function custom(fn, _params) {\n return core._custom(ZodMiniCustom, fn ?? (() => true), _params);\n}\n// refine\nexport function refine(fn, _params = {}) {\n return core._refine(ZodMiniCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// instanceof\nclass Class {\n constructor(..._args) { }\n}\nfunction _instanceof(cls, params = {\n error: `Input not instance of ${cls.name}`,\n}) {\n const inst = custom((data) => data instanceof cls, params);\n inst._zod.bag.Class = cls;\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodMiniCodec,\n Boolean: ZodMiniBoolean,\n String: ZodMiniString,\n}, ...args);\nexport function json() {\n const jsonSchema = _lazy(() => {\n return union([string(), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\nexport const ZodMiniFunction = /*@__PURE__*/ core.$constructor(\"ZodMiniFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodMiniType.init(inst, def);\n});\nexport function _function(params) {\n return new ZodMiniFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\n"],"names":["core.$constructor","core.$ZodType","parse.parse","parse.safeParse","parse.parseAsync","parse.safeParseAsync","core.clone","core.$ZodString","core._string","core.$ZodArray","util.normalizeParams"],"mappings":";;;;;AAGY,MAAC,cAA4BA,6BAAkB,eAAe,CAAC,MAAM,QAAQ;AACrF,MAAI,CAAC,KAAK;AACN,UAAM,IAAI,MAAM,sCAAsC;AAC1DC,WAAc,KAAK,MAAM,GAAG;AAC5B,OAAK,MAAM;AACX,OAAK,OAAO,IAAI;AAChB,OAAK,QAAQ,CAAC,MAAM,WAAWC,MAAY,MAAM,MAAM,QAAQ,EAAE,QAAQ,KAAK,MAAK,CAAE;AACrF,OAAK,YAAY,CAAC,MAAM,WAAWC,UAAgB,MAAM,MAAM,MAAM;AACrE,OAAK,aAAa,OAAO,MAAM,WAAWC,WAAiB,MAAM,MAAM,QAAQ,EAAE,QAAQ,KAAK,WAAU,CAAE;AAC1G,OAAK,iBAAiB,OAAO,MAAM,WAAWC,eAAqB,MAAM,MAAM,MAAM;AACrF,OAAK,QAAQ,IAAI,WAAW;AACxB,WAAO,KAAK;AAAA,MAAM;AAAA,QACd,GAAG;AAAA,QACH,QAAQ;AAAA,UACJ,GAAI,IAAI,UAAU;UAClB,GAAG,OAAO,IAAI,CAAC,OAAO,OAAO,OAAO,aAAa,EAAE,MAAM,EAAE,OAAO,IAAI,KAAK,EAAE,OAAO,SAAQ,GAAI,UAAU,CAAA,EAAE,EAAE,IAAK,EAAE;AAAA,QACrI;AAAA,MACA;AAAA;AAAA,IAEA;AAAA,EACI;AACA,OAAK,QAAQ,CAAC,MAAM,WAAWC,MAAW,MAAM,MAAM,MAAM;AAC5D,OAAK,QAAQ,MAAM;AACnB,OAAK,YAAY,CAAC,KAAK,SAAS;AAC5B,QAAI,IAAI,MAAM,IAAI;AAClB,WAAO;AAAA,EACX;AACJ,CAAC;AACW,MAAC,gBAA8BN,6BAAkB,iBAAiB,CAAC,MAAM,QAAQ;AACzFO,aAAgB,KAAK,MAAM,GAAG;AAC9B,cAAY,KAAK,MAAM,GAAG;AAC9B,CAAC;AACM,SAAS,OAAO,QAAQ;AAC3B,SAAOC,QAAa,aAAqB;AAC7C;AAsSY,MAAC,eAA6BR,6BAAkB,gBAAgB,CAAC,MAAM,QAAQ;AACvFS,YAAe,KAAK,MAAM,GAAG;AAC7B,cAAY,KAAK,MAAM,GAAG;AAC9B,CAAC;AACM,SAAS,MAAM,SAAS,QAAQ;AACnC,SAAO,IAAI,aAAa;AAAA,IACpB,MAAM;AAAA,IACN;AAAA,IACA,GAAGC,gBAA2B;AAAA,EACtC,CAAK;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scalar/agent-chat",
|
|
3
|
+
"description": "Agent chat components",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"author": "Copyright API Documentation Inc. 2026",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"private": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "scalar-build-vite && cp package.json dist",
|
|
13
|
+
"build:watch": "vite build --watch",
|
|
14
|
+
"playground": "cd playground && vite",
|
|
15
|
+
"types:build": "scalar-types-build-vue",
|
|
16
|
+
"types:check": "scalar-types-check-vue"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./*.css": {
|
|
30
|
+
"import": "./dist/*.css",
|
|
31
|
+
"require": "./dist/*.css",
|
|
32
|
+
"default": "./dist/*.css"
|
|
33
|
+
},
|
|
34
|
+
"./css/*.css": {
|
|
35
|
+
"import": "./dist/css/*.css",
|
|
36
|
+
"require": "./dist/css/*.css",
|
|
37
|
+
"default": "./dist/css/*.css"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@ai-sdk/vue": "3.0.33",
|
|
42
|
+
"@scalar-org/css": "workspace:*",
|
|
43
|
+
"@scalar-org/entities": "workspace:*",
|
|
44
|
+
"@scalar/api-client": "catalog:scalar",
|
|
45
|
+
"@scalar/api-reference": "catalog:scalar",
|
|
46
|
+
"@scalar/components": "catalog:scalar",
|
|
47
|
+
"@scalar/helpers": "catalog:scalar",
|
|
48
|
+
"@scalar/icons": "catalog:scalar",
|
|
49
|
+
"@scalar/json-magic": "catalog:scalar",
|
|
50
|
+
"@scalar/openapi-parser": "catalog:scalar",
|
|
51
|
+
"@scalar/openapi-types": "catalog:scalar",
|
|
52
|
+
"@scalar/types": "catalog:scalar",
|
|
53
|
+
"@scalar/workspace-store": "catalog:scalar",
|
|
54
|
+
"ai": "6.0.33",
|
|
55
|
+
"markstream-vue": "catalog:agent",
|
|
56
|
+
"vue": "catalog:*"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@scalar/build-tooling": "catalog:scalar",
|
|
60
|
+
"@vitejs/plugin-vue": "catalog:*",
|
|
61
|
+
"vite": "catalog:*"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ApiReferenceConfiguration } from '@scalar/types';
|
|
2
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
3
|
+
export declare function getDocument(workspaceStore: WorkspaceStore, namespace: string, slug: string, config: Partial<ApiReferenceConfiguration>, registryUrl: string): Promise<import("@scalar/openapi-types").OpenAPI.Document<{}> | undefined>;
|
|
4
|
+
//# sourceMappingURL=get-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-document.d.ts","sourceRoot":"","sources":["../../src/registry/get-document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAEpE,wBAAsB,WAAW,CAC/B,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAC1C,WAAW,EAAE,MAAM,6EAoBpB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { mapConfiguration } from "@scalar/api-reference/helpers";
|
|
2
|
+
import { bundle } from "@scalar/json-magic/bundle";
|
|
3
|
+
import { fetchUrls } from "@scalar/json-magic/bundle/plugins/browser";
|
|
4
|
+
import { dereference, upgrade } from "@scalar/openapi-parser";
|
|
5
|
+
async function getDocument(workspaceStore, namespace, slug, config, registryUrl) {
|
|
6
|
+
const url = new URL(`/@${namespace}/apis/${slug}/latest`, registryUrl);
|
|
7
|
+
const document = await bundle(url.toString(), {
|
|
8
|
+
plugins: [fetchUrls()],
|
|
9
|
+
treeShake: false
|
|
10
|
+
});
|
|
11
|
+
await workspaceStore.addDocument({
|
|
12
|
+
name: "default",
|
|
13
|
+
document,
|
|
14
|
+
config: mapConfiguration(config)
|
|
15
|
+
});
|
|
16
|
+
const { schema } = dereference(upgrade(document).specification);
|
|
17
|
+
workspaceStore.update("x-scalar-active-document", "default");
|
|
18
|
+
return schema;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
getDocument
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=get-document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-document.js","sources":["../../src/registry/get-document.ts"],"sourcesContent":["import { mapConfiguration } from '@scalar/api-reference/helpers'\nimport { bundle } from '@scalar/json-magic/bundle'\nimport { fetchUrls } from '@scalar/json-magic/bundle/plugins/browser'\nimport { dereference, upgrade } from '@scalar/openapi-parser'\nimport type { OpenAPIV3_1 } from '@scalar/openapi-types'\nimport type { ApiReferenceConfiguration } from '@scalar/types'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nexport async function getDocument(\n workspaceStore: WorkspaceStore,\n namespace: string,\n slug: string,\n config: Partial<ApiReferenceConfiguration>,\n registryUrl: string,\n) {\n const url = new URL(`/@${namespace}/apis/${slug}/latest`, registryUrl)\n\n const document: OpenAPIV3_1.Document = await bundle(url.toString(), {\n plugins: [fetchUrls()],\n treeShake: false,\n })\n\n await workspaceStore.addDocument({\n name: 'default',\n document,\n config: mapConfiguration(config),\n })\n\n const { schema } = dereference(upgrade(document).specification)\n\n workspaceStore.update('x-scalar-active-document', 'default')\n\n return schema\n}\n"],"names":[],"mappings":";;;;AAQA,eAAsB,YACpB,gBACA,WACA,MACA,QACA,aACA;AACA,QAAM,MAAM,IAAI,IAAI,KAAK,SAAS,SAAS,IAAI,WAAW,WAAW;AAErE,QAAM,WAAiC,MAAM,OAAO,IAAI,YAAY;AAAA,IAClE,SAAS,CAAC,WAAW;AAAA,IACrB,WAAW;AAAA,EAAA,CACZ;AAED,QAAM,eAAe,YAAY;AAAA,IAC/B,MAAM;AAAA,IACN;AAAA,IACA,QAAQ,iBAAiB,MAAM;AAAA,EAAA,CAChC;AAED,QAAM,EAAE,OAAA,IAAW,YAAY,QAAQ,QAAQ,EAAE,aAAa;AAE9D,iBAAe,OAAO,4BAA4B,SAAS;AAE3D,SAAO;AACT;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Chat } from '@ai-sdk/vue';
|
|
2
|
+
import { type UIDataTypes, type UIMessage } from 'ai';
|
|
3
|
+
import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
|
|
4
|
+
import { type ModalState } from '@scalar/components';
|
|
5
|
+
import type { OpenAPI } from '@scalar/openapi-types';
|
|
6
|
+
import { type ApiReferenceConfigurationRaw } from '@scalar/types';
|
|
7
|
+
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
8
|
+
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
9
|
+
import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme';
|
|
10
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
11
|
+
import { EXECUTE_REQUEST_TOOL_NAME, type ExecuteRequestToolInput, type ExecuteRequestToolOutput, GET_MINI_OPENAPI_SPEC_TOOL_NAME, type GetMiniOpenAPIDocToolInput, type GetMiniOpenAPIDocToolOutput } from '@scalar-org/entities/agent/tools';
|
|
12
|
+
export type Tools = {
|
|
13
|
+
[GET_MINI_OPENAPI_SPEC_TOOL_NAME]: {
|
|
14
|
+
input: GetMiniOpenAPIDocToolInput;
|
|
15
|
+
output: GetMiniOpenAPIDocToolOutput;
|
|
16
|
+
};
|
|
17
|
+
[EXECUTE_REQUEST_TOOL_NAME]: {
|
|
18
|
+
input: ExecuteRequestToolInput;
|
|
19
|
+
output: ExecuteRequestToolOutput;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type State = {
|
|
23
|
+
mode: Ref<'search' | 'agent'>;
|
|
24
|
+
prompt: Ref<string>;
|
|
25
|
+
chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>;
|
|
26
|
+
workspaceStore: WorkspaceStore;
|
|
27
|
+
dereferencedDocument: Ref<OpenAPI.Document | null>;
|
|
28
|
+
loading: ComputedRef<boolean>;
|
|
29
|
+
settingsModal: ModalState;
|
|
30
|
+
securitySchemes: Ref<SecuritySchemeObject[]>;
|
|
31
|
+
activeServer: Ref<ServerObject | undefined>;
|
|
32
|
+
proxyUrl: Ref<string | undefined>;
|
|
33
|
+
eventBus: WorkspaceEventBus;
|
|
34
|
+
config: Ref<ApiReferenceConfigurationRaw>;
|
|
35
|
+
registryUrl: string;
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const STATE_SYMBOL: InjectionKey<State>;
|
|
39
|
+
export declare function createState({ registryUrl, baseUrl, namespace, slug, }: {
|
|
40
|
+
registryUrl: string;
|
|
41
|
+
baseUrl: string;
|
|
42
|
+
namespace: string;
|
|
43
|
+
slug: string;
|
|
44
|
+
}): State;
|
|
45
|
+
export declare function useState(): State;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,IAAI,CAAA;AACX,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAEjB,KAAK,GAAG,EAGT,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,eAAe,CAAA;AACtB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA;AACvG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,+BAA+B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EACjC,MAAM,kCAAkC,CAAA;AAIzC,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,+BAA+B,CAAC,EAAE;QACjC,KAAK,EAAE,0BAA0B,CAAA;QACjC,MAAM,EAAE,2BAA2B,CAAA;KACpC,CAAA;IACD,CAAC,yBAAyB,CAAC,EAAE;QAC3B,KAAK,EAAE,uBAAuB,CAAA;QAC9B,MAAM,EAAE,wBAAwB,CAAA;KACjC,CAAA;CACF,CAAA;AAED,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAA;IAClD,cAAc,EAAE,cAAc,CAAA;IAC9B,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAClD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC7B,aAAa,EAAE,UAAU,CAAA;IACzB,eAAe,EAAE,GAAG,CAAC,oBAAoB,EAAE,CAAC,CAAA;IAC5C,YAAY,EAAE,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,CAAA;IAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACjC,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,MAAM,EAAE,GAAG,CAAC,4BAA4B,CAAC,CAAA;IACzC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,KAAK,CAA0B,CAAA;AAqCvE,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAI,GACL,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,KAAK,CAkER;AAED,wBAAgB,QAAQ,UAKvB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Chat } from "@ai-sdk/vue";
|
|
2
|
+
import { DefaultChatTransport, lastAssistantMessageIsCompleteWithApprovalResponses } from "ai";
|
|
3
|
+
import { ref, computed, watch, inject } from "vue";
|
|
4
|
+
import { useModal } from "@scalar/components";
|
|
5
|
+
import { apiReferenceConfigurationSchema } from "@scalar/types";
|
|
6
|
+
import { createWorkspaceStore } from "@scalar/workspace-store/client";
|
|
7
|
+
import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
|
|
8
|
+
import { getDocument } from "../registry/get-document.js";
|
|
9
|
+
const STATE_SYMBOL = Symbol("STATE_SYMBOL");
|
|
10
|
+
function createChat({
|
|
11
|
+
securitySchemes,
|
|
12
|
+
mode,
|
|
13
|
+
activeServer,
|
|
14
|
+
namespace,
|
|
15
|
+
proxyUrl,
|
|
16
|
+
slug,
|
|
17
|
+
baseUrl
|
|
18
|
+
}) {
|
|
19
|
+
return new Chat({
|
|
20
|
+
sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,
|
|
21
|
+
transport: new DefaultChatTransport({
|
|
22
|
+
api: `${baseUrl}/vector/openapi/chat`,
|
|
23
|
+
body: () => ({
|
|
24
|
+
namespace,
|
|
25
|
+
slug,
|
|
26
|
+
securitySchemes: securitySchemes.value,
|
|
27
|
+
activeServerUrl: activeServer.value?.url,
|
|
28
|
+
mode: mode.value,
|
|
29
|
+
...proxyUrl.value && {
|
|
30
|
+
proxyUrl: proxyUrl.value
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function createState({
|
|
37
|
+
registryUrl,
|
|
38
|
+
baseUrl,
|
|
39
|
+
namespace,
|
|
40
|
+
slug
|
|
41
|
+
}) {
|
|
42
|
+
const mode = ref("search");
|
|
43
|
+
const prompt = ref("");
|
|
44
|
+
const dereferencedDocument = ref(null);
|
|
45
|
+
const securitySchemes = ref([]);
|
|
46
|
+
const activeServer = ref();
|
|
47
|
+
const proxyUrl = ref("https://proxy.scalar.com");
|
|
48
|
+
const eventBus = createWorkspaceEventBus();
|
|
49
|
+
const config = computed(
|
|
50
|
+
() => apiReferenceConfigurationSchema.parse({
|
|
51
|
+
proxyUrl: proxyUrl.value,
|
|
52
|
+
persistAuth: true
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
const workspaceStore = createWorkspaceStore();
|
|
56
|
+
const chat = createChat({
|
|
57
|
+
securitySchemes,
|
|
58
|
+
mode,
|
|
59
|
+
namespace,
|
|
60
|
+
slug,
|
|
61
|
+
activeServer,
|
|
62
|
+
proxyUrl,
|
|
63
|
+
baseUrl
|
|
64
|
+
});
|
|
65
|
+
getDocument(workspaceStore, namespace, slug, config.value, registryUrl).then(
|
|
66
|
+
(schema) => {
|
|
67
|
+
if (schema) dereferencedDocument.value = schema;
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
const loading = computed(
|
|
71
|
+
() => chat.status === "submitted" || chat.status === "streaming" && !chat.lastMessage?.parts.some((part) => part.type === "text")
|
|
72
|
+
);
|
|
73
|
+
watch(
|
|
74
|
+
() => chat.status,
|
|
75
|
+
() => {
|
|
76
|
+
if (chat.status === "streaming") prompt.value = "";
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
const settingsModal = useModal();
|
|
80
|
+
return {
|
|
81
|
+
mode,
|
|
82
|
+
prompt,
|
|
83
|
+
chat,
|
|
84
|
+
workspaceStore,
|
|
85
|
+
dereferencedDocument,
|
|
86
|
+
loading,
|
|
87
|
+
settingsModal,
|
|
88
|
+
securitySchemes,
|
|
89
|
+
activeServer,
|
|
90
|
+
proxyUrl,
|
|
91
|
+
eventBus,
|
|
92
|
+
config,
|
|
93
|
+
registryUrl,
|
|
94
|
+
baseUrl
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function useState() {
|
|
98
|
+
const state = inject(STATE_SYMBOL);
|
|
99
|
+
if (!state) throw new Error("No state provided.");
|
|
100
|
+
return state;
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
STATE_SYMBOL,
|
|
104
|
+
createState,
|
|
105
|
+
useState
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sources":["../../src/state/state.ts"],"sourcesContent":["import { Chat } from '@ai-sdk/vue'\nimport {\n DefaultChatTransport,\n lastAssistantMessageIsCompleteWithApprovalResponses,\n type UIDataTypes,\n type UIMessage,\n} from 'ai'\nimport {\n type ComputedRef,\n computed,\n type InjectionKey,\n inject,\n type Ref,\n ref,\n watch,\n} from 'vue'\n\nimport { type ModalState, useModal } from '@scalar/components'\nimport type { OpenAPI } from '@scalar/openapi-types'\nimport {\n type ApiReferenceConfigurationRaw,\n apiReferenceConfigurationSchema,\n} from '@scalar/types'\nimport {\n createWorkspaceStore,\n type WorkspaceStore,\n} from '@scalar/workspace-store/client'\nimport {\n createWorkspaceEventBus,\n type WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server'\nimport {\n EXECUTE_REQUEST_TOOL_NAME,\n type ExecuteRequestToolInput,\n type ExecuteRequestToolOutput,\n GET_MINI_OPENAPI_SPEC_TOOL_NAME,\n type GetMiniOpenAPIDocToolInput,\n type GetMiniOpenAPIDocToolOutput,\n} from '@scalar-org/entities/agent/tools'\n\nimport { getDocument } from '@/registry/get-document'\n\nexport type Tools = {\n [GET_MINI_OPENAPI_SPEC_TOOL_NAME]: {\n input: GetMiniOpenAPIDocToolInput\n output: GetMiniOpenAPIDocToolOutput\n }\n [EXECUTE_REQUEST_TOOL_NAME]: {\n input: ExecuteRequestToolInput\n output: ExecuteRequestToolOutput\n }\n}\n\ntype State = {\n mode: Ref<'search' | 'agent'>\n prompt: Ref<string>\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n workspaceStore: WorkspaceStore\n dereferencedDocument: Ref<OpenAPI.Document | null>\n loading: ComputedRef<boolean>\n settingsModal: ModalState\n securitySchemes: Ref<SecuritySchemeObject[]>\n activeServer: Ref<ServerObject | undefined>\n proxyUrl: Ref<string | undefined>\n eventBus: WorkspaceEventBus\n config: Ref<ApiReferenceConfigurationRaw>\n registryUrl: string\n baseUrl: string\n}\n\nexport const STATE_SYMBOL: InjectionKey<State> = Symbol('STATE_SYMBOL')\n\nfunction createChat({\n securitySchemes,\n mode,\n activeServer,\n namespace,\n proxyUrl,\n slug,\n baseUrl,\n}: {\n securitySchemes: State['securitySchemes']\n mode: State['mode']\n activeServer: State['activeServer']\n proxyUrl: State['proxyUrl']\n namespace: string\n slug: string\n baseUrl: string\n}) {\n return new Chat<UIMessage<unknown, UIDataTypes, Tools>>({\n sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses,\n transport: new DefaultChatTransport({\n api: `${baseUrl}/vector/openapi/chat`,\n body: () => ({\n namespace,\n slug,\n securitySchemes: securitySchemes.value,\n activeServerUrl: activeServer.value?.url,\n mode: mode.value,\n ...(proxyUrl.value && {\n proxyUrl: proxyUrl.value,\n }),\n }),\n }),\n })\n}\n\nexport function createState({\n registryUrl,\n baseUrl,\n namespace,\n slug,\n}: {\n registryUrl: string\n baseUrl: string\n namespace: string\n slug: string\n}): State {\n const mode = ref<State['mode']['value']>('search')\n const prompt = ref<State['prompt']['value']>('')\n const dereferencedDocument = ref<OpenAPI.Document | null>(null)\n const securitySchemes = ref<State['securitySchemes']['value']>([])\n const activeServer = ref<State['activeServer']['value']>()\n const proxyUrl = ref<State['proxyUrl']['value']>('https://proxy.scalar.com')\n const eventBus = createWorkspaceEventBus()\n\n const config = computed(() =>\n apiReferenceConfigurationSchema.parse({\n proxyUrl: proxyUrl.value,\n persistAuth: true,\n }),\n )\n\n const workspaceStore = createWorkspaceStore()\n\n const chat = createChat({\n securitySchemes,\n mode,\n namespace,\n slug,\n activeServer,\n proxyUrl,\n baseUrl,\n })\n\n getDocument(workspaceStore, namespace, slug, config.value, registryUrl).then(\n (schema) => {\n if (schema) dereferencedDocument.value = schema\n },\n )\n\n const loading = computed(\n () =>\n chat.status === 'submitted' ||\n (chat.status === 'streaming' &&\n !chat.lastMessage?.parts.some((part) => part.type === 'text')),\n )\n\n watch(\n () => chat.status,\n () => {\n if (chat.status === 'streaming') prompt.value = ''\n },\n )\n\n const settingsModal = useModal()\n\n return {\n mode,\n prompt,\n chat,\n workspaceStore,\n dereferencedDocument,\n loading,\n settingsModal,\n securitySchemes,\n activeServer,\n proxyUrl,\n eventBus,\n config,\n registryUrl,\n baseUrl,\n }\n}\n\nexport function useState() {\n const state = inject(STATE_SYMBOL)\n if (!state) throw new Error('No state provided.')\n\n return state\n}\n"],"names":[],"mappings":";;;;;;;;AAwEO,MAAM,eAAoC,OAAO,cAAc;AAEtE,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQG;AACD,SAAO,IAAI,KAA6C;AAAA,IACtD,uBAAuB;AAAA,IACvB,WAAW,IAAI,qBAAqB;AAAA,MAClC,KAAK,GAAG,OAAO;AAAA,MACf,MAAM,OAAO;AAAA,QACX;AAAA,QACA;AAAA,QACA,iBAAiB,gBAAgB;AAAA,QACjC,iBAAiB,aAAa,OAAO;AAAA,QACrC,MAAM,KAAK;AAAA,QACX,GAAI,SAAS,SAAS;AAAA,UACpB,UAAU,SAAS;AAAA,QAAA;AAAA,MACrB;AAAA,IACF,CACD;AAAA,EAAA,CACF;AACH;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKU;AACR,QAAM,OAAO,IAA4B,QAAQ;AACjD,QAAM,SAAS,IAA8B,EAAE;AAC/C,QAAM,uBAAuB,IAA6B,IAAI;AAC9D,QAAM,kBAAkB,IAAuC,EAAE;AACjE,QAAM,eAAe,IAAA;AACrB,QAAM,WAAW,IAAgC,0BAA0B;AAC3E,QAAM,WAAW,wBAAA;AAEjB,QAAM,SAAS;AAAA,IAAS,MACtB,gCAAgC,MAAM;AAAA,MACpC,UAAU,SAAS;AAAA,MACnB,aAAa;AAAA,IAAA,CACd;AAAA,EAAA;AAGH,QAAM,iBAAiB,qBAAA;AAEvB,QAAM,OAAO,WAAW;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,cAAY,gBAAgB,WAAW,MAAM,OAAO,OAAO,WAAW,EAAE;AAAA,IACtE,CAAC,WAAW;AACV,UAAI,6BAA6B,QAAQ;AAAA,IAC3C;AAAA,EAAA;AAGF,QAAM,UAAU;AAAA,IACd,MACE,KAAK,WAAW,eACf,KAAK,WAAW,eACf,CAAC,KAAK,aAAa,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,MAAM;AAAA,EAAA;AAGlE;AAAA,IACE,MAAM,KAAK;AAAA,IACX,MAAM;AACJ,UAAI,KAAK,WAAW,YAAa,QAAO,QAAQ;AAAA,IAClD;AAAA,EAAA;AAGF,QAAM,gBAAgB,SAAA;AAEtB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;AAEO,SAAS,WAAW;AACzB,QAAM,QAAQ,OAAO,YAAY;AACjC,MAAI,CAAC,MAAO,OAAM,IAAI,MAAM,oBAAoB;AAEhD,SAAO;AACT;"}
|