Add notes on unimplemented terminal events

This commit is contained in:
Asher 2020-11-19 11:24:52 -06:00
parent a6f8840009
commit 8ffe599796
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 16 additions and 7 deletions

View File

@ -1466,10 +1466,10 @@ index 0000000000000000000000000000000000000000..6ce56bec114a6d8daf5dd3ded945ea78
+}
diff --git a/src/vs/server/node/channel.ts b/src/vs/server/node/channel.ts
new file mode 100644
index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c79bd86380
index 0000000000000000000000000000000000000000..7081bbf178c660803830675a4d8d596c5d0b7821
--- /dev/null
+++ b/src/vs/server/node/channel.ts
@@ -0,0 +1,860 @@
@@ -0,0 +1,869 @@
+import { field, logger } from '@coder/logger';
+import { Server } from '@coder/node-browser';
+import * as os from 'os';
@ -2042,13 +2042,17 @@ index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c7
+ this.dispose();
+ });
+
+ // TODO: exec command event
+ // TODO: I think `execCommand` must have something to do with running
+ // commands on the terminal that will do things in VS Code but we already
+ // have that functionality via a socket so I'm not sure what this is for.
+ // type: 'execCommand';
+ // reqId: number;
+ // commandId: string;
+ // commandArgs: any[];
+
+ // TODO: orphan question event
+ // TODO: Maybe this is to ask if the terminal is currently attached to
+ // anything? But we already know that on account of whether anything is
+ // listening to our event emitter.
+ // type: 'orphan?';
+ }
+
@ -2307,16 +2311,21 @@ index 0000000000000000000000000000000000000000..95d0d3c51e4a25a9d7d0cada90d031c7
+ return this.getTerminal(args.id).getCwd();
+ }
+
+ private async sendCommandResultToTerminalProcess(args: terminal.ISendCommandResultToTerminalProcessArguments): Promise<void> {
+ private async sendCommandResultToTerminalProcess(_: terminal.ISendCommandResultToTerminalProcessArguments): Promise<void> {
+ // NOTE: Not required unless we implement the `execCommand` event, see above.
+ throw new Error('not implemented');
+ }
+
+ private async orphanQuestionReply(args: terminal.IOrphanQuestionReplyArgs): Promise<void> {
+ private async orphanQuestionReply(_: terminal.IOrphanQuestionReplyArgs): Promise<void> {
+ // NOTE: Not required unless we implement the `orphan?` event, see above.
+ throw new Error('not implemented');
+ }
+
+ private async listTerminals(_: terminal.IListTerminalsArgs): Promise<terminal.IRemoteTerminalDescriptionDto[]> {
+ // TODO: args.isInitialization
+ // TODO: args.isInitialization. Maybe this is to have slightly different
+ // behavior when first listing terminals but I don't know what you'd want to
+ // do differently. Maybe it's to reset the terminal dispose timeouts or
+ // something like that, but why not do it each time you list?
+ return Promise.all(Array.from(this.terminals).map(async ([id, terminal]) => {
+ const cwd = await terminal.getCwd();
+ return {