@mablhq/mabl-cli 2.79.1 → 2.79.9

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.
@@ -1257,25 +1257,25 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
1257
1257
  throw toApiError(`Failed to generate element description`, error);
1258
1258
  }
1259
1259
  }
1260
- async findElementImage(screenshot, findPrompt, workspaceId, context) {
1260
+ async findElementImage(screenshot, findPrompt, workspaceId, includeElementImage, context) {
1261
1261
  try {
1262
- const { bounding_box: boundingBox, found } = await this.makePostRequest(`${this.baseApiAgentUrl}/agent/find/findElementImage?workspaceId=${workspaceId}`, {
1262
+ const response = await this.makePostRequest(`${this.baseApiAgentUrl}/agent/find/findElementImage?workspaceId=${workspaceId}`, {
1263
1263
  screenshot,
1264
1264
  description: findPrompt,
1265
1265
  context,
1266
+ include_element_image: includeElementImage,
1266
1267
  });
1267
- if (!found) {
1268
+ if (!response.found) {
1268
1269
  return undefined;
1269
1270
  }
1270
- if (boundingBox?.x === undefined ||
1271
- boundingBox.y === undefined ||
1272
- boundingBox.width === undefined ||
1273
- boundingBox.height === undefined) {
1274
- console.debug(`Incomplete bounding box for ${findPrompt}:`, boundingBox);
1271
+ if (response.bounding_box?.x === undefined ||
1272
+ response.bounding_box?.y === undefined ||
1273
+ response.bounding_box?.width === undefined ||
1274
+ response.bounding_box?.height === undefined) {
1275
+ console.debug(`Incomplete bounding box for ${findPrompt}:`, response.bounding_box);
1275
1276
  return undefined;
1276
1277
  }
1277
- const { x, y, width, height } = boundingBox;
1278
- return { x, y, width, height };
1278
+ return response;
1279
1279
  }
1280
1280
  catch (error) {
1281
1281
  throw toApiError(`Failed to find element image ${findPrompt}`, error);