@phi-code-admin/phi-code 0.61.10 → 0.61.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -489,7 +489,10 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
489
489
  { agent: "review", label: "🔍 Reviewing", instruction: `Review code quality, security, and performance. Fix any issues found.\n\nProject: ${description}` },
490
490
  ];
491
491
 
492
- // Execute each phase sequentially using sendUserMessage + waitForIdle
492
+ // Execute each phase sequentially
493
+ // Wait for idle first (command handler may still be "processing")
494
+ await ctx.waitForIdle();
495
+
493
496
  for (const phase of phases) {
494
497
  const agentDef = agentDefs.get(phase.agent);
495
498
  const systemPromptNote = agentDef?.systemPrompt
@@ -498,7 +501,12 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
498
501
 
499
502
  ctx.ui.notify(`\n${phase.label} (agent: ${phase.agent})...`, "info");
500
503
 
501
- pi.sendUserMessage(phase.instruction + systemPromptNote, { deliverAs: "followUp" });
504
+ // Send message use followUp if agent is still streaming, direct otherwise
505
+ try {
506
+ pi.sendUserMessage(phase.instruction + systemPromptNote);
507
+ } catch {
508
+ pi.sendUserMessage(phase.instruction + systemPromptNote, { deliverAs: "followUp" });
509
+ }
502
510
  await ctx.waitForIdle();
503
511
  }
504
512
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-code-admin/phi-code",
3
- "version": "0.61.10",
3
+ "version": "0.61.11",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {