Google AI Studio | Chat/Conversation Markdown-Export (API Based)

Exports the full conversation to Markdown. Uses a recursive scanner to find the chat history regardless of API changes.

目前為 2025-11-29 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
piknockyou
評價
0 0 0
版本
1.0
建立日期
2025-11-29
更新日期
2025-11-29
尺寸
10.1 KB
授權條款
未知
腳本執行於

Google AI Studio | Chat/Conversation Markdown-Export (API Based)

Instantly export complete Google AI Studio conversations to Markdown by intercepting the internal API. Features a native toolbar integration, smart recursive parsing, and zero-scrolling capture.

Features

  • API-Level Extraction: Intercepts the raw ResolveDriveResource network request to capture the exact chat data sent from Google's servers.
  • Instant Capture: No scrolling, no waiting, and no rendering delays. The data is captured the moment the page loads.
  • Smart Recursive Parsing: Uses an advanced algorithm to locate chat history within Google's complex JSON structure, making it resilient to API changes.
  • Native Toolbar Integration: Adds a seamless "Download" button to the existing AI Studio toolbar using Material Design styling.
  • Complete History: Captures every user prompt and AI response in the conversation, ensuring nothing is missed due to UI virtualization.
  • Clean Markdown Output: Generates a formatted .md file ready for archiving or use with other LLM agents.
  • Non-Intrusive: Runs silently in the background and only modifies the DOM to add the single download button.

Installation

Requirements

Steps

  1. Install one of the userscript managers listed above.
  2. Download/Install this script.
  3. The script will automatically activate on https://aistudio.google.com/*.

Usage

Important: Because this script captures data as it loads, you must be on the page when the data fetch happens.

  1. Navigate to any conversation in Google AI Studio.
  2. Refresh the Page (F5).
    • Why? AI Studio fetches the full chat history only once when the page first opens. The script needs to be running to "catch" this file.
  3. Look for the Download Icon in the top-right toolbar (next to the "Run" or "More" buttons).
  4. Click the button to instantly download the Markdown (.md) file.

How It Works

Unlike traditional scrapers that try to read text from the screen, this script uses a more robust approach:

  1. Network Interception: It hooks into the browser's XMLHttpRequest to listen for a specific Google Drive resource request (ResolveDriveResource).
  2. Data Capture: When Google sends the chat history to your browser, the script saves a copy of this raw JSON data.
  3. Recursive Search: It scans the deeply nested JSON structure to find the specific array containing "user" and "model" dialogue, regardless of where Google hides it.
  4. Formatting: It converts the raw data into a clean Markdown format.
  5. Download: It generates a file named after the prompt title (or a timestamp) and triggers a browser download.

FAQ

Q: I don't see the button. A: Refresh the page. The button only appears after the script successfully detects and captures the chat data from the network stream.

Q: Does this scrape the screen? A: No. It reads the raw data file directly from the network traffic. This is faster and more accurate than screen scraping.

Q: Can I filter messages? A: This version captures the entire conversation exactly as it exists in the file to ensure data integrity.

Q: Is it safe? A: Yes. The script runs entirely locally in your browser. It does not send your data to any third-party server; it simply converts the data Google sent you into a text file.