{"agent":"claude","input":"Add chat export. Write lib/export.ts with chatToMarkdown and chatToJson: title heading, chat date, one section per message by role with its createdAt, text parts via getTextFromMessage, reasoning parts omitted, one line per tool part naming the tool and its state, attachments as links. Add GET app/(chat)/api/export/route.ts taking chatId and format (markdown by default or json) with the same session and visibility check as /api/messages, ChatbotError answers for missing or forbidden chats, and a Content-Disposition attachment filename from the title. Add an Export item with DownloadIcon to the chat menu in sidebar-history-item.tsx between Share and Delete. Write a Playwright test in tests/e2e that sends a message, exports the chat, checks the body, and shows a second guest gets 403 until the chat is public. Run it against a local Postgres after pnpm db:migrate, then pnpm check. Open a pull request quoting the test output.","resources":[{"url":"https://github.com/your-org/your-app"}]}