Skip to content

feat(cloud-agent): add cloud prompt builder and file persistence#1515

Closed
tatoalo wants to merge 1 commit intochore/cloud-agent/shared-utilsfrom
ph-ai/feat/cloud-agent/cloud-prompt-builder
Closed

feat(cloud-agent): add cloud prompt builder and file persistence#1515
tatoalo wants to merge 1 commit intochore/cloud-agent/shared-utilsfrom
ph-ai/feat/cloud-agent/cloud-prompt-builder

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 7, 2026

Problem

Cloud tasks need to embed local file attachments (text + images) as ACP ContentBlocks for the agent server.

Changes

  • Add cloud-prompt.ts: builds ACP ContentBlock arrays from user prompts with file tags, handles text truncation (100K chars) and image size limits (5MB), supported format detection
  • Add persistFile.ts: shared browser file persistence with chunked base64 encoding (replacing O(N^2) btoa(reduce) pattern)
  • Add os.ts: selectFiles tRPC procedure (native Electron file picker), createClipboardTempFilePath helper to preserve original filenames via mkdtemp

Stack: 2/4 — depends on #1514

@tatoalo tatoalo force-pushed the chore/cloud-agent/shared-utils branch from 1b4f42d to 8cf24ad Compare April 7, 2026 14:22
@tatoalo tatoalo force-pushed the ph-ai/feat/cloud-agent/cloud-prompt-builder branch from 318bbe7 to 13b9713 Compare April 7, 2026 14:22
Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 7, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tatoalo
Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 7, 2026

Recreating with clean branch names

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.

1 participant