@cimulate/copilot-widget 1.46.0 → 1.46.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.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
`@cimulate/copilot-widget` follows [Semantic Versioning](https://semver.org/). Each entry is a released `package.json` version (deployed on merge to `master`), newest first.
|
|
4
4
|
|
|
5
|
+
## 1.46.1 — 2026-10-02
|
|
6
|
+
|
|
7
|
+
- Messaging telemetry is now gated per release by a build-time switch, so each release explicitly opts in. Telemetry is not enabled in this release. No storefront action or configuration required.
|
|
8
|
+
|
|
5
9
|
## 1.46.0 — 2026-10-01
|
|
6
10
|
|
|
7
11
|
- Messaging mode: the widget now dispatches a `cimulate:cart-update` `CustomEvent` on `window` after a cart mutation (add to cart, quantity change, remove, or coupon) succeeds, so a storefront can re-fetch and re-render its own cart without a page reload. Because the agent edits the same server-side basket the storefront reads, the host listener can simply re-fetch/re-render its cart. The event `detail` (`CartUpdateDetail`) also describes **what changed**: a primary `action` (`"add" | "remove" | "quantity" | "coupon" | "mixed" | "unknown"`) and a `changes` array of per-line/coupon deltas, derived by diffing the previous cart snapshot against the newly settled one. These are advisory: `changes` carries per-line/coupon deltas, not totals, so the host must re-fetch its own cart for authoritative state. The distinction is self-contained: it comes purely from the diff (the agent's cart block reports only success/failure, never the action type), so an edit driven by the cart card's own controls (remove, quantity, coupon) and the same edit typed as free text in the composer produce the same payload. Removing the last item — whose reply is a plain "your cart is now empty" message with no cart block — is ambiguous (an emptied cart and a failed edit are indistinguishable), so it is reported as `unknown` and the host re-fetches to get the truth. A plain "show my cart" display doesn't trigger the event but refreshes the snapshot the next diff is taken against. `detail.status` is `"success"`. New exports on the messaging entry (and `CimulateMessaging` UMD global): `CART_UPDATE_EVENT`, `addCartUpdateListener`, `removeCartUpdateListener`; and the types `CartUpdateDetail`, `CartUpdateAction`, `CartChange`, `CartLineChange`, `CartCouponChange`. Additive and backward-compatible.
|