breaking:drop command part path
This commit is contained in:
52
index.ts
52
index.ts
@@ -35,8 +35,6 @@ import {
|
|||||||
formatDuration,
|
formatDuration,
|
||||||
} from "./src/utils";
|
} from "./src/utils";
|
||||||
|
|
||||||
const COMMANDS = ["plan", "resume", "reset"] as const;
|
|
||||||
|
|
||||||
type ExecutionMode = "parallel" | "sequential";
|
type ExecutionMode = "parallel" | "sequential";
|
||||||
|
|
||||||
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
||||||
@@ -663,50 +661,12 @@ export default function ralpiLoopExtension(pi: ExtensionAPI): void {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const command = parts[0];
|
// Subcommands (run/plan/resume/reset) are handled by the dash commands
|
||||||
switch (command) {
|
// below — /ralpi only dispatches no-args → plan and path → run.
|
||||||
case "run":
|
ctx.ui.notify(
|
||||||
return handleRun(
|
`Unknown: ${parts[0]}. Use /ralpi-run, /ralpi-plan, /ralpi-resume, or /ralpi-reset`,
|
||||||
ctx,
|
"error",
|
||||||
parts.slice(1),
|
);
|
||||||
sendProgress,
|
|
||||||
ctx.model,
|
|
||||||
pi.getThinkingLevel(),
|
|
||||||
);
|
|
||||||
case "plan":
|
|
||||||
pi.sendUserMessage("@task-manager");
|
|
||||||
ctx.ui.notify("Opening Task Manager...", "info");
|
|
||||||
return;
|
|
||||||
case "resume":
|
|
||||||
return handleResume(
|
|
||||||
ctx,
|
|
||||||
parts.slice(1),
|
|
||||||
sendProgress,
|
|
||||||
ctx.model,
|
|
||||||
pi.getThinkingLevel(),
|
|
||||||
);
|
|
||||||
case "reset":
|
|
||||||
return handleReset(ctx, parts.slice(1));
|
|
||||||
default: {
|
|
||||||
// Auto-discover progress and offer resume
|
|
||||||
const found = findProgressFile(ctx.cwd);
|
|
||||||
if (found) {
|
|
||||||
ctx.ui.notify(
|
|
||||||
`Unknown command: ${command}\n\nFound existing progress in ${
|
|
||||||
found.path
|
|
||||||
}\nUse /ralpi-resume to continue.\n\nAvailable: ${COMMANDS.join(
|
|
||||||
", ",
|
|
||||||
)}`,
|
|
||||||
"warning",
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
ctx.ui.notify(
|
|
||||||
`Unknown command: ${command}\nAvailable: ${COMMANDS.join(", ")}`,
|
|
||||||
"error",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user