mirror of
https://github.com/coder/code-server.git
synced 2024-11-23 03:37:19 +03:00
70d0c603cc
* Update VS Code to 1.82.2 * Add new libkrb5 dependency * Update patches The only changes were to context except: - The URL callback provider uses a new _callbackRoute argument and moved locations. - The telemetry provider gets passed the request service as the first argument now. - CSP hash changed, as usual. * Update Node to v18 * Revert back to es2020 es2022 is breaking Safari.
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
Make opening files/folders from the terminal only open in the current instance
|
|
|
|
Previously they would open in every code-server tab/window.
|
|
|
|
To test:
|
|
|
|
1. Run code-server
|
|
2. Open code-server
|
|
3. Open terminal
|
|
4. Open another code-server window
|
|
5. Run node ./out/node/entry.js with a file or directory argument
|
|
|
|
The file or directory should only open from the instance attached to that
|
|
terminal.
|
|
|
|
Index: code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
|
|
===================================================================
|
|
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
|
|
+++ code-server/lib/vscode/src/vs/workbench/contrib/terminal/browser/remoteTerminalBackend.ts
|
|
@@ -104,10 +104,14 @@ class RemoteTerminalBackend extends Base
|
|
}
|
|
const reqId = e.reqId;
|
|
const commandId = e.commandId;
|
|
+ const terminalId = e.persistentProcessId;
|
|
if (!allowedCommands.includes(commandId)) {
|
|
this._remoteTerminalChannel.sendCommandResult(reqId, true, 'Invalid remote cli command: ' + commandId);
|
|
return;
|
|
}
|
|
+ if (typeof terminalId !== "undefined" && !this._ptys.has(terminalId)) {
|
|
+ return
|
|
+ }
|
|
const commandArgs = e.commandArgs.map(arg => revive(arg));
|
|
try {
|
|
const result = await this._commandService.executeCommand(e.commandId, ...commandArgs);
|