@builder.io/ai-utils 0.0.71 → 0.0.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/messages.d.ts CHANGED
@@ -115,7 +115,14 @@ export interface AssistantActionMessage {
115
115
  export type Message = SystemMessage | UserMessage | AssistantMessage;
116
116
  export type GeneratingMessage = null | Partial<AssistantActionMessage | AssistantMessage>;
117
117
  export declare function getContentText(message: string | ContentMessage): string;
118
- export type Attachment = Template;
118
+ export type Attachment = FileUpload | Template;
119
+ export interface FileUpload {
120
+ type: string;
121
+ name: string;
122
+ dataUrl: string;
123
+ size: number;
124
+ id: number;
125
+ }
119
126
  export interface Template {
120
127
  type: "template";
121
128
  name: string;
package/src/settings.js CHANGED
@@ -7,8 +7,8 @@ const urlParamSettings = [
7
7
  "viewId",
8
8
  ];
9
9
  export function getAssistantUrl(opts = {}) {
10
- const url = new URL(opts.baseUrl ??
11
- (opts.local ? "http://localhost:7242" : "https://assistant.builder.io"));
10
+ var _a;
11
+ const url = new URL((_a = opts.baseUrl) !== null && _a !== void 0 ? _a : (opts.local ? "http://localhost:7242" : "https://assistant.builder.io"));
12
12
  urlParamSettings.forEach((key) => {
13
13
  const value = opts[key];
14
14
  if (typeof value === "string" || typeof value === "boolean") {