@granular-software/sdk 0.4.76 → 0.4.77

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.
package/dist/index.mjs CHANGED
@@ -15234,8 +15234,11 @@ import { ${tools[0]?.name || "example"} } from "@granular/actions/backend";
15234
15234
  this.emit("prompt:answered", { ...prompt, status: "answered" });
15235
15235
  return;
15236
15236
  }
15237
+ const previous = this.promptCache.get(prompt.id);
15237
15238
  this.promptCache.set(prompt.id, prompt);
15238
- this.emit("prompt", prompt);
15239
+ if (!previous || promptSnapshotFingerprint(previous) !== promptSnapshotFingerprint(prompt)) {
15240
+ this.emit("prompt", prompt);
15241
+ }
15239
15242
  };
15240
15243
  this.client.on("prompt", emitPrompt);
15241
15244
  this.client.on("prompt.request", emitPrompt);