Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
The VSCode extension's webview loader (ClineProvider.ts) has hardcoded references to these specific asset filenames (lines 1294-1301). This is necessary because:
VSCode Webview Architecture: Unlike web applications, VSCode webviews cannot dynamically discover assets. The extension must know the exact file paths at compile time to generate proper webview URIs.
Vite Build Contract: The Vite configuration (vite.config.ts lines 129-150) uses [name] placeholders that resolve to the entry point names. Since our entry point is named index (line 124), Vite generates index.js and index.css.
Security Requirements: VSCode's Content Security Policy requires explicit URI references. The extension converts file paths to secure webview URIs using webview.asWebviewUri(), which requires knowing the exact filenames beforehand.
Multi-Entry Support: The build supports multiple entry points (index and agent-manager), each generating their own JS/CSS bundles. The main webview uses the index entry point, hence requiring index.js and index.css.
Any changes to the Vite build configuration that modify these output filenames would break the webview loading mechanism and require corresponding updates to ClineProvider.ts.
Implementation
Screenshots