plan: cleanup - streamline remote option handling

This commit is contained in:
2026-03-23 09:33:39 +05:30
parent ff065300ad
commit 42f153a28f
@@ -307,8 +307,7 @@ export const cleanupTool = tool({
remote: tool.schema.union([ remote: tool.schema.union([
tool.schema.string().describe("Remote name to push deletions to. Error if doesn't exist."), tool.schema.string().describe("Remote name to push deletions to. Error if doesn't exist."),
tool.schema.literal(false).describe("Only delete local tags, don't push to remote."), tool.schema.literal(false).describe("Only delete local tags, don't push to remote."),
tool.schema.undefined().describe("Use first available remote from git remote -v."), ]).optional().describe("Remote handling: string=specific remote, false=local-only, undefined=first available remote"),
]).optional().describe("Remote handling: string=specific remote, false=local-only, undefined=first available"),
}, },
async execute(args, context) { async execute(args, context) {
// In plugin mode, we skip confirmation (force=true) // In plugin mode, we skip confirmation (force=true)
@@ -344,8 +343,8 @@ program
.description("Delete all archive tags from local and remote") .description("Delete all archive tags from local and remote")
.option("-f, --force", "Skip confirmation prompts", false) .option("-f, --force", "Skip confirmation prompts", false)
.option("-r, --remote <remote>", "Remote name to push deletions to (default: first remote from git remote -v)") .option("-r, --remote <remote>", "Remote name to push deletions to (default: first remote from git remote -v)")
.option("--no-remote", "Only delete local tags, skip remote", false) .option("--no-remote", "Only delete local tags, skip remote")
.action(async (options: { force: boolean; remote?: string; noRemote: boolean }) => { .action(async (options: { force: boolean; remote?: string|boolean }) => {
try { try {
const result = await cleanupArchiveTags({ const result = await cleanupArchiveTags({
force: options.force, force: options.force,