@cimulate/copilot-widget 1.55.1 → 1.55.2
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 +5 -0
- package/README.md +4 -2
- package/dist/messaging.d.ts +6 -5
- package/dist/messaging.es.js +7067 -7105
- package/dist/messaging.umd.js +23 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
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.55.2 — 2026-11-10
|
|
6
|
+
|
|
7
|
+
- Messaging `eventHandlers.cart.update` now updates only the internal cart-diff baseline. It no longer rewrites the latest cart message or changes its summary, totals, payment controls, or historical content. Empty baskets still seed the next diff, and the call does not emit `cimulate:cart-update`.
|
|
8
|
+
- Storefront cart baselines can be supplied as soon as the messaging API is available, before mount or during startup. The latest pre-mount value is retained, startup history and duplicate replay cannot overwrite a newer baseline, and snapshots supplied synchronously by host callbacks are preserved. Natural agent cart messages still render normally. Without a storefront seed, the latest restored cart initializes the baseline before the next operation.
|
|
9
|
+
|
|
5
10
|
## 1.55.1 — 2026-11-06
|
|
6
11
|
|
|
7
12
|
- With page context enabled, queued messages wait for the agent welcome before sending. If welcome does not arrive within 12 seconds, the send fails with a welcome timeout instead of waiting indefinitely. Integrations without page context keep the existing fallback.
|
package/README.md
CHANGED
|
@@ -230,9 +230,11 @@ eventHandlers.cart.update({
|
|
|
230
230
|
});
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
The object is the full basket (`CartDetails`), not a quantity stub. An empty `items` array means an empty cart. A payload without an `items` array is ignored.
|
|
233
|
+
The object is the full basket (`CartDetails`), not a quantity stub. An empty `items` array means an empty cart. A payload without an `items` array is ignored. The latest valid call made before the widget mounts is retained and applied at mount.
|
|
234
234
|
|
|
235
|
-
Call it
|
|
235
|
+
Call it as soon as the messaging API is available and the storefront has a fresh basket, including before mount or during startup. Startup history and duplicate replay cannot replace a storefront seed; later live agent cart responses advance the baseline normally. Call again after storefront basket changes. The storefront must discard stale fetch results rather than submit them as new snapshots.
|
|
236
|
+
|
|
237
|
+
Only the internal cart-diff baseline is updated. The call does not emit `cimulate:cart-update`. The next agent cart result is compared with that basket.
|
|
236
238
|
|
|
237
239
|
## Linting and pre-commit hooks
|
|
238
240
|
|
package/dist/messaging.d.ts
CHANGED
|
@@ -1515,14 +1515,15 @@ declare type ToolResultsResponse = {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
|
|
1517
1517
|
/**
|
|
1518
|
-
*
|
|
1518
|
+
* Set the internal basket baseline for subsequent cart-change diffs.
|
|
1519
1519
|
* Pass the full basket. `items` is required; an empty array means an empty cart.
|
|
1520
1520
|
* A payload without an `items` array is ignored.
|
|
1521
1521
|
*
|
|
1522
|
-
* Call
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1522
|
+
* Call once the messaging API is available, including before widget mount or
|
|
1523
|
+
* during conversation startup. The latest pre-mount call is retained until mount.
|
|
1524
|
+
* A storefront baseline takes precedence over startup history; later live agent
|
|
1525
|
+
* carts advance it normally. No messages or cart components are changed, and the
|
|
1526
|
+
* call does not emit `cimulate:cart-update`.
|
|
1526
1527
|
*/
|
|
1527
1528
|
declare function updateCart(cart: CartDetails): void;
|
|
1528
1529
|
|