-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Expand file tree
/
Copy pathapp-name.diff
More file actions
26 lines (22 loc) · 1.19 KB
/
app-name.diff
File metadata and controls
26 lines (22 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Apply --app-name to VS Code web page titles
VS Code's `${appName}` title variable comes from `productService.nameLong` in the
web client. code-server already injects per-request product configuration into
VS Code's web bootstrap, so set `nameShort`/`nameLong` from the existing
`--app-name` CLI arg there.
This keeps the patch minimal and makes browser tab titles honor `--app-name`
without changing unrelated product metadata.
Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
@@ -333,8 +333,11 @@ export class WebClientServer {
scopes: [['user:email'], ['repo']]
} : undefined;
+ const appName = this._environmentService.args['app-name'];
const productConfiguration = {
embedderIdentifier: 'server-distro',
+ nameShort: appName,
+ nameLong: appName,
extensionsGallery: this._webExtensionResourceUrlTemplate && this._productService.extensionsGallery ? {
...this._productService.extensionsGallery,
resourceUrlTemplate: this._webExtensionResourceUrlTemplate.with({