@mastra/client-js 1.32.0-alpha.7 → 1.32.0-alpha.8

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/index.js CHANGED
@@ -6218,9 +6218,17 @@ var AgentControllerSession = class extends BaseResource {
6218
6218
  }
6219
6219
  };
6220
6220
  }
6221
- /** Send a user message. The reply streams over `subscribe()`. */
6221
+ /**
6222
+ * Send a user message. The reply streams over `subscribe()`.
6223
+ * Pass a structured message to attach files (e.g. pasted images) as base64-encoded data:
6224
+ * `sendMessage({ content: 'What is in this image?', files })`.
6225
+ */
6222
6226
  async sendMessage(message) {
6223
- await this.request(this.url(`${this.base()}/messages`), { method: "POST", body: { message } });
6227
+ const { content, files } = typeof message === "string" ? { content: message, files: void 0 } : message;
6228
+ await this.request(this.url(`${this.base()}/messages`), {
6229
+ method: "POST",
6230
+ body: { message: content, ...files?.length ? { files } : {} }
6231
+ });
6224
6232
  }
6225
6233
  /** Abort the in-flight run for this session. */
6226
6234
  async abort() {