mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
fix: close cli options - improve negative options
This commit is contained in:
+5
-5
@@ -44,16 +44,16 @@ program
|
|||||||
.command("close")
|
.command("close")
|
||||||
.description("Close a multi-model tmux session")
|
.description("Close a multi-model tmux session")
|
||||||
.argument("<session-name>", "Name of the tmux session to close")
|
.argument("<session-name>", "Name of the tmux session to close")
|
||||||
.option("-c, --cleanup-worktrees", "Remove worktrees and delete branches", true)
|
.option("--keep-worktrees", "Do not remove worktrees and delete branches", false)
|
||||||
.option("-t, --add-tags", "Create archive tags before deleting branches", true)
|
.option("--no-tags", "Create archive tags before deleting branches", false)
|
||||||
.option("-f, --force", "Skip confirmation prompts", false)
|
.option("-f, --force", "Skip confirmation prompts", false)
|
||||||
.action(async (sessionName: string, options: { cleanupWorktrees: boolean; force: boolean; addTags: boolean }) => {
|
.action(async (sessionName: string, options: { keepWorktrees: boolean; force: boolean; tags: boolean }) => {
|
||||||
try {
|
try {
|
||||||
const result = await closeMultiModel({
|
const result = await closeMultiModel({
|
||||||
sessionName,
|
sessionName,
|
||||||
cleanupWorktrees: options.cleanupWorktrees,
|
cleanupWorktrees: !options.keepWorktrees,
|
||||||
force: options.force,
|
force: options.force,
|
||||||
createArchiveTags: options.addTags,
|
createArchiveTags: options.tags,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user