mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
4d1fa8a6e2
* feat(clis/chatgptweb): add ChatGPT web image generation command Add `opencli chatgptweb image` command that generates images using ChatGPT web (GPT-4o image generation) and saves them locally. Features: - Navigates to chatgpt.com/new with full page reload to ensure clean state - Uses Playwright's page.type() for reliable text input in TipTap editor - Closes sidebar if open (covers the chat composer on some layouts) - Polls for response completion (handles thinking/throttling states) - Extracts generated images from DOM (backend-api/estuary/content URLs) - Downloads and saves as PNG/JPEG files to user-specified directory - Supports --op for output directory and --sd to skip download Files: - clis/chatgptweb/image.js: CLI command definition - clis/chatgptweb/utils.js: DOM helpers, send/wait/export functions Works cross-platform (Linux/macOS/Windows) via OpenCLI browser automation. * fix(chatgptweb): stabilize image generation flow * docs(chatgptweb): add browser adapter guide --------- Co-authored-by: Tony Simons <tony@tonysimons.dev> Co-authored-by: jackwener <jakevingoo@gmail.com>