gadget/packages
Rob Colbert 9c1e65785d feat: add chat_export tool for session export (markdown/json)
New chat tool: chat_export

- Export current ChatSession and all finished ChatTurn records to disk
- Two formats: markdown (human-readable) and json (machine-readable)
- JSON exports always include a companion -readme.md with author credits,
  Gadget Code version/link, AI provider/model/parameters
- Output to .gadget/exports/ with sanitized session name + timestamp
- Security-first: excludes emails, API keys, baseUrls, system prompts,
  gitUrls, and other PII/infrastructure details from all exports
- Only finished/aborted/error turns included (processing excluded)
- Follows SubagentTool setter-injection pattern for session data
- Available in all chat session modes (plan/build/test/ship/dev)

Files:
- packages/ai-toolbox/src/chat/export.ts (NEW - 729 lines)
- packages/ai-toolbox/src/chat/index.ts (barrel update)
- gadget-drone/src/tools/index.ts (re-export update)
- gadget-drone/src/services/agent.ts (import, register, getExportData)
2026-05-18 11:44:53 -04:00
..
ai added Gab AI affiliate link; changed Ollama abort procedure 2026-05-15 14:11:45 -04:00
ai-toolbox feat: add chat_export tool for session export (markdown/json) 2026-05-18 11:44:53 -04:00
api feat(workspace): intelligent startup - detect workspace by walking up directory hierarchy 2026-05-17 17:09:16 -04:00
config feat(gadget-tasks): course correction — headless IDE client architecture 2026-05-17 00:48:39 -04:00