Add comment explaining Process->Api event change

This commit is contained in:
Daniel Imms
2021-04-01 07:44:39 -07:00
parent 4f6732316e
commit 9437d13aa6

View File

@@ -276,6 +276,11 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
}
public $sendProcessTitle(terminalId: number, title: string): void {
// Since title events can only come from vscode.Pseudoterminals right now, these are routed
// directly to the instance as API source events such that they will replace the initial
// `name` property provided for the Pseudoterminal. If we support showing both Api and
// Process titles at the same time we may want to pass this through as a Process source
// event.
const instance = this._terminalService.getInstanceFromId(terminalId);
if (instance) {
instance.setTitle(title, TitleEventSource.Api);