feat: add git stash management
Add a Stashes dialog with create, apply, pop, and drop actions Include untracked files automatically when stashing Show file counts for current changes and stash entries
This commit is contained in:
@@ -210,6 +210,13 @@ export const createVSCodeGitAPI = (): GitAPI => ({
|
||||
});
|
||||
},
|
||||
|
||||
listGitStashes: async (directory: string) => sendBridgeMessage('api:git/stashes', { directory }),
|
||||
countGitStashFiles: async (directory: string, refs: string[]) => sendBridgeMessage('api:git/stashes/file-counts', { directory, refs }),
|
||||
stashGitChanges: async (directory: string, options?: { message?: string }) => sendBridgeMessage('api:git/stash', { directory, message: options?.message }),
|
||||
applyGitStash: async (directory: string, options: { ref: string }) => sendBridgeMessage('api:git/stash/apply', { directory, ref: options.ref }),
|
||||
popGitStash: async (directory: string, options: { ref: string }) => sendBridgeMessage('api:git/stash/pop', { directory, ref: options.ref }),
|
||||
dropGitStash: async (directory: string, options: { ref: string }) => sendBridgeMessage('api:git/stash/drop', { directory, ref: options.ref }),
|
||||
|
||||
checkoutBranch: async (directory: string, branch: string): Promise<{ success: boolean; branch: string }> => {
|
||||
return sendBridgeMessage<{ success: boolean; branch: string }>('api:git/checkout', {
|
||||
directory,
|
||||
|
||||
Reference in New Issue
Block a user