refactor: remove unused delete session worktree options
This commit is contained in:
@@ -413,13 +413,7 @@ export const SessionDialogs: React.FC = () => {
|
||||
const target = deleteDialog.sessions[0];
|
||||
const success = isWorktreeDelete
|
||||
? await archiveSession(target.id)
|
||||
: await deleteSession(target.id, {
|
||||
// In "worktree" mode, remove the selected worktree explicitly below.
|
||||
// Don't try to derive worktree removal from per-session metadata (may be missing).
|
||||
archiveWorktree: false,
|
||||
deleteRemoteBranch: removeRemoteBranch,
|
||||
deleteLocalBranch,
|
||||
});
|
||||
: await deleteSession(target.id);
|
||||
if (!success) {
|
||||
toast.error(isWorktreeDelete
|
||||
? t('sessions.sidebar.session.archive.error')
|
||||
|
||||
@@ -811,15 +811,6 @@ export type DeleteSessionOptions = {
|
||||
* confirmation spans a runtime switch.
|
||||
*/
|
||||
expectedRuntimeKey?: string
|
||||
/**
|
||||
* Worktree flags accepted from `SessionDialogs`. This action does not consume
|
||||
* them today — the dialog performs worktree removal itself. They are declared
|
||||
* so the call site stays type-checked instead of hidden behind an untyped
|
||||
* bag; wiring or removing them is separate follow-up work.
|
||||
*/
|
||||
archiveWorktree?: boolean
|
||||
deleteRemoteBranch?: boolean
|
||||
deleteLocalBranch?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user