-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Open
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)windows
Description
Bug Description
On Windows, plugin paths are displayed incorrectly in the UI. Instead of showing the plugin name (e.g., oh-my-opencode), the full filesystem path is shown (e.g., C:\Users\Username\ or E:\opencode\).
Root Cause
In packages/opencode/src/config/config.ts line 1250:
data.plugin[i] = import.meta.resolve!(plugin, options.path)On Windows, import.meta.resolve() returns a raw filesystem path like E:\path\to\plugin\index.js instead of a file:// URL. This causes:
getPluginName()fails to extract the plugin name (it checks forfile://prefix)- The raw path is displayed directly in the UI
Note: The fallback require.resolve() path correctly uses pathToFileURL() on line 1256.
Expected Behavior
Plugin list should show plugin names like oh-my-opencode @latest.
Actual Behavior
Plugin list shows raw paths like C:\Users\Username\ or E:\opencode\.
Environment
- Windows 10/11
- OpenCode v1.2.21
Suggested Fix
Convert the resolved path to a file:// URL consistently:
const resolved = import.meta.resolve!(plugin, options.path)
data.plugin[i] = resolved.startsWith("file://") ? resolved : pathToFileURL(resolved).hrefReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)windows