#763

feat: attach current page content to the chat composer as a snippet

Opennicoalbaneseopened 7mo ago

Problem

Today we can add selected workspace file text to the prompt as a snippet, but there is no comparable one-click way to capture the current preview/browser page content and attach it to the chat composer.

That makes UI/debugging workflows slower because users have to manually copy/paste page text or describe what they are seeing instead of attaching the actual rendered page content as context.

Proposal

Add a composer action that fetches the current page content and attaches it as a snippet/text attachment in the chat input flow.

Suggested behavior:

  • Read the active page's URL, title, and visible text/content
  • Package that content into the existing snippet/text-attachment pipeline
  • Show it in the composer the same way other attached snippets are surfaced
  • Include lightweight source metadata (for example URL/title) in the snippet body or filename
  • Apply sensible truncation/size limits so very large pages do not overwhelm the prompt

Acceptance criteria

  • Users can attach the current page content with one action from the preview/browser flow
  • The captured content is added to the chat composer as a snippet/text attachment
  • The attachment includes enough source metadata to identify the page
  • Large pages are trimmed to a safe size instead of failing silently
  • The flow works without requiring manual text selection or copy/paste

Notes

This seems complementary to the existing snippet flow for selected workspace-file text: same destination in the composer, but the source is the active rendered page instead of the code editor/file viewer

Activity

0

No activity yet.