feat: add source control action to abort merge (#2092)

Co-authored-by: Orca <help@stably.ai>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
This commit is contained in:
Leynier Gutiérrez González
2026-05-27 14:59:23 -07:00
committed by GitHub
co-authored by Orca brennanb2025
parent a65f7b4216
commit 659fe79226
25 changed files with 478 additions and 7 deletions
+3
View File
@@ -197,6 +197,7 @@ describe('git RPC methods', () => {
defaultModelId: 'auto'
}),
cancelRuntimeGenerateCommitMessage: vi.fn().mockResolvedValue({ ok: true }),
abortRuntimeGitMerge: vi.fn().mockResolvedValue({ ok: true }),
pushRuntimeGit: vi.fn().mockResolvedValue({ ok: true }),
getRuntimeGitRemoteFileUrl: vi.fn().mockResolvedValue('https://example.com/file#L3')
} as unknown as OrcaRuntimeService
@@ -216,6 +217,7 @@ describe('git RPC methods', () => {
await dispatcher.dispatch(
makeRequest('git.cancelGenerateCommitMessage', { worktree: 'id:wt-1' })
)
await dispatcher.dispatch(makeRequest('git.abortMerge', { worktree: 'id:wt-1' }))
await dispatcher.dispatch(
makeRequest('git.push', {
worktree: 'id:wt-1',
@@ -237,6 +239,7 @@ describe('git RPC methods', () => {
agentCmdOverrides: { cursor: 'cursor-agent' }
})
expect(runtime.cancelRuntimeGenerateCommitMessage).toHaveBeenCalledWith('id:wt-1')
expect(runtime.abortRuntimeGitMerge).toHaveBeenCalledWith('id:wt-1')
expect(runtime.pushRuntimeGit).toHaveBeenCalledWith(
'id:wt-1',
true,