feat(aio): add screenshot attachments to sandbox conversations - #40
Open
lordspline wants to merge 2 commits into
Open
feat(aio): add screenshot attachments to sandbox conversations#40lordspline wants to merge 2 commits into
lordspline wants to merge 2 commits into
Conversation
🦔 Hogbox preview · ❌ build failedThe preview didn't come up for commit Previews are optional and never block merging. A failure here is often a hogland or tailnet hiccup rather than anything in your PR, so the check stays green and this comment is the status. |
🤖 CI report❌ Docs preview — preview build failed to startThe docs preview build could not be triggered. View the workflow logs for details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
| attachments=data["attachments"], | ||
| ) | ||
| except AttachmentValidationError as error: | ||
| raise ValidationError(str(error)) from error |
| except AttachmentValidationError as error: | ||
| raise ValidationError(str(error)) from error | ||
| except AttachmentStorageError as error: | ||
| raise ValidationError(str(error)) from error |
| attachment_id=str(data["attachment_id"]), | ||
| ) | ||
| except AttachmentNotFoundError as error: | ||
| raise NotFound(str(error)) from error |
| except AttachmentNotFoundError as error: | ||
| raise NotFound(str(error)) from error | ||
| except AttachmentValidationError as error: | ||
| raise ValidationError(str(error)) from error |
| except AttachmentValidationError as error: | ||
| raise ValidationError(str(error)) from error | ||
| except AttachmentStorageError as error: | ||
| raise ValidationError(str(error)) from error |
| attachment_ids=attachment_ids, | ||
| ) | ||
| except (AttachmentNotFoundError, AttachmentValidationError) as error: | ||
| raise exceptions.ValidationError(str(error)) from error |
| attachment_ids=attachment_ids, | ||
| ) | ||
| except (AttachmentNotFoundError, AttachmentValidationError) as error: | ||
| raise exceptions.ValidationError(str(error)) from error |
| attachment_ids=attachment_ids, | ||
| ) | ||
| except (AttachmentNotFoundError, AttachmentValidationError) as error: | ||
| raise exceptions.ValidationError(str(error)) from error |
| attachment_ids=attachment_ids, | ||
| ) | ||
| except (AttachmentNotFoundError, AttachmentValidationError) as error: | ||
| raise exceptions.ValidationError(str(error)) from error |
| attachment_ids=attachment_ids, | ||
| ) | ||
| except (AttachmentNotFoundError, AttachmentValidationError) as error: | ||
| raise exceptions.ValidationError(str(error)) from error |
| Object.defineProperty(URL, 'revokeObjectURL', { configurable: true, value: jest.fn() }) | ||
| const baseFetch = global.fetch.bind(global) | ||
| global.fetch = jest.fn((input: RequestInfo | URL, init?: RequestInit) => { | ||
| if (typeof input === 'string' && input.startsWith('https://upload.test')) { |
| Object.defineProperty(URL, 'revokeObjectURL', { configurable: true, value: jest.fn() }) | ||
| const baseFetch = global.fetch.bind(global) | ||
| global.fetch = jest.fn((input: RequestInfo | URL, init?: RequestInit) => { | ||
| if (typeof input === 'string' && input.startsWith('https://upload.test')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
People using PostHog AI sandbox conversations cannot attach screenshots, so the agent cannot inspect visual context with a prompt.
Closes PostHog#62926.
🪄 Changes
Before:
flowchart LR A[Composer] -->|text| B[Sandbox agent] style A fill:#e8d5ff,stroke:#6b21a8,color:#111 style B fill:#fde68a,stroke:#92400e,color:#111After:
flowchart LR A[Composer] -->|signed upload| B[Staging storage] B --> C[Validation and normalization] C -->|opaque attachment IDs| D[Task artifact manifest] D --> E[Sandbox agent] style A fill:#e8d5ff,stroke:#6b21a8,color:#111 style B fill:#bae6fd,stroke:#0369a1,color:#111 style C fill:#bbf7d0,stroke:#166534,color:#111 style D fill:#fde68a,stroke:#92400e,color:#111 style E fill:#fecaca,stroke:#991b1b,color:#111🧪 How did you test this code?
✅ Checklist
🤖 Agent context
Capy implementation details
/improving-drf-endpoints,/adopting-generated-api-types,/writing-ui-components,/writing-tests,/writing-user-facing-copy,/writing-code-comments,/security-audit, and/writing-pr-descriptions.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.