您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automates clicking chat turn options and delete buttons in Gemini.
After their August 2025 interface revamp, Google removed the native clear button, making it difficult to quickly clear conversation history. This userscript restores the missing clear chat button in Google AI Studio.
https://aistudio.google.com/prompts/*
Important Note: Google AI Studio is a single-page application (SPA). This means when you navigate from one section to a prompt page (without a full page reload), the userscript may not initialize properly. If the clear button doesn't appear after navigation, simply reload the page (F5 or Ctrl+R) to activate the script and display the button.
The script automates the manual process of:
This process is now reduced to a single button click in the toolbar.
The script includes configurable selectors in case Google changes their DOM structure:
const CHAT_TURN_OPTIONS_SELECTOR = 'ms-chat-turn-options span[class="material-symbols-outlined notranslate ms-button-icon-symbol ng-star-inserted"]';
const DELETE_BUTTON_MENU_SELECTOR = 'div.mat-mdc-menu-content > button:first-of-type';
const DELETE_BUTTON_TEXT = "delete Delete";
https://aistudio.google.com/prompts/*
)[Gemini Chat Cleaner]
The script provides detailed logging:
[Gemini Chat Cleaner] Script loaded and starting...
[Gemini Chat Cleaner] Current URL: [URL]
[Gemini Chat Cleaner] Toolbar found, creating button...
[Gemini Chat Cleaner] Button successfully added to toolbar
This userscript is provided as-is for personal use. Feel free to modify and distribute according to your needs.
If you encounter issues:
Created with assistance from AI tools for enhanced productivity in Google AI Studio workflows.