@gymmymac/bob-widget 3.2.16 → 3.2.17

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 CHANGED
@@ -5,6 +5,23 @@ 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.17] - 2026-03-21
9
+
10
+ ### Fixed
11
+
12
+ - **`identifiedVehicle` now persisted in session** — Previously, navigating away and returning restored messages and conversation state but lost the identified vehicle. This caused `vehicleContext` to be `null` in subsequent requests, breaking `add_to_cart` and other vehicle-dependent tools. The vehicle is now saved/restored alongside all other session data.
13
+
14
+ ---
15
+
16
+ ## [v3.2.16] - 2026-03-21
17
+
18
+ ### Added
19
+
20
+ - **Session persistence via `sessionStorage`** — Bob's conversation (messages, vehicle candidates, conversation state) is now saved to `sessionStorage` and restored on mount if less than 4 hours old. Navigating away and returning preserves the full chat context. Cleared on explicit conversation reset.
21
+ - **`initialVehicle` prop on `BobStandalone`** — Hosts can pass a pre-identified vehicle to skip the REGO lookup flow. Session takes priority: if a valid session exists, `initialVehicle` is ignored.
22
+
23
+ ---
24
+
8
25
  ## [v3.2.15] - 2026-03-11
9
26
 
10
27
  ### Fixed
@@ -21,6 +21,14 @@ interface BobProps {
21
21
  * @default false
22
22
  */
23
23
  embedded?: boolean;
24
+ /** Optional pre-identified vehicle — Bob skips REGO lookup */
25
+ initialVehicle?: {
26
+ vehicle_id: string | number;
27
+ make: string;
28
+ model: string;
29
+ year: number;
30
+ [key: string]: unknown;
31
+ };
24
32
  }
25
33
  export declare const Bob: React.FC<BobProps>;
26
34
  export {};
@@ -24,8 +24,16 @@ interface UseBobChatProps {
24
24
  onVariantSelectionRequired?: (variants: VariantCard[], make: string, model: string) => void;
25
25
  /** Ref containing current shelf category names for post-stream scroll matching */
26
26
  shelfCategoriesRef?: React.RefObject<Set<string>>;
27
+ /** Optional pre-identified vehicle — skips REGO lookup when no session exists */
28
+ initialVehicle?: {
29
+ vehicle_id: string | number;
30
+ make: string;
31
+ model: string;
32
+ year: number;
33
+ [key: string]: unknown;
34
+ };
27
35
  }
28
- export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired, shelfCategoriesRef }: UseBobChatProps) => {
36
+ export declare const useBobChat: ({ setAnimationState, manualMode, talkingState, thinkingState, completeState, idleState, listenState, onStreamStart, onStreamComplete, onShowingProduct, onResearchStart, onReadyToSpeak, onHighlightPart, onHighlightProduct, onNoPartsFound, onAutoFetchComplete, onVariantSelectionRequired, shelfCategoriesRef, initialVehicle }: UseBobChatProps) => {
29
37
  messages: Message[];
30
38
  input: string;
31
39
  setInput: import('react').Dispatch<import('react').SetStateAction<string>>;