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([
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.undefined().describe("Use first available remote from git remote -v."),
]).optional().describe("Remote handling: string=specific remote, false=local-only, undefined=first available"),
]).optional().describe("Remote handling: string=specific remote, false=local-only, undefined=first available remote"),
},
async execute(args, context) {
// In plugin mode, we skip confirmation (force=true)
@@ -344,8 +343,8 @@ program
.description("Delete all archive tags from local and remote")
.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("--no-remote", "Only delete local tags, skip remote", false)
.action(async (options: { force: boolean; remote?: string; noRemote: boolean }) => {
.option("--no-remote", "Only delete local tags, skip remote")
.action(async (options: { force: boolean; remote?: string|boolean }) => {
try {
const result = await cleanupArchiveTags({
force: options.force,