@narumitw/pi-goal 0.17.0 → 0.17.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/runtime.ts +2 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-goal",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Pi extension for autonomous /goal completion with opt-in experimental ordered queues.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/runtime.ts CHANGED
@@ -203,7 +203,7 @@ export class GoalRuntime {
203
203
  this.continuationIntent = undefined;
204
204
  this.continuationDelivery = intent;
205
205
  try {
206
- this.pi.sendUserMessage(intent.prompt);
206
+ this.pi.sendUserMessage(intent.prompt, { deliverAs: "followUp" });
207
207
  return true;
208
208
  } catch (error) {
209
209
  if (this.continuationDelivery?.marker === intent.marker) {
@@ -757,10 +757,7 @@ export function truncateNotification(value: string) {
757
757
 
758
758
  async function sendPrompt(pi: ExtensionAPI, ctx: StatusContext, prompt: string) {
759
759
  try {
760
- const sent = ctx.isIdle?.()
761
- ? (pi.sendUserMessage(prompt) as void | Promise<void>)
762
- : (pi.sendUserMessage(prompt, { deliverAs: "followUp" }) as void | Promise<void>);
763
- await sent;
760
+ await pi.sendUserMessage(prompt, { deliverAs: "followUp" });
764
761
  return true;
765
762
  } catch (error) {
766
763
  ctx.ui.notify(`Goal prompt failed: ${formatError(error)}`, "error");