Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Screenshot Capture and Management Features to Chat and Workbench Components #582

Merged
merged 11 commits into from
Dec 14, 2024

Conversation

emcconnell
Copy link
Collaborator

@emcconnell emcconnell commented Dec 7, 2024

This pull request introduces a new feature that allows users to take screenshots within the chat and workbench components. The most important changes include adding the ScreenshotStateManager and ScreenshotSelector components, and updating the BaseChat and Preview components to integrate these new functionalities.

New Components:

Integration with Existing Components:

Longer video, but the shorter one below is prob. enough to get the idea: https://www.youtube.com/watch?v=cJsZVsswWnI

Untitled.video.6.mp4

@thecodacus
Copy link
Collaborator

this is so cool

@Stijnus
Copy link
Collaborator

Stijnus commented Dec 7, 2024

Nice job , i was also working on this a few days back. Just tested the code and looks good, i will test some more in a couple of days if work let me... Keep you posted.

Anyway great job :)

@VersaceXcodes
Copy link

instead of manual, can it be done in the code? like it auto takes screenshot of preview instead from users side ?

@emcconnell
Copy link
Collaborator Author

instead of manual, can it be done in the code? like it auto takes screenshot of preview instead from users side ?

@VersaceXcodes it could be if you wanted the system to check a result, automated, or something similar. The purpose of this feature, though, is to target a specific area of the app being built visually to augment the prompt. If you haven't watched the longer linked YouTube video maybe check that out. Thanks for the input though!

@emcconnell
Copy link
Collaborator Author

I just merged main so this can go. New video with main merged below. If we like the feature, can I get an official thumbs up and I or anyone can merge it ;) If any issue, let me know. Thanks!

@coleam00 @thecodacus @wonderwhy-er

Untitled.video.8.mp4

@dustinwloring1988
Copy link
Collaborator

@emcconnell looks nice and integrates well. Saving a few steps from using the snipping tool

@emcconnell emcconnell merged commit 4f10fb1 into stackblitz-labs:main Dec 14, 2024
2 checks passed
@wonderwhy-er
Copy link
Collaborator

Hm, I wonder if it would have been easier to send it html/css instead of image.
Should be easier for it to understand(may be, especially if there are IDs) and cheaper in tokens than sending a screenshot.
But sometimes screenshot is better.

@thecodacus
Copy link
Collaborator

Hm, I wonder if it would have been easier to send it html/css instead of image. Should be easier for it to understand(may be, especially if there are IDs) and cheaper in tokens than sending a screenshot. But sometimes screenshot is better.

maybe we can have variation for this, like inspect mode in chrome. which will get the html and sent it instead of image

@emcconnell
Copy link
Collaborator Author

@wonderwhy-er @thecodacus

I like the idea of also having an inspect feature to add targeted context and did think about it. I went with the image clip b/c it seemed more intuitive for a non-developer to use, and for now image might hit more use cases. I am still interested in dev tool inspect. I am also generally interested in the area of functional UI/UX with the product. I've been thinking of various ideas in this vein.

JJ-Dynamite pushed a commit to val-x/valenClient that referenced this pull request Jan 29, 2025
Add Screenshot Capture and Management Features to Chat and Workbench Components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants