Skip to content

Conversation

@catrielmuller
Copy link
Contributor

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

  • Fix the name of the webview input

Screenshots

image
  • Tested VSIX on Cursor
  • Tested Zip on Jetbrains

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 652ddda

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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