fix(cli): abort active turn before mode switch (#71)

This commit is contained in:
Saoud Rizwan
2026-05-07 23:02:40 -07:00
committed by GitHub
parent e215d3d91c
commit edf5ec52ba
@@ -442,6 +442,11 @@ export async function runInteractive(
if (mode !== "plan" && mode !== "act") {
return;
}
if (isRunning) {
pendingModeChange.current = mode;
sessionRuntime.abortAll();
return;
}
await sessionRuntime.applyMode(mode);
},
onModelChange: async () => {