Export your Gemini chat history from Google AI Studio to a text file. Features: Auto-scrolling, User/Model role differentiation, clean output, and full mobile optimization.
This UserScript solves the problem of "Virtual Scrolling" in Google AI Studio, allowing you to export your full chat history with Gemini.
ESC key..md file will be downloaded automatically.Tip: Press
ESCkey at any time to stop scrolling and save what has been captured so far.
Google AI Studio Chat History
Time: 2025/11/25 19:30:00
Count: 42
========================================
### User:
Analyze the provided code snippet.
----------------------------------------------------------------
### Gemini:
Here is the analysis of the code...
[Code block content...]
这个脚本解决了 Google AI Studio 因“虚拟滚动”导致无法获取完整历史记录的问题。
ESC 键随时中断并保存。.md 文件。提示:随时按
ESC键可停止滚动并保存已抓取的内容。
Google AI Studio 完整对话记录
时间: 2025/11/25 19:30:00
条数: 42
========================================
### User:
Analyze the provided code snippet.
----------------------------------------------------------------
### Gemini:
Here is the analysis of the code...
[Code block content...]
AGPL-3.0 License
[image.jpg](https://...) and [file.pdf](https://...).ESC during packaging to cancel and save the current progress.href is normalized using new URL(href, window.location.href).http:/https: (blob: allowed when fallback is enabled), rejects #/invalid URLs.host === domain || host.endsWith('.' + domain) to avoid false positives like evil-googleapis.com.ATTACHMENT_COMBINED_FALLBACK: When true, shows an attachments section with “link unavailable” only if a scan was attempted but found nothing.ATTACHMENT_MAX_DIST: Pixel threshold to associate a download icon with a hovered image (UI proximity heuristic).normalizeHref(href): Internally normalizes any href to an absolute URL; invalid or # are ignored.generateAttachmentsMarkdown() with improved label escaping.[image.jpg](https://...)、[file.pdf](https://...),点击即可访问原文件。ESC 取消并保存当前进度。href 通过 new URL(href, window.location.href) 规范化为绝对地址。http:/https:(在启用回退时允许 blob:),拒绝 #/无效地址。host === domain 或 host.endsWith('.' + domain),避免 evil-googleapis.com 等伪装误判。ATTACHMENT_COMBINED_FALLBACK:为 true 时,仅在本回合尝试过附件扫描但未发现链接时,显示“链接不可用”占位。ATTACHMENT_MAX_DIST:用于将图片与下载图标建立关联的距离阈值(像素)。normalizeHref(href):内部将任意 href 规范化为绝对地址;无效或 # 将忽略。generateAttachmentsMarkdown() 统一附件渲染,并改进标签转义。