@builder.io/ai-utils 0.0.54 → 0.0.56

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.
@@ -50,6 +50,10 @@ export interface Snippet {
50
50
  }
51
51
  interface IframeSettings extends Partial<AssistantSettings> {
52
52
  local?: boolean;
53
+ /**
54
+ * The URL of the assistant.
55
+ */
56
+ baseUrl?: string;
53
57
  }
54
58
  export declare function getAssistantUrl(opts?: IframeSettings): string;
55
59
  export declare function parseAssistantUrlSettings(url: string): Partial<AssistantSettings>;
package/dist/settings.js CHANGED
@@ -15,7 +15,8 @@ const urlParamSettings = [
15
15
  "viewId",
16
16
  ];
17
17
  export function getAssistantUrl(opts = {}) {
18
- const url = new URL(opts.local ? "http://localhost:7242" : "https://assistant.builder.io");
18
+ var _a;
19
+ const url = new URL((_a = opts.baseUrl) !== null && _a !== void 0 ? _a : (opts.local ? "http://localhost:7242" : "https://assistant.builder.io"));
19
20
  urlParamSettings.forEach((key) => {
20
21
  const value = opts[key];
21
22
  if (typeof value === "string" || typeof value === "boolean") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",