@gymmymac/bob-widget 3.2.13 → 3.2.16
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 +23 -0
- package/dist/index.js +21 -21
- package/dist/index.mjs +1946 -1933
- package/dist/types/context.d.ts +5 -0
- package/dist/types/product.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ All notable changes to the `@gymmymac/bob-widget` package will be documented in
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v3.2.15] - 2026-03-11
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Server-side add-to-cart now emits `cart_updated` SSE event** — When Bob's AI adds items to the cart via the `add_to_cart` tool, the edge function now correctly populates `_cartItemsToEmit` with full `CartItem`-shaped payloads (`product_id`, `product_name`, `quantity`, `unit_price`, `vehicle_id`, `sku`, `brand`), so the `cart_updated` SSE event fires to the widget.
|
|
13
|
+
- **Widget fires `onAddToCart` for server-initiated cart adds** — `useBobChat` now calls `onAddToCart` for each item in a `cart_updated` event, ensuring the host site handles AI-initiated cart adds identically to manual UI clicks.
|
|
14
|
+
- **`cart_updated` payload shape aligned to `CartItem` interface** — Previously sent `{ productName, quantity }`, now sends full `CartItem` fields matching the host contract.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`add_vehicle_to_garage` tool** — Bob can now save a confirmed vehicle to the customer's garage via the Partner API. Guardrailed: requires confirmed REGO lookup and customer email. Bob proactively offers to save new vehicles.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## [v3.2.14] - 2026-03-09
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **onAddToCart payload now includes vehicle_id and bundle metadata** — Both manual product clicks and bundle tier adds now populate `vehicle_id` from the identified vehicle, fixing silent cart drops on CARFIX integration.
|
|
27
|
+
- **Bundle tier adds now carry full metadata** — `MobileProductColumn` and `ServicePackageDetailView` attach `_bundleMeta` (is_bundle_item, bundle_discount_percentage, service_package_name, service_package_id, quality_tier) to every product in a tier add, which `Bob.tsx` spreads into the `CartItem` payload.
|
|
28
|
+
- **Unified add-to-cart handler** — Extracted duplicated inline handlers into a single `handleAddToCart` callback in `Bob.tsx`, eliminating inconsistency between mobile and inline variants.
|
|
29
|
+
- **CartItem type extended** — Added `is_bundle_item`, `bundle_discount_percentage`, `service_package_name`, `service_package_id`, and `quality_tier` fields to match the CARFIX contract.
|
|
30
|
+
|
|
8
31
|
## [v3.2.13] - 2026-03-09
|
|
9
32
|
|
|
10
33
|
### Fixed
|