chore(cli): save screenshots to tmp dir when no path provided #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Reverts the base64 stdout behavior from #83 and instead saves screenshots to a temp directory when no path is provided.
Problem
agent-browser screenshotoutputting base64 to stdout is not useful for agentic use cases, it's a massive blob of unreadable text that causes context rot.Agents will figure out in the next step to give a filename anyway or pipe it into a file.
Solution
When no path is provided, screenshots now save to
~/.agent-browser/tmp/screenshots/with a generated filename and return the path:Changes
src/actions.ts: Generate temp path when no path providedsrc/daemon.ts: ExtractgetAppDir()fromgetSocketDir()for cleaner semanticscli/src/output.rs: Remove base64 stdout handling, update help text