Google AI Studio | Conversation/Chat MarkDown-Export/Download (DOM-based)

Export AI Studio conversations to Markdown with intelligent mode detection, toolbar integration, and abortable processing. Features dual-mode extraction and configurable filters.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey to install this script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

Autor
piknockyou
Instalaciones diarias
3
Instalaciones totales
110
Calificaciones
1 0 0
Versión
2.6
Creado
02/11/2025
Actualizado
29/11/2025
Tamaño
62.9 KB
Licencia
MIT
Funciona en

Upgrade to Instant Speed: Check out the new API-Based Version which captures the full chat instantly (0.1s) without scrolling!

Google AI Studio | Conversation/Chat MarkDown-Export/Download (DOM-based)

Export Google AI Studio chats to Markdown: auto-detects Raw/Rendered modes, abortable scrolling, configurable filters (user/AI/thinking). Toolbar-integrated for quick capture and archiving.

Features

  • Intelligent Mode Detection: Automatically detects Raw Mode vs Rendered Mode and adapts extraction strategy accordingly
  • Abortable Processing: Cancel extraction mid-process with the click of a button for responsive user experience
  • Toolbar Integration: Seamlessly integrated into AI Studio's existing toolbar with native Material Design styling
  • Configurable Export Filters: Real-time control over what content to include in exports (user messages, AI responses, AI thinking)
  • High-Performance Scrolling: Ultra-fast scrolling with 50ms delays and intelligent batching for maximum speed
  • Auto-Recovery: Automatically handles dynamic UI re-rendering and maintains functionality across navigation
  • Dual-Mode Support: Works with both Raw Mode (clean markdown) and Rendered Mode (formatted content)
  • CSP-Compliant: Fully compliant with AI Studio's Content Security Policy restrictions
  • Advanced Content Extraction: Captures user prompts, AI responses, and AI thinking/reasoning processes
  • Visual State Feedback: Button shows current status (Idle/Working/Success/Error) with appropriate Material Design icons

Installation

Requirements

Steps

  1. Install one of the userscript managers listed above
  2. Download the script file
  3. Import the script into your userscript manager
  4. The script will automatically activate on https://aistudio.google.com/*

Usage

  1. Navigate to any conversation page in Google AI Studio
  2. Look for the export/download icon in the top toolbar
  3. (Optional) Click the settings gear icon to configure export filters:
    • Toggle Raw Mode preference
    • Include/exclude user messages
    • Include/exclude AI responses
    • Include/exclude AI thinking/reasoning
  4. Click the export button to begin automated capture
  5. Monitor progress via button state changes (working → success/error)
  6. Click the button again during processing to abort if needed
  7. Download starts automatically when extraction is complete

How It Works

The script automates the complete conversation export process:

  1. Mode Detection: Automatically detects current page mode (Raw vs Rendered)
  2. Mode Toggle (if needed): Switches to preferred mode for optimal extraction
  3. High-Speed Scrolling: Performs ultra-fast automated scrolling through the entire conversation
  4. Smart Content Extraction: Captures user prompts, AI responses, and thinking processes in real-time
  5. Expandable Sections: Automatically expands collapsed thinking/reasoning sections before extraction
  6. Final Verification: Performs multiple collection passes to ensure complete capture
  7. Markdown Generation: Formats captured content into clean, structured Markdown
  8. File Download: Automatically downloads the formatted export file

This entire process is reduced to a single button click in the toolbar.

Configuration

The script includes runtime-configurable settings accessible via the settings panel:

// Core preferences
let PREFER_RAW_MODE = true;           // Auto-switch to Raw Mode for cleaner extraction
let INCLUDE_USER_MESSAGES = true;     // Include user prompts in export
let INCLUDE_AI_RESPONSES = true;      // Include AI answers in export
let INCLUDE_AI_THINKING = false;      // Include AI reasoning/thought process

Credits & Inspiration

This script builds upon concepts from two projects:

  1. Userscript: Google AI Studio 聊天记录导出器 (now deleted)

  2. Extension: Gemini to PDF