Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions apps/pi-extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading