Composer
The note/link/screenshot input, with post-vs-reply mode.
The composer is where a draft starts — a note, a pasted link, a dragged-in screenshot, or any combination, plus a post/reply mode toggle that changes both the AI prompt and the tweet's structural rules.
Attachment sources
| Source | How it's grounded |
|---|---|
| Note | Expanded directly, no external fetch |
| Link | gpt-5-search-api searches the web to confirm what it's about |
| Screenshot | Vision model reads the image directly — no fetch at all |
Screenshots exist specifically for sources a URL fetch can't reach — X/Twitter blocks crawlers at the server level.
function generateTweetFromComposer(input: {
note?: string;
url?: string;
screenshotDataUrl?: string;
mode?: DraftMode;
}) {
if (input.screenshotDataUrl) return generateTweetFromScreenshot(/* ... */);
if (input.url) return generateTweetFromUrl(/* ... */);
return generateTweetFromNote(/* ... */);
}