@@ -1466,10 +1466,10 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
1466
1466
+ }
1467
1467
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
1468
1468
new file mode 100644
1469
- index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c79bd86380
1469
+ index 0000000000000000000000000000000000000000..7081bbf178c660803830675a4d8d596c5d0b7821
1470
1470
--- /dev/null
1471
1471
+++ b/src/vs/server/node/channel.ts
1472
- @@ -0,0 +1,860 @@
1472
+ @@ -0,0 +1,869 @@
1473
1473
+ import { field, logger } from '@coder/logger';
1474
1474
+ import { Server } from '@coder/node-browser';
1475
1475
+ import * as os from 'os';
@@ -2042,13 +2042,17 @@ index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c7
2042
2042
+ this.dispose();
2043
2043
+ });
2044
2044
+
2045
- + // TODO: exec command event
2045
+ + // TODO: I think `execCommand` must have something to do with running
2046
+ + // commands on the terminal that will do things in VS Code but we already
2047
+ + // have that functionality via a socket so I'm not sure what this is for.
2046
2048
+ // type: 'execCommand';
2047
2049
+ // reqId: number;
2048
2050
+ // commandId: string;
2049
2051
+ // commandArgs: any[];
2050
2052
+
2051
- + // TODO: orphan question event
2053
+ + // TODO: Maybe this is to ask if the terminal is currently attached to
2054
+ + // anything? But we already know that on account of whether anything is
2055
+ + // listening to our event emitter.
2052
2056
+ // type: 'orphan?';
2053
2057
+ }
2054
2058
+
@@ -2307,16 +2311,21 @@ index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c7
2307
2311
+ return this.getTerminal(args.id).getCwd();
2308
2312
+ }
2309
2313
+
2310
- + private async sendCommandResultToTerminalProcess(args: terminal.ISendCommandResultToTerminalProcessArguments): Promise<void> {
2314
+ + private async sendCommandResultToTerminalProcess(_: terminal.ISendCommandResultToTerminalProcessArguments): Promise<void> {
2315
+ + // NOTE: Not required unless we implement the `execCommand` event, see above.
2311
2316
+ throw new Error('not implemented');
2312
2317
+ }
2313
2318
+
2314
- + private async orphanQuestionReply(args: terminal.IOrphanQuestionReplyArgs): Promise<void> {
2319
+ + private async orphanQuestionReply(_: terminal.IOrphanQuestionReplyArgs): Promise<void> {
2320
+ + // NOTE: Not required unless we implement the `orphan?` event, see above.
2315
2321
+ throw new Error('not implemented');
2316
2322
+ }
2317
2323
+
2318
2324
+ private async listTerminals(_: terminal.IListTerminalsArgs): Promise<terminal.IRemoteTerminalDescriptionDto[]> {
2319
- + // TODO: args.isInitialization
2325
+ + // TODO: args.isInitialization. Maybe this is to have slightly different
2326
+ + // behavior when first listing terminals but I don't know what you'd want to
2327
+ + // do differently. Maybe it's to reset the terminal dispose timeouts or
2328
+ + // something like that, but why not do it each time you list?
2320
2329
+ return Promise.all(Array.from(this.terminals).map(async ([id, terminal]) => {
2321
2330
+ const cwd = await terminal.getCwd();
2322
2331
+ return {
0 commit comments