mirror of
https://github.com/coder/code-server.git
synced 2026-06-21 01:17:10 +02:00
Update to VS Code 1.52.1
This commit is contained in:
@@ -55,6 +55,7 @@ export interface IssueReporterData extends WindowData {
|
||||
enabledExtensions: IssueReporterExtensionData[];
|
||||
issueType?: IssueType;
|
||||
extensionId?: string;
|
||||
experiments?: string;
|
||||
readonly issueTitle?: string;
|
||||
readonly issueBody?: string;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export class IssueMainService implements ICommonIssueService {
|
||||
.then(result => {
|
||||
const [info, remoteData] = result;
|
||||
this.diagnosticsService.getSystemInfo(info, remoteData).then(msg => {
|
||||
event.sender.send('vscode:issueSystemInfoResponse', msg);
|
||||
this.safeSend(event, 'vscode:issueSystemInfoResponse', msg);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -86,7 +86,7 @@ export class IssueMainService implements ICommonIssueService {
|
||||
this.logService.error(`Listing processes failed: ${e}`);
|
||||
}
|
||||
|
||||
event.sender.send('vscode:listProcessesResponse', processes);
|
||||
this.safeSend(event, 'vscode:listProcessesResponse', processes);
|
||||
});
|
||||
|
||||
ipcMain.on('vscode:issueReporterClipboard', (event: IpcMainEvent) => {
|
||||
@@ -102,14 +102,14 @@ export class IssueMainService implements ICommonIssueService {
|
||||
if (this._issueWindow) {
|
||||
this.dialogMainService.showMessageBox(messageOptions, this._issueWindow)
|
||||
.then(result => {
|
||||
event.sender.send('vscode:issueReporterClipboardResponse', result.response === 0);
|
||||
this.safeSend(event, 'vscode:issueReporterClipboardResponse', result.response === 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('vscode:issuePerformanceInfoRequest', (event: IpcMainEvent) => {
|
||||
this.getPerformanceInfo().then(msg => {
|
||||
event.sender.send('vscode:issuePerformanceInfoResponse', msg);
|
||||
this.safeSend(event, 'vscode:issuePerformanceInfoResponse', msg);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -174,11 +174,17 @@ export class IssueMainService implements ICommonIssueService {
|
||||
|
||||
ipcMain.on('vscode:windowsInfoRequest', (event: IpcMainEvent) => {
|
||||
this.launchMainService.getMainProcessInfo().then(info => {
|
||||
event.sender.send('vscode:windowsInfoResponse', info.windows);
|
||||
this.safeSend(event, 'vscode:windowsInfoResponse', info.windows);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private safeSend(event: IpcMainEvent, channel: string, ...args: unknown[]): void {
|
||||
if (!event.sender.isDestroyed()) {
|
||||
event.sender.send(channel, ...args);
|
||||
}
|
||||
}
|
||||
|
||||
openReporter(data: IssueReporterData): Promise<void> {
|
||||
return new Promise(_ => {
|
||||
if (!this._issueWindow) {
|
||||
@@ -203,18 +209,8 @@ export class IssueMainService implements ICommonIssueService {
|
||||
spellcheck: false,
|
||||
nativeWindowOpen: true,
|
||||
zoomFactor: zoomLevelToZoomFactor(data.zoomLevel),
|
||||
...this.environmentService.sandbox ?
|
||||
|
||||
// Sandbox
|
||||
{
|
||||
sandbox: true,
|
||||
contextIsolation: true
|
||||
} :
|
||||
|
||||
// No Sandbox
|
||||
{
|
||||
nodeIntegration: true
|
||||
}
|
||||
sandbox: true,
|
||||
contextIsolation: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -269,18 +265,8 @@ export class IssueMainService implements ICommonIssueService {
|
||||
spellcheck: false,
|
||||
nativeWindowOpen: true,
|
||||
zoomFactor: zoomLevelToZoomFactor(data.zoomLevel),
|
||||
...this.environmentService.sandbox ?
|
||||
|
||||
// Sandbox
|
||||
{
|
||||
sandbox: true,
|
||||
contextIsolation: true
|
||||
} :
|
||||
|
||||
// No Sandbox
|
||||
{
|
||||
nodeIntegration: true
|
||||
}
|
||||
sandbox: true,
|
||||
contextIsolation: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -288,7 +274,6 @@ export class IssueMainService implements ICommonIssueService {
|
||||
|
||||
const windowConfiguration = {
|
||||
appRoot: this.environmentService.appRoot,
|
||||
nodeCachedDataDir: this.environmentService.nodeCachedDataDir,
|
||||
windowId: this._processExplorerWindow.id,
|
||||
userEnv: this.userEnv,
|
||||
machineId: this.machineId,
|
||||
@@ -416,7 +401,6 @@ export class IssueMainService implements ICommonIssueService {
|
||||
|
||||
const windowConfiguration = {
|
||||
appRoot: this.environmentService.appRoot,
|
||||
nodeCachedDataDir: this.environmentService.nodeCachedDataDir,
|
||||
windowId: this._issueWindow.id,
|
||||
machineId: this.machineId,
|
||||
userEnv: this.userEnv,
|
||||
@@ -452,7 +436,7 @@ function toWindowUrl<T>(modulePathToHtml: string, windowConfiguration: T): strin
|
||||
}
|
||||
|
||||
return FileAccess
|
||||
.asBrowserUri(modulePathToHtml, require)
|
||||
._asCodeFileUri(modulePathToHtml, require)
|
||||
.with({ query: `config=${encodeURIComponent(JSON.stringify(config))}` })
|
||||
.toString(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user