File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -179,15 +179,16 @@ export async function serverActions(): Promise<void> {
179179 break ;
180180 }
181181 default : {
182- let urlString = action . detail ;
182+ let url = vscode . Uri . parse ( action . detail ) ;
183183 if ( action . rawLink ?. startsWith ( "${serverUrl}" ) ) {
184- const path = vscode . Uri . parse ( urlString ) . path ;
185- const token = await getCSPToken ( api , path ) ;
184+ const token = await getCSPToken ( api , url . path ) ;
186185 if ( token . length > 0 ) {
187- urlString += `&CSPCHD=${ token } ` ;
186+ url = url . with ( {
187+ query : url . query . length ? `${ url . query } &CSPCHD=${ token } ` : `CSPCHD=${ token } ` ,
188+ } ) ;
188189 }
189190 }
190- vscode . env . openExternal ( vscode . Uri . parse ( urlString ) ) ;
191+ vscode . env . openExternal ( url ) ;
191192 }
192193 }
193194 } ) ;
You can’t perform that action at this time.
0 commit comments