fix(vscode): keep file mentions fresh - #13158
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit c4dcb3d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c4dcb3d)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
The revision/scope/request handling in Fix these issues in Kilo Cloud Files Reviewed (5 files)
Reviewed by kimi-k3 · Input: 45.2K · Output: 3.9K · Cached: 270.3K Review guidance: REVIEW.md from base branch |
Opening an
@file mention in the VS Code sidebar performs a backend search and renders the full suggestion update before the user can efficiently browse the results. The previous flow also issued duplicate updates for the same request and rebuilt more webview state than necessary, making the interaction heavier than it needs to be.This change makes the zero-query file list available immediately from a short-lived webview snapshot while still refreshing it from the backend. It removes the redundant extension-side prewarm cache and duplicate response path, limits retained directory state, ignores superseded responses, and preserves the highlighted item when fresh results arrive. The result is a lighter file-mention interaction without sacrificing current search results or cross-worktree isolation.
Performance
Comparison of the same
@file-searchinteraction in isolated VS Code, with one controlled profile per side:The comparison used separate disposable worktrees with the same prompt, selector, wait condition, isolated VS Code executable, and profiling harness. End-to-end latency is network and backend dominated, so the renderer metrics show the clearer improvement.
The implementation also covers the associated lifecycle cases: empty refreshes remove deleted files, session and worktree results remain isolated, superseded responses are ignored, and remembered session-directory mappings are bounded.