mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
- Create a worktree from a new or existing branch - Integrate a worktree branch into a target branch by merge commit or cherry-pick, with continue/abort on conflicts - Delete a worktree with keep, delete-local, or delete-local-and-remote branch options, using safe branch deletion for unmerged branches - Add a stash tab (list, push, apply, pop, drop) shared across a repository and its worktrees - Rename and delete branches, optionally deleting the remote branch and updating scheduled base branches - Detect in-progress merge, rebase, cherry-pick and revert operations and hand conflicts to an agent session - Generate commit messages from staged changes with the default model - Add a default git identity and saved per-repository identities written to git config - Unify git error mapping behind a typed error and one route helper; consolidate git mutations and cache invalidation - Update repository docs
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { ConfirmDestructiveDialog } from '@/components/ui/confirm-destructive-dialog'
|
|
|
|
interface DeleteDialogProps {
|
|
open: boolean
|
|
onOpenChange: (open: boolean) => void
|
|
onConfirm: () => void
|
|
onCancel: () => void
|
|
title: string
|
|
description: ReactNode
|
|
itemName?: string
|
|
isDeleting?: boolean
|
|
children?: ReactNode
|
|
}
|
|
|
|
export function DeleteDialog({
|
|
open,
|
|
onOpenChange,
|
|
onConfirm,
|
|
onCancel,
|
|
title,
|
|
description,
|
|
itemName,
|
|
isDeleting = false,
|
|
children
|
|
}: DeleteDialogProps) {
|
|
return (
|
|
<ConfirmDestructiveDialog
|
|
open={open}
|
|
onOpenChange={onOpenChange}
|
|
onConfirm={onConfirm}
|
|
onCancel={onCancel}
|
|
title={title}
|
|
description={description}
|
|
warning={itemName ? (
|
|
<>This will permanently delete "<span className="font-medium">{itemName}</span>". This action cannot be undone.</>
|
|
) : undefined}
|
|
confirmLabel={title.includes('Configuration') ? 'Delete Configuration' : 'Delete'}
|
|
pendingLabel="Deleting..."
|
|
isPending={isDeleting}
|
|
>
|
|
{children}
|
|
</ConfirmDestructiveDialog>
|
|
)
|
|
}
|