Hello Dust community 👋
I am currently exploring building a Figma plugin using the Dust Javascript SDK, to be able to interact with our company agents directly within Figma
So far I've been making good progress, retrieving the agents in the workspace, and creating conversations etc ...
I now would like to add attachements to the messages I send to the API, to have a similar behavior as the Dust chrome extension, where you can add the text layers of the Figma selection, or a screenshot of it. But I don't see in the API documentation how I can attach files to the message I send. For the text layers, I could append them to the user input as it's a string, but for the screenshot I'm not sure... Is there a proper way to achieve that, that I'm not aware of?
Maybe Remi you have some ideas?
Really cool exploration Lilian Desvaux! Impressive 👏 I'll share the thread with the team to see if someone could help you here.
Remi thanks! For more infos: I tried to append the image to the user input in base64, but the AI doesn't seem to recognise it as an image, and I'm not getting any coherent answer
I succeeded to attach text layers and images using contentFragments 🙌
I am now struggling however to stream the AI answer correctly to the UI ... I believe my backend is feeding the stream correctly as the streamed answer seems to be similar as the agent message I fetch from the conversation. However, the content read from the stream on the frontend doesn't to be matching perfectly. Notice how I'm loosing some characters here and there. I'm not sure what is creating these artefacts as my reader is quite simple (and similar to what I saw you were doing). Is this a known issue that you encountered before? Is there a simple way to fix it? Thanks for your help!
Remi Adrien (Dust) Daphné Would there be any possibilities to organise a session with someone in your team to check this out? 👀
