mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-12 11:08:34 -05:00
Adds new GitLens custom view
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
'use strict';
|
||||
import { MessageItem, window } from 'vscode';
|
||||
import { Command, CommandContext, Commands } from './common';
|
||||
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
|
||||
import { GlyphChars } from '../constants';
|
||||
import { GitService } from '../gitService';
|
||||
import { GitService, GitStashCommit } from '../gitService';
|
||||
import { Logger } from '../logger';
|
||||
import { CommandQuickPickItem } from '../quickPicks';
|
||||
import { StashCommitNode } from '../views/stashCommitNode';
|
||||
|
||||
export interface StashDeleteCommandArgs {
|
||||
confirm?: boolean;
|
||||
@@ -21,12 +20,9 @@ export class StashDeleteCommand extends Command {
|
||||
}
|
||||
|
||||
protected async preExecute(context: CommandContext, args: StashDeleteCommandArgs = { confirm: true }) {
|
||||
if (context.type === 'view' && context.node instanceof StashCommitNode) {
|
||||
if (isCommandViewContextWithCommit<GitStashCommit>(context)) {
|
||||
args = { ...args };
|
||||
|
||||
const stash = context.node.commit;
|
||||
args.stashItem = { stashName: stash.stashName, message: stash.message };
|
||||
|
||||
args.stashItem = { stashName: context.node.commit.stashName, message: context.node.commit.message };
|
||||
return this.execute(args);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user