The runInTerminal request will try to run the subsequent commands from the same terminal again, and the previous run history will remain on the current screen. This is not clean for some users who want to be able to automatically clear the old terminal output before running the new program.
One suggestion is to add a new property such as clearTerminal to the RunInTerminalRequestArguments so that the client can perform additional clearing according to the new property.
interface RunInTerminalRequestArguments {
/**
* What kind of terminal to launch.
* Values: 'integrated', 'external', etc.
*/
kind?: 'integrated' | 'external';
/**
* Optional title of the terminal.
*/
title?: string;
/**
* Clear the current terminal before running a new terminal request.
*/
clearTerminal?: boolean;
/**
* Working directory for the command. For non-empty, valid paths this
* typically results in execution of a change directory command.
*/
cwd: string;
/**
* List of arguments. The first argument is the command to run.
*/
args: string[];
/**
* Environment key-value pairs that are added to or removed from the default
* environment.
*/
env?: { [key: string]: string | null; };
}
The runInTerminal request will try to run the subsequent commands from the same terminal again, and the previous run history will remain on the current screen. This is not clean for some users who want to be able to automatically clear the old terminal output before running the new program.
One suggestion is to add a new property such as
clearTerminalto theRunInTerminalRequestArgumentsso that the client can perform additional clearing according to the new property.