Skip to content

chore(cloud-agent): extract shared utilities for cloud attachments#1514

Open
tatoalo wants to merge 1 commit intomainfrom
chore/cloud-agent/shared-utils
Open

chore(cloud-agent): extract shared utilities for cloud attachments#1514
tatoalo wants to merge 1 commit intomainfrom
chore/cloud-agent/shared-utils

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 7, 2026

ph_code_cloud_attachments.mp4 (uploaded via Graphite)

Problem

Cloud attachments feature needs shared utilities across multiple modules

Changes

  • Extract escapeXmlAttr/unescapeXmlAttr into xml.ts (was duplicated in 3 files)
  • Extract getFileName/getFileExtension
  • Extract extractPromptDisplayContent, makeAttachmentUri, parseAttachmentUri
  • Move cloud prompt codec (serializeCloudPrompt, deserializeCloudPrompt) into @posthog/shared
  • Fix mid-file import in content.ts

How did you test this?

Unit tests for cloud prompt codec and prompt content extraction

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 7, 2026

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

@tatoalo tatoalo force-pushed the chore/cloud-agent/shared-utils branch from abee4ee to 1f6632a Compare April 8, 2026 09:07
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