Skip to content

simplify screen cap#43

Merged
jph00 merged 3 commits intomainfrom
capture
Nov 11, 2025
Merged

simplify screen cap#43
jph00 merged 3 commits intomainfrom
capture

Conversation

@ncoop57
Copy link
Copy Markdown
Contributor

@ncoop57 ncoop57 commented Nov 11, 2025

This PR simplifies the experimental screen capture feature and dialogue helper. It also updates it to use the expected lisette data type for tool responses. Here is a demo of it in action:

screenrecording-2025-11-10_21-10-44.mp4

Requires this PR to be merged: https://github.com/AnswerDotAI/solveit/pull/1103

@ncoop57 ncoop57 requested a review from jph00 November 11, 2025 02:16
iife(f"pushData('{idx}', {{img_data: await getScreenshot()}});")
time.sleep(0.5)
d = dict2obj(xpost('http://localhost:5001/pop_data_blocking_', data={'data_id': idx}).json())
if 'img_data' in d: return ToolResponse([{'type': 'image_url', 'image_url': d.img_data}])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing something, but in lisette ToolResponse is

class ToolResponse:
    content: list[str,str]

Here it seems to be getting a list of dicts? (BTW I rather dislike dataclasses so if there's an option to just make it a normal class that would be nice!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I messed up the type in lisette. It is supposed to be a list of dicts. and yeah I agree I also dislike dataclasses. When I have time, I'll see if we can move it to a regular class

@jph00
Copy link
Copy Markdown
Contributor

jph00 commented Nov 11, 2025

Very nice! BTW when you rely on a updated other lib like lisette here, you should add the current version of that in github as a dep in settings.ini, since when we release that will be what's used. Also put it in big bold letters in the PR so I don't miss it! :) (I've added it now.)

@jph00 jph00 merged commit e5ee4f7 into main Nov 11, 2025
@jph00 jph00 added the enhancement New feature or request label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants