File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1+ import { useGitPanelView } from '@/views/webview'
2+
3+ export default function clearCommand ( ) {
4+ useGitPanelView ( ) . clearSelection ( )
5+ }
Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ import { useCommands } from 'reactive-vscode'
22
33import refreshCommand from './refresh'
44import diffCommand from './diff'
5+ import clearCommand from './clear'
56
67import { EXTENSION_SYMBOL } from '@/constant'
78
89export function initCommands ( ) {
910 useCommands ( {
1011 [ `${ EXTENSION_SYMBOL } .history.refresh` ] : refreshCommand ,
1112 [ `${ EXTENSION_SYMBOL } .openDiff` ] : diffCommand ( ) ,
13+ [ `${ EXTENSION_SYMBOL } .history.clear` ] : clearCommand ,
1214 } )
1315}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export const WEBVIEW_CHANNEL = {
99// vscode to webview channel
1010export const CHANNEL = {
1111 HISTORY : 'history' ,
12+ CLEAR_SELECTED : 'clear-selected' ,
1213}
1314
1415export const EXTENSION_SYMBOL = 'git-panel'
You can’t perform that action at this time.
0 commit comments