Skip to content

Commit 23a5de6

Browse files
committed
Update serverActions.ts
1 parent e65cd70 commit 23a5de6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/commands/serverActions.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,16 @@ export async function serverActions(): Promise<void> {
282282
break;
283283
}
284284
default: {
285-
vscode.env.openExternal(vscode.Uri.parse(action.detail));
285+
let url = vscode.Uri.parse(action.detail);
286+
if (action.rawLink?.startsWith("${serverUrl}")) {
287+
const token = await getCSPToken(api, url.path);
288+
if (token.length > 0) {
289+
url = url.with({
290+
query: url.query.length ? `${url.query}&CSPCHD=${token}` : `CSPCHD=${token}`,
291+
});
292+
}
293+
}
294+
vscode.env.openExternal(url);
286295
}
287296
}
288297
});

0 commit comments

Comments
 (0)