FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use ptyHostService by code-asher · Pull Request #3308 · coder/code-server · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .ts  (4) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 3 additions & 0 deletions lib/vscode/coder.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ const vscodeEntryPoints = _.flatten([
buildfile.workerExtensionHost,
buildfile.workerNotebook,
buildfile.keyboardMaps,
// See ./src/vs/workbench/buildfile.desktop.js
buildfile.entrypoint("vs/platform/files/node/watcher/unix/watcherApp"),
buildfile.entrypoint("vs/platform/files/node/watcher/nsfw/watcherApp"),
buildfile.entrypoint('vs/platform/terminal/node/ptyHostMain'),
buildfile.entrypoint("vs/workbench/services/extensions/node/extensionHostProcess"),
]);

// See ./build/gulpfile.vscode.js
const vscodeResources = [
"out-build/vs/server/fork.js",
"!out-build/vs/server/doc/**",
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ export class PtyService extends Disposable implements IPtyService {
throw new Error('Attempt to create a process when attach object was provided');
}
const id = ++this._lastPtyId;
/**
* NOTE@coder: pass ID into TerminalProcess to fix compile.
*/
const process = new TerminalProcess(id, shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
const process = new TerminalProcess(shellLaunchConfig, cwd, cols, rows, env, executableEnv, windowsEnableConpty, this._logService);
process.onProcessData(event => this._onProcessData.fire({ id, event }));
process.onProcessExit(event => this._onProcessExit.fire({ id, event }));
if (process.onProcessOverrideDimensions) {
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,16 @@ interface IWriteObject {
}

export class TerminalProcess extends Disposable implements ITerminalChildProcess {
readonly id = 0;
readonly shouldPersist = false;

private static _lastKillOrStart = 0;

private _exitCode: number | undefined;
private _exitMessage: string | undefined;
private _closeTimeout: any;
/**
* NOTE@coder: set _ptyProcess and _currentTitle to protected
* to allow access from subclasses.
*
* We subclass it in src/vs/server/channel.ts
*/
protected _ptyProcess: pty.IPty | undefined;
protected _currentTitle: string = '';
private _ptyProcess: pty.IPty | undefined;
private _currentTitle: string = '';
private _processStartupComplete: Promise<void> | undefined;
private _isDisposed: boolean = false;
private _windowsShellHelper: WindowsShellHelper | undefined;
Expand Down Expand Up @@ -111,9 +106,7 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
private readonly _onProcessShellTypeChanged = this._register(new Emitter<TerminalShellType>());
public readonly onProcessShellTypeChanged = this._onProcessShellTypeChanged.event;

// NOTE@coder: add id to constructor
constructor(
public readonly id: number = 0,
private readonly _shellLaunchConfig: IShellLaunchConfig,
cwd: string,
cols: number,
Expand Down
Loading

Back | FazBrowse Home | New Git URL