refactor(cli): extract interactive menu logic into reusable module

This commit is contained in:
2026-06-11 18:11:02 +08:00
parent 6ff541284e
commit 44771691ff
5 changed files with 364 additions and 376 deletions
+2 -2
View File
@@ -151,7 +151,7 @@ export async function createPR(
}
const match = stdout.match(/(https?:\/\/[^\s]+)/);
return match ? match[1] : stdout.trim();
return match?.[1] ?? stdout.trim();
}
const args = [
@@ -180,5 +180,5 @@ export async function createPR(
}
const match = stdout.match(/(https?:\/\/[^\s]+)/);
return match ? match[1] : stdout.trim();
return match?.[1] ?? stdout.trim();
}