microsoft / microsoft/vscode

Resizing the Chat panel causes severe lag

Open
#335,158 0 comments 1 reaction 2 assignees Claimed by @justschen View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### What happens

Resizing the Chat panel in the editor window causes severe lag. The panel does not keep up with the mouse, and the window becomes difficult to use while dragging.

### Steps to reproduce

1. Open a chat conversation with expanded terminal command output.
2. Drag the divider to resize the Chat panel.

### Expected

The panel should resize smoothly and the rest of the window should remain responsive.

### Actual

Resizing makes the interface stutter and stop responding in short bursts.

### What the performance recording shows

- During an 8.35-second drag, VS Code's UI thread was busy for about 99% of the time.
- Some individual updates blocked the interface for roughly 0.2 to 0.4 seconds. Recorded input delays reached just over half a second.
- About two-thirds of the time spent recalculating page styles came from the terminal-output previews inside chat.
- Garbage collection took only about 51 milliseconds during the drag, so it was not the main source of the slowdown.

The terminal-output previews repeatedly measure their contents, change their height, and measure again. Some of this work happens immediately when the panel changes size, then happens again after the terminal output wraps to the new width.

The [terminal-output resize handling](https://github.com/microsoft/vscode/blob/023b8803f23ea6451959d09a05c4e2ff90fedc34/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.ts#L1712) looks like the main place to investigate. Combining these updates and avoiding repeated measurements during the same resize may help.

### Environment

- VS Code Insiders, build `023b8803f23ea6451959d09a05c4e2ff90fedc34`
- Windows; exact OS version was not included in the recording
- Performance recording captured on September 8, 2026
- Reproduction with extensions disabled: not tested

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.