Did someone (like literally just this minute) change how generation works, so there is no .onFinishPromise
any more? I’ve fixed my code but that was sudden 😂
Maybe for backwards compatibility there could be a property called that pointing to the same promise?
Ah I see, the returned object is the promise now, and can be used whether the input was a string or an object.
@Alllo@lemmy.world Very very sorry - a tangentially related bug that I accidentally introduced during this plugin upgrade broke your /beautiful-people gen for the past few hours 😓 in case you get feedback and are confused that it’s working for you, you know why now
thank you!
Sorry!! Yes, I just noticed this a couple of minutes ago and fixed it. It was due to a change ~10 minutes ago that now allows for writing
let result = await textToImage(promptOptions);
- i.e. it now returns theonFinishPromise
, while staying backwards-compatible by overwriting thetoString
of the promise to return the normal iframe HTML. The problem was that I forgot to addonFinishPromise
as a property on the returned Promise (i.e. referencing itself) to maintain backwards-compat.Also, side note: I did this for the ai-image-plugin several weeks ago, so you can write also
let result = await aiText(promptOptions)
instead oflet result = await aiText(promptOptions).onFinishPromise
with that plugin too.Maybe for backwards compatibility there could be a property called that pointing to the same promise?
If there’s ever a backwards-incompatibility, it’s ALWAYS a bug. I cannot stress this enough. I take backwards compatibility really seriously. If I’m ever the cause of your code breaking, that’s my fault, not yours, and it should be reported as a bug.
Thanks for the report!
Ah cool. No problem 👍