@@ -52,14 +52,16 @@ export class McpProvider
5252 /**
5353 * Request that VS Code restart the MCP server with a fresh environment.
5454 *
55- * Bumps the internal revision counter so that the next call to
56- * `provideMcpServerDefinitions()` returns a definition with a different
57- * `version` string. VS Code compares the new version to the running
58- * server's version and, seeing a change, triggers a stop → start cycle.
55+ * Invalidates the cached environment and bumps the internal revision counter
56+ * so that the next call to `provideMcpServerDefinitions()` returns a
57+ * definition with a different `version` string. VS Code compares the new
58+ * version to the running server's version and, seeing a change, triggers a
59+ * stop → start cycle.
5960 *
6061 * Use for changes that require a server restart (configuration changes).
6162 */
6263 requestRestart ( ) : void {
64+ this . envBuilder . invalidate ( ) ;
6365 this . _revision ++ ;
6466 this . logger . info (
6567 `Requesting ql-mcp restart (revision ${ this . _revision } )...` ,
@@ -108,7 +110,7 @@ export class McpProvider
108110 * returns `undefined` (the "latest" / unpinned case), the extension
109111 * version is used as the base instead.
110112 *
111- * After one or more `requestRestart()` calls, a `.N ` revision suffix
113+ * After one or more `requestRestart()` calls, a `+rN ` revision suffix
112114 * is appended so that the version is always different from the
113115 * previous one. VS Code uses the version to decide whether to
114116 * restart a running server: a changed version triggers a stop → start
@@ -121,6 +123,6 @@ export class McpProvider
121123 if ( this . _revision === 0 ) {
122124 return base ;
123125 }
124- return `${ base } . ${ this . _revision } ` ;
126+ return `${ base } +r ${ this . _revision } ` ;
125127 }
126128}
0 commit comments