You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(webview): send appended chat messages as deltas, not full history
Appending a new chat message used to call postTaskStateToWebview, which
re-serialized and re-sent the entire clineMessages array (and rebuilt the
full state object) over the webview postMessage bridge on every message.
For long or multiple concurrent conversations that array dominates the
per-update payload and hurts responsiveness.
Streaming token updates already use the single-message `messageUpdated`
delta; this closes the remaining full-payload path — message append.
- Add a `messageAdded` extension->webview message type carrying one
ClineMessage.
- ClineProvider.postTaskMessageAddedToWebview: for the visible task, post the
single new message then refresh the remaining task-scoped fields via
postStateToWebviewWithoutClineMessages (omits clineMessages + taskHistory);
for a background task, just schedule the active-conversations summary update.
- Task.addToClineMessages routes appends through this delta path, with a
fallback to a full task-state push for provider shapes that lack it.
- Webview appends the delta in place (idempotent: replaces by ts if already
present, e.g. if a later full-state push raced it).
taskHistory was already deltified previously; clineMessages was the remaining
large array re-sent on each update.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments