Add a new presentation option to clear the terminal before executing task (#61329)

Fixes #30058
This commit is contained in:
Alex Ross
2018-10-22 09:58:15 +02:00
committed by GitHub
parent 8e71de66ff
commit e3f803d92c
9 changed files with 37 additions and 7 deletions

View File

@@ -91,7 +91,7 @@ namespace TaskPresentationOptionsDTO {
}
export function to(value: TaskPresentationOptionsDTO): PresentationOptions {
if (value === void 0 || value === null) {
return { reveal: RevealKind.Always, echo: true, focus: false, panel: PanelKind.Shared, showReuseMessage: true };
return { reveal: RevealKind.Always, echo: true, focus: false, panel: PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false };
}
return Objects.assign(Object.create(null), value);
}

View File

@@ -231,14 +231,15 @@ namespace TaskPanelKind {
namespace PresentationOptions {
export function from(value: vscode.TaskPresentationOptions): tasks.PresentationOptions {
if (value === void 0 || value === null) {
return { reveal: tasks.RevealKind.Always, echo: true, focus: false, panel: tasks.PanelKind.Shared, showReuseMessage: true };
return { reveal: tasks.RevealKind.Always, echo: true, focus: false, panel: tasks.PanelKind.Shared, showReuseMessage: true, clearBeforeExecuting: false };
}
return {
reveal: TaskRevealKind.from(value.reveal),
echo: value.echo === void 0 ? true : !!value.echo,
focus: !!value.focus,
panel: TaskPanelKind.from(value.panel),
showReuseMessage: value.showReuseMessage === void 0 ? true : !!value.showReuseMessage
showReuseMessage: value.showReuseMessage === void 0 ? true : !!value.showReuseMessage,
clearBeforeExecuting: value.clearBeforeExecuting === void 0 ? false : !!value.clearBeforeExecuting,
};
}
}

View File

@@ -16,6 +16,7 @@ export interface TaskPresentationOptionsDTO {
focus?: boolean;
panel?: number;
showReuseMessage?: boolean;
clearBeforeExecuting?: boolean;
}
export interface ExecutionOptionsDTO {