Skip to content

Avoid unnecessary layouts while typing in chat input#286935

Merged
roblourens merged 2 commits intomainfrom
roblou/embarrassed-marsupial
Jan 10, 2026
Merged

Avoid unnecessary layouts while typing in chat input#286935
roblourens merged 2 commits intomainfrom
roblou/embarrassed-marsupial

Conversation

@roblourens
Copy link
Copy Markdown
Member

@roblourens roblourens commented Jan 10, 2026

Fixes #286531

Rendering the chat edit session state when input changes was added for rendering file variables in the working set, in 92df7b6, which we don't do anymore anyway.

The second commit is a bit more aggressive but I'm pretty sure that it's safe.

just fyi @justschen

Fix #286531
This was added to rerender the working set to show file attachments in it, but we don't do that anymore
Copilot AI review requested due to automatic review settings January 10, 2026 18:19
@roblourens roblourens enabled auto-merge (squash) January 10, 2026 18:19
@roblourens roblourens self-assigned this Jan 10, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes chat widget performance by removing unnecessary layout operations that were triggered while typing in the chat input. The changes eliminate redundant calls to renderChatEditingSessionState() and a layout operation that was originally added for rendering file variables in the working set, which is no longer needed.

Changes:

  • Removed onDidChangeParsedInput listener that unnecessarily triggered editing session state renders on every input change
  • Removed redundant autorun that re-rendered editing session state when the session changed (already handled by existing autorun)
  • Removed explicit layout call after renderChatEditingSessionState() (layout is properly triggered via onDidChangeHeight event mechanism)

@roblourens roblourens merged commit 343e7c3 into main Jan 10, 2026
27 of 28 checks passed
@roblourens roblourens deleted the roblou/embarrassed-marsupial branch January 10, 2026 18:56
eli-w-king pushed a commit that referenced this pull request Jan 14, 2026
* Don't relayout the chat widget when typing in the input
Fix #286531
This was added to rerender the working set to show file attachments in it, but we don't do that anymore

* Possibly more ambitious change but both of these seem redundnat
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat layout getItemsWidth is very expensive

3 participants