mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
fix(pi-extension): avoid visible approval follow-up queue (#843)
This commit is contained in:
@@ -1165,9 +1165,16 @@ Execute each step in order. After completing a step, include [DONE:n] in your re
|
||||
pi.on("agent_end", async (_event, ctx) => {
|
||||
if (phase === "executing" && justApprovedPlan) {
|
||||
justApprovedPlan = false;
|
||||
pi.sendUserMessage("Continue with the approved plan.", {
|
||||
deliverAs: "followUp",
|
||||
});
|
||||
let attempts = 0;
|
||||
const continueWhenIdle = (): void => {
|
||||
if (!ctx.isIdle()) {
|
||||
attempts += 1;
|
||||
if (attempts <= 200) setTimeout(continueWhenIdle, 50);
|
||||
return;
|
||||
}
|
||||
pi.sendUserMessage("Continue with the approved plan.");
|
||||
};
|
||||
setTimeout(continueWhenIdle, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user