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> {
179
179
break ;
180
180
}
181
181
default : {
182
- let urlString = action . detail ;
182
+ let url = vscode . Uri . parse ( action . detail ) ;
183
183
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 ) ;
186
185
if ( token . length > 0 ) {
187
- urlString += `&CSPCHD=${ token } ` ;
186
+ url = url . with ( {
187
+ query : url . query . length ? `${ url . query } &CSPCHD=${ token } ` : `CSPCHD=${ token } ` ,
188
+ } ) ;
188
189
}
189
190
}
190
- vscode . env . openExternal ( vscode . Uri . parse ( urlString ) ) ;
191
+ vscode . env . openExternal ( url ) ;
191
192
}
192
193
}
193
194
} ) ;
You can’t perform that action at this time.
0 commit comments