Skip to content

Instantly share code, notes, and snippets.

@OZORDI
OZORDI / chat-export.js
Last active April 22, 2026 17:33
Export VS Code Copilot Chat Log using this simple script. I needed a quick way to export a chat convo in vscode to a text file. So i wrote this neat little script to do it. To use the script open vscode. Ensure the copilot chat panel is open and visible and then open the vscode command pallete and type in Developer: Toggle Developer Tools. Go to…
// Paste into VS Code DevTools Console (Help → Toggle Developer Tools → Console)
// Multi-pass scroll: goes UP first, then DOWN, then fills gaps. Downloads .txt.
(async function() {
const chatList = document.querySelector('.interactive-list .monaco-list[role="list"]');
if (!chatList) { console.error('No chat list found.'); return; }
const scrollableEl = chatList.querySelector('.monaco-scrollable-element');
const anyRow = document.querySelector('.interactive-list .monaco-list-row[aria-setsize]');
const totalRows = anyRow ? parseInt(anyRow.getAttribute('aria-setsize')) : 82;