Repository navigation
Releases
Releases · Greedeks/AI-OptiChat
v1.2
- Added a Collapse old Thinking option (enabled by default) that collapses expanded reasoning blocks once in older turns and applies
content-visibility: autoto thinking containers above the latest two turns. - Improved cold page-load performance by switching to
@run-at document-start: lightweight optimization styles, root classes, and input buffering now apply immediately before<body>exists, while the UI widget and observers initialize as soon asdocument.bodyis ready. - Improved animation and GPU reduction in Disable animations by hiding decorative Rive/avatar
<canvas>elements (such as Kimi message avatars) and clamping CSS animations on<canvas>without affecting charts or diagrams. - Improved tab-return and back/forward navigation handling by consolidating
visibilitychange,focus, andpageshow(bfcache) into a singleonReturnhandler with a coalesced400 msfollow-up scan, eliminating duplicate scans on focus and avoiding up to a 5-second wait when sites update content right after returning to a tab.
v1.1
- Fixed an issue where clicking code blocks or Copy buttons could cause sudden scroll jumps by excluding
:focus-withinelements fromcontent-visibility: autoand reducing the pre-render margin from1600 pxto800 px. - Added support for Grok (
grok.com), Perplexity (perplexity.ai), and Qwen (chat.qwen.ai), including<textarea>input buffering on Grok and Qwen. - Added an Isolate message layout option (
contain: layout style, enabled by default) to prevent streaming responses from triggering layout reflows across neighboring messages. - Added a 5-step buffer delay slider (
120 / 180 / 240 / 320 / 400 ms, default240 ms) under Smooth typing, with a one-click reset to240 mson the value badge. - Added an Adaptive / Dark / Light interface theme selector (defaulting to Adaptive) that detects the site's active theme, reacts to live theme switches, and syncs across open tabs.
- Improved large-chat opening and scrolling behavior:
- Switched script injection to
@run-at document-bodyso lightweight styles apply before the chat finishes loading. - Inverted off-screen skipping to
:not(.ai5-near)so distant turns skip layout and rendering from the very first frame. - Added a throttled
MutationObserver(80 ms) to detect newly opened or switched chats before paint, and increased the background fallback scan interval from2000 msto5000 msto reduce periodic overhead on huge threads.
- Switched script injection to
- Improved virtualized message counting:
- Added
data-virtual-list-item-keytracking anddiv.ds-virtual-listscroller detection for DeepSeek so the counter reflects the full thread instead of only visible DOM rows. - Updated ChatGPT's counter to also read
data-chatgpt-search-unit-keyanddata-content-search-unit-keyalongsidefallback-turn-*keys.
- Added
v1.0
Initial release of AI OptiChat - a lightweight userscript to eliminate UI lag, scroll stutters, and 2–3 FPS typing delays in long AI chats.
Highlights
- Off-screen message skipping & smart pre-rendering for smoother scrolling without broken buttons.
- Smooth typing (
<textarea>input batching) to fix severe typing lag in huge threads. - Heavy style & GPU reductions (disable background blur, shadows, decorative animations, compact long code blocks, lazy-load images).
- Per-site & global settings with auto-activate message threshold and instant cross-tab sync.
- Floating control widget with Mini mode, drag-and-drop lock, position/settings reset, and EN / RU interface.
Supported Sites
Google AI Studio · Gemini · ChatGPT · Claude · DeepSeek · Kimi
Installation
Click the attached AI-OptiChat.user.js file below to install via Tampermonkey / Violentmonkey.