Skip to content

Commit e2d46ee

Browse files
authored
Merge branch 'release/1.77' into merogge/click
2 parents 0ca8cc5 + e344f1f commit e2d46ee

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code-oss-dev",
3-
"version": "1.77.1",
3+
"version": "1.77.2",
44
"distro": "9b27f67c15920833310305fce2d42cf2426f34ee",
55
"author": {
66
"name": "Microsoft Corporation"

src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR, TERMINAL_COMMAND_
2626
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
2727
import { IDecoration, ITerminalAddon, Terminal } from 'xterm';
2828
import { AudioCue, IAudioCueService } from 'vs/platform/audioCues/browser/audioCueService';
29+
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
2930

3031
interface IDisposableDecoration { decoration: IDecoration; disposables: IDisposable[]; exitCode?: number; markProperties?: IMarkProperties }
3132

@@ -52,7 +53,8 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
5253
@ILifecycleService lifecycleService: ILifecycleService,
5354
@ICommandService private readonly _commandService: ICommandService,
5455
@IInstantiationService instantiationService: IInstantiationService,
55-
@IAudioCueService private readonly _audioCueService: IAudioCueService
56+
@IAudioCueService private readonly _audioCueService: IAudioCueService,
57+
@INotificationService private readonly _notificationService: INotificationService
5658
) {
5759
super();
5860
this._register(toDisposable(() => this._dispose()));
@@ -349,7 +351,15 @@ export class DecorationAddon extends Disposable implements ITerminalAddon {
349351
const labelRun = localize("terminal.rerunCommand", 'Rerun Command');
350352
actions.push({
351353
class: undefined, tooltip: labelRun, id: 'terminal.rerunCommand', label: labelRun, enabled: true,
352-
run: () => this._onDidRequestRunCommand.fire({ command })
354+
run: async () => {
355+
this._notificationService.prompt(Severity.Info, localize('rerun', 'Do you want to run the command: {0}', command.command), [{
356+
label: localize('yes', 'Yes'),
357+
run: () => this._onDidRequestRunCommand.fire({ command })
358+
}, {
359+
label: localize('no', 'No'),
360+
run: () => { }
361+
}]);
362+
}
353363
});
354364
const labelCopy = localize("terminal.copyCommand", 'Copy Command');
355365
actions.push({

0 commit comments

Comments
 (0)