@xyd-js/ask-ai-widget 0.0.0-build-be800ef-20251021211339 → 0.0.0-build-a1d398e-20251028174055
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/server-standalone.js +7 -7
- package/dist/server.js +86615 -45570
- package/dist/widget.js +41 -41
- package/package.json +3 -3
- package/server.ts +9 -7
- package/src/Widget.tsx +3 -1
- package/src/index.ts +2 -2
- package/src/settings.ts +3 -3
- package/src/utils.ts +4 -4
- package/widget.tsx +6 -0
|
@@ -22668,8 +22668,8 @@ var require_get_vercel_oidc_token = __commonJS((exports, module) => {
|
|
|
22668
22668
|
}
|
|
22669
22669
|
try {
|
|
22670
22670
|
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
|
|
22671
|
-
await Promise.resolve().then(() => __toESM(require_token_util()
|
|
22672
|
-
await Promise.resolve().then(() => __toESM(require_token()
|
|
22671
|
+
await Promise.resolve().then(() => __toESM(require_token_util())),
|
|
22672
|
+
await Promise.resolve().then(() => __toESM(require_token()))
|
|
22673
22673
|
]);
|
|
22674
22674
|
if (!token || isExpired(getTokenPayload(token))) {
|
|
22675
22675
|
await refreshToken();
|
|
@@ -57608,7 +57608,7 @@ async function startServer(settings, mcpServer) {
|
|
|
57608
57608
|
headers: new Headers(req.headers),
|
|
57609
57609
|
body
|
|
57610
57610
|
});
|
|
57611
|
-
let mcpUrl = settings.mcp?.url || "";
|
|
57611
|
+
let mcpUrl = settings.mcp?.url || request.url + "/mcp";
|
|
57612
57612
|
if (Array.isArray(mcpUrl)) {
|
|
57613
57613
|
console.warn("MCP as array is not supported, using the first one");
|
|
57614
57614
|
mcpUrl = mcpUrl[0];
|
|
@@ -57792,16 +57792,16 @@ function ensureSettings(settings) {
|
|
|
57792
57792
|
if (!settings.sources) {
|
|
57793
57793
|
settings.sources = {
|
|
57794
57794
|
openapi: "",
|
|
57795
|
-
|
|
57795
|
+
llmsTxt: ""
|
|
57796
57796
|
};
|
|
57797
57797
|
}
|
|
57798
57798
|
if (process.env.OPENAPI_SOURCE) {
|
|
57799
57799
|
settings.sources.openapi = process.env.OPENAPI_SOURCE;
|
|
57800
57800
|
console.log("(env settings): using OPENAPI_SOURCE");
|
|
57801
57801
|
}
|
|
57802
|
-
if (process.env.
|
|
57803
|
-
settings.sources.
|
|
57804
|
-
console.log("(env settings): using
|
|
57802
|
+
if (process.env.LLMS_TXT_SOURCE) {
|
|
57803
|
+
settings.sources.llmsTxt = process.env.LLMS_TXT_SOURCE;
|
|
57804
|
+
console.log("(env settings): using LLMS_TXT_SOURCE");
|
|
57805
57805
|
}
|
|
57806
57806
|
if (process.env.MCP_URL) {
|
|
57807
57807
|
settings.mcp.url = process.env.MCP_URL;
|