Compare commits

...
Author SHA1 Message Date
Saoud Rizwan ac113474b2 fix(vscode): move webview dev server off the cline hub port
The webview-ui vite dev server and WebviewProvider's DEFAULT_PORT both
defaulted to 25463, which is CLINE_HUB_PORT (25463 spells CLINE) — the
port the installed cline CLI's hub daemon listens on. With the daemon
running, vite silently bumps to another port on every F5. The .vite-port
file keeps the extension in sync so this mostly works, but it breaks
setups that need a predictable port to forward (e.g. VS Code attached to
a dev container, where the webview renders on the host and the dev
server runs in the container).

Move the default to 25465, clear of both CLINE_HUB_PORT (25463) and
CLINE_HUB_DEV_PORT (25466).
2026-07-10 00:48:43 -07:00
2 changed files with 7 additions and 2 deletions
@@ -128,7 +128,9 @@ export abstract class WebviewProvider {
* If the file doesn't exist or can't be read, it resolves to the default port
*/
private getDevServerPort(): Promise<number> {
const DEFAULT_PORT = 25463
// Must match webview-ui/vite.config.ts server.port. NOT 25463 (CLINE_HUB_PORT) or
// 25466 (CLINE_HUB_DEV_PORT) — the cline CLI's hub daemon holds those.
const DEFAULT_PORT = 25465
const portFilePath = path.join(__dirname, "..", "webview-ui", ".vite-port")
+4 -1
View File
@@ -109,7 +109,10 @@ export default defineConfig({
},
server: {
host: "127.0.0.1",
port: 25463,
// NOT 25463: that's CLINE_HUB_PORT (@cline/shared rpc), which the installed
// cline CLI's hub daemon holds — vite would silently bump to a random port.
// 25466 is CLINE_HUB_DEV_PORT; keep clear of both.
port: 25465,
fs: {
allow: [resolve(__dirname), resolve(__dirname, "../src/shared")],
},