Skip to content

chore(vscode-webui): stop passing full message array to tool parts - #1903

Merged
zhanba merged 1 commit into
mainfrom
chore/tool-part-args
Aug 20, 2026
Merged

chore(vscode-webui): stop passing full message array to tool parts#1903
zhanba merged 1 commit into
mainfrom
chore/tool-part-args

Conversation

@liangfung

Copy link
Copy Markdown
Member

Summary

Every tool part received the whole formatted renderMessages array, whose identity changes on each streaming tick, defeating memoization for all tool parts. Only attemptCompletion and renderWidget consumed it, and both only needed to know their position, so replace it with two booleans derived once per part: the existing isLastPart and a new isInLastAssistantMessage.

🤖 Generated with Pochi

Every tool part received the whole formatted renderMessages array, whose
identity changes on each streaming tick, defeating memoization for all
tool parts. Only attemptCompletion and renderWidget consumed it, and both
only needed to know their position, so replace it with two booleans
derived once per part: the existing isLastPart and a new
isInLastAssistantMessage.

🤖 Generated with [Pochi](https://getpochi.com)

Co-Authored-By: Pochi <noreply@getpochi.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.31%. Comparing base (f2af902) to head (d74044e).

Files with missing lines Patch % Lines
...code-webui/src/features/tools/components/index.tsx 0.00% 5 Missing ⚠️
...s/tools/__stories__/attempt-completion.stories.tsx 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (62.50%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1903      +/-   ##
==========================================
+ Coverage   38.30%   38.31%   +0.01%     
==========================================
  Files         772      772              
  Lines       82410    82354      -56     
  Branches     3951     4015      +64     
==========================================
- Hits        31566    31556      -10     
+ Misses      50727    50681      -46     
  Partials      117      117              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zhanba
zhanba added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit df49e9e Aug 20, 2026
3 checks passed
@zhanba
zhanba deleted the chore/tool-part-args branch August 20, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants