@wix/vibe-bookings-plugin 0.34.0 → 0.36.0
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.cjs +10 -5
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4454,7 +4454,10 @@ var LLMService = class {
|
|
|
4454
4454
|
this.logger.debug("generating image", { basePrompt, options });
|
|
4455
4455
|
const imageUrl = await this.env.generateImage(basePrompt, options);
|
|
4456
4456
|
this.logger.debug("generated image", { imageUrl });
|
|
4457
|
-
const
|
|
4457
|
+
const relativeImageUrl = imageUrl.split("https://static.wixstatic.com/media/")[1];
|
|
4458
|
+
const [imageFileName, imageDimensions] = relativeImageUrl?.split("?") ?? [];
|
|
4459
|
+
this.logger.debug("parsed image file name", { imageFileName });
|
|
4460
|
+
this.logger.debug("parsed image dimensions", { imageDimensions });
|
|
4458
4461
|
if (!imageFileName) {
|
|
4459
4462
|
this.logger.warn(
|
|
4460
4463
|
"Unexpected image URL format, could not extract imageId",
|
|
@@ -4463,8 +4466,10 @@ var LLMService = class {
|
|
|
4463
4466
|
}
|
|
4464
4467
|
);
|
|
4465
4468
|
}
|
|
4469
|
+
const imageId = imageFileName ? `wix:image://v1/${imageFileName}/${imageFileName}#${imageDimensions}` : void 0;
|
|
4470
|
+
this.logger.debug("parsed image", { imageId, imageUrl });
|
|
4466
4471
|
return {
|
|
4467
|
-
|
|
4472
|
+
imageId,
|
|
4468
4473
|
imageUrl
|
|
4469
4474
|
};
|
|
4470
4475
|
}
|
|
@@ -12405,10 +12410,10 @@ function mapBookingServiceDetailsToServerService(details) {
|
|
|
12405
12410
|
}
|
|
12406
12411
|
}
|
|
12407
12412
|
],
|
|
12408
|
-
...details.
|
|
12413
|
+
...details.image && {
|
|
12409
12414
|
media: {
|
|
12410
12415
|
mainMedia: {
|
|
12411
|
-
image: details.
|
|
12416
|
+
image: details.image,
|
|
12412
12417
|
altText: details.name
|
|
12413
12418
|
}
|
|
12414
12419
|
}
|
|
@@ -13652,7 +13657,7 @@ var ContentInjectionService = class {
|
|
|
13652
13657
|
const imageResponse = await this.generateServiceImage(service);
|
|
13653
13658
|
return {
|
|
13654
13659
|
...service,
|
|
13655
|
-
|
|
13660
|
+
image: imageResponse.imageId ?? imageResponse.imageUrl
|
|
13656
13661
|
};
|
|
13657
13662
|
} catch (error) {
|
|
13658
13663
|
this.logger.warn("Failed to generate image for service", {
|