stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

1h 57m 58s logged

Devlog #6: Photo upload for the components + copy code button!

Hey there! Following up on what I said in the last devlog, what I did today what add a way to uplaod a photo of your components drawer instead of typing each componetn manually. There’s nwo an “or” and an “upload image” button right next to the components field, so the user can pick whichever way is more convenient for them. I used base64 to then encode the image and send it to the AI along with the rest of the prompt, along with some extra instructions.

When an image is picked, the components field just shows “Image uploaded” so the user can tell the AI will be looking at the photo instead of reading from the entry field, plus I added a red X button next to the upload button so the user can cancel it to pick another image or use txet instead. Other than that, I also added a “Copy code” button to the build guide’s code section, so you don’t have to manually select text out of the text box anymore to copy it.

Later, I found out that command=self._copy_code(code) doesn’t work the way it looks like it would, since the parentheses call the function immediately instead of waiting for a the button to be cliced. To solve that, I wrapped it in a lambda function so it only runs when the button’s actually pressed. I used AI to create the new prompt for the image upload and also to help me understand some errors the terminal was showing. That’s for now, see you on the next devlog!

0
9

Comments 0

No comments yet. Be the first!