Merge pull request #1543 from Tibsfox/fix/workstream-set-requires-name-1527

fix(workstream): require name arg for set, add --clear flag
This commit is contained in:
Tom Boucher
2026-04-01 17:43:15 -04:00
committed by GitHub
2 changed files with 24 additions and 2 deletions

View File

@@ -339,9 +339,13 @@ function cmdWorkstreamComplete(cwd, name, options, raw) {
// ─── Active Workstream Commands ──────────────────────────────────────────────
function cmdWorkstreamSet(cwd, name, raw) {
if (!name) {
if (!name || name === '--clear') {
if (name !== '--clear') {
error('Workstream name required. Usage: workstream set <name> (or workstream set --clear to unset)');
}
const previous = getActiveWorkstream(cwd);
setActiveWorkstream(cwd, null);
output({ active: null, cleared: true }, raw);
output({ active: null, cleared: true, previous: previous || null }, raw);
return;
}