Shopping Assistant SDK
Changelog

Changelog

Version 1.2.9-beta.3

  • Release Date: 21/10/2026
  • Hooks Version: 1.2.9-beta.3
  • Components Version: 1.2.7-beta.1
Improvements πŸ”§
  1. Reducer resilience: REPLACE_CONVERSATION and UPDATE_CONVERSATION guard against non-array conversation state; invalid history payloads fall back to an empty array instead of breaking the chat list.
  2. UPDATE_QUESTIONS: Accepts either a string array or an API object shaped like { questions: string[] } (previous versions required the nested shape only).
  3. Reducer errors: Unknown action types log a warning and preserve state; caught errors no longer reset the store to {}.
  4. Chat (@unbxd-ui/react-shopping-assistant-components): Treats non-array conversation from the hook as [] so scroll, empty state, and message rendering do not throw when state is malformed.

Version 1.2.9-beta.2

  • Release Date: 05/10/2026
  • Hooks Version: 1.2.9-beta.2
  • Components Version: 1.2.6
Improvements πŸ”§
  1. Conversation message normalization: Internal normalizeConversationItem (used by formatData and askAgent) maps API payloads into { role, message, content, image? }. Top-level fields (except role, message, and user image) go into content; fields on a nested message object are merged into content when the API uses that format (replacing the earlier fixed whitelist of filters / products / table_info).
  2. Live chat and history parity: askAgent assistant turns use the same normalization as fetchHistory, so ResponseChatComponents (e.g. table_info, custom API keys) behave the same on fresh responses and after reload.
  3. AGENT_RESPONSE_RECEIVED: Event value is the normalized assistant message (the display string when the API nests content under a message object).

Version 1.2.9-beta.1

  • Release Date: 05/10/2026
  • Hooks Version: 1.2.9-beta.1
  • Components Version: 1.2.6
Improvements πŸ”§
  1. formatData / conversation history: table_info included in the assistant content fields normalized from the history API (superseded in beta.2 by full-payload normalization).

Version 1.2.8

  • Release Date: 03/06/2026
  • Hooks Version: 1.2.8
  • Components Version: 1.2.6
Improvements πŸ”§
  1. Event Firing Fix: Resolved an issue where certain events were not being triggered consistently, causing some event emissions to be missed.

Version 1.2.7

  • Release Date: 25/05/2026
  • Hooks Version: 1.2.7
  • Components Version: 1.2.5
Improvements πŸ”§
  1. Peer Dependency Fix: Resolved conflicting package versions by fixing peer dependency alignment across shopping assistant SDK packages.

Version 1.2.6

  • Release Date: 30/04/2026
  • Hooks Version: 1.2.6
  • Components Version: 1.2.4
New Features πŸš€
  1. fetchInitialPrompts β€” optional UnbxdShoppingAssistantWrapper prop (new).
  2. startNewConversation β€” initialLoading during the request; returns Promise<string | null>.
  3. Chat / AIMessage β€” pass index, allData, and data into row components; MessageComponentProps exported.
  4. ERROR β€” handleError also emits ON_EVENT with type ERROR.
Improvements πŸ”§
  1. DataFetcher β€” avoids redundant fetchHistory and aligns getInitialPrompts with new vs restored conversations.
  2. trackAnalytics β€” conversation_id fallback from storage; broader allowed action list (see docs).
  3. Chat β€” safer scroll deps (conversation?.length); failed initial conversation clears initialLoading.
  4. Docs (trackAnalytics payloads, clearImage); shopping-assistant-example Popup (ResponseChatComponents, analytics demo).
Breaking Changes ⚠️
  1. Extra ResponseChatComponents entries receive data, allData, index instead of spreading the API value as props.

Version 1.2.5

  • Release Date: 16/02/2025
  • Hooks Version: 1.2.5
  • Components Version: 1.2.3
New Features πŸš€
  1. ResponseChatComponents (Chat): The Chat component now accepts a ResponseChatComponents prop β€” an object that maps response data to custom React components. Use it to override how the AI response is rendered: message (text), filters (filter chips), products (product list/carousel), and any other keys returned by the API. This allows a single, extensible way to customize all parts of an assistant message.

  2. requestBody as a function (UnbxdShoppingAssistantWrapper): requestBody can now be a function in addition to an object. When passed as a function, it receives a request type and returns the body for that API call. Request types: "INITIAL_CONVERSATION" (start conversation), "CHAT" (send message), and "QUESTIONS" (fetch initial prompts). Use this to send different payloads per request (e.g. different pagetype or metadata for each call).

  3. extraParams as a function (UnbxdShoppingAssistantWrapper): extraParams can now be passed as a function in addition to an object. When it is a function, it receives a type argument indicating the current request type (e.g. "INITIAL_CONVERSATION", "CHAT", "HISTORY", "QUESTIONS", "CONVERSATIONS"), so you can return different extra params per request.

Breaking Changes ⚠️
  1. Chat: Products and FiltersComponent props removed: The Chat component no longer accepts standalone Products or FiltersComponent props. Product and filter rendering are now configured via ResponseChatComponents β€” use ResponseChatComponents.products and ResponseChatComponents.filters to supply custom components. The default product carousel and filters are still used when ResponseChatComponents is not provided or when those keys are omitted.
Improvements πŸ”§
  1. Analytics default value: The default value for the analytics prop on UnbxdShoppingAssistantWrapper has been updated. Ensure you set analytics={true} explicitly if you rely on analytics tracking.

Version 1.2.4

  • Release Date: 22/12/2025
  • Hooks Version: 1.2.4
  • Components Version: 1.2.2
Security Fixes πŸ”’
  1. Fixed Critical Security Vulnerabilities: Resolved critical Next.js security vulnerabilities ( https://nextjs.org/blog/security-update-2025-12-11 (opens in a new tab) ) to ensure a secure development environment.

Version 1.2.3

  • Release Date: 21/11/2025
  • Hooks Version: 1.2.3
  • Components Version: 1.2.2
Highlights ⚑️

Performance optimizations focused on streamlining conversation initialization and reducing unnecessary API overhead for faster user experience.

New Features πŸš€
  1. Added convStorageName prop to customize conversation storage key names
  2. Added visualAssistant flag enabling visual search with attachImage and clearImage functions, including automatic BASE64 image conversion.

Version 1.2.0

  • Release Date: 13/08/2025
  • Hooks Version: 1.2.0
  • Components Version: 1.2.0
Highlights ⚑️

Performance optimizations focused on streamlining conversation initialization and reducing unnecessary API overhead for faster user experience.

Performance Optimizations πŸš€
  1. Optimized Conversation Initialization: Streamlined the conversation startup process by removing redundant API calls that were triggering on every conversation start, significantly improving initial load times and reducing server overhead.
Improvements πŸ”§
  1. Faster Conversation Startup: Conversations now start more quickly with optimized initialization flow.
  2. Reduced API Overhead: Eliminated unnecessary API requests during conversation initialization for better performance.
  3. Enhanced User Experience: Smoother and more responsive conversation flow with reduced loading times.

Version 1.1.0

  • Release Date: 12/08/2025
  • Components Version: 1.1.0
  • Hooks Version: 1.1.0
Highlights ⚑️

Major API improvements with better naming conventions, enhanced configuration options, and streamlined interface management for improved developer experience.

New Features πŸš€
  1. apiEndPoint Configuration: Added support for custom API endpoint configuration, allowing developers to specify different backend services and deployment environments.
  2. getInitialPrompts Function: New function to fetch predefined conversation starters, enabling better user onboarding and engagement.
  3. Enhanced Parameter Management: Improved parameter handling with uid now passed through extraParams for better organization.
Breaking Changes ⚠️

Hook Method/Variables Renames:

  1. storeConversationId β†’ storageType: Renamed for clearer purpose - now specifies how conversations are stored (localStorage/sessionStorage).
  2. Initialise β†’ startNewConversation: More descriptive name that clearly indicates starting a fresh conversation session.
  3. fetchAllConversations β†’ getAllConversations: Consistent naming convention across all getter methods.
  4. ask β†’ askAgent: More specific name indicating interaction with the AI agent.
  5. appLoading β†’ initialLoading: Clearer distinction for initial app loading state vs other loading states.

Component Changes: 6. onSend β†’ onSubmit: Renamed Input component prop to follow standard form conventions and improve clarity.

Parameter Changes: 7. uid Parameter Location: uid now needs to be passed inside extraParams object instead of as a direct parameter for better parameter organization.

Removed Features ⚠️
  1. resetChat Function: Removed from hook as startNewConversation can be used directly for the same functionality, reducing API complexity.
  2. updateConversationId Function: Removed to simplify conversation management - use startNewConversation for new conversations. (Note: This function was re-introduced in v1.2.6 for switching between existing conversations.)
Improvements πŸ”§
  1. Proper Interface Management: Enhanced TypeScript interfaces with better type safety and clearer property definitions.
  2. Consistent API Naming: All methods now follow consistent naming patterns for better developer experience.
  3. Simplified Conversation Flow: Streamlined conversation management by removing redundant functions.
  4. Better Parameter Organization: Grouped related parameters into objects for cleaner API structure.

Initial Release

  • Release Date: 29/07/2025
  • Components Version: 1.0.0
  • Hooks Version: 1.0.0
Highlights ⚑️

The first official release of the Shopping Assistant SDK, designed for seamless integration of AI-powered conversational shopping into React applications.

Features πŸš€
  1. UnbxdShoppingAssistantWrapper: Context provider for managing conversation state and API communication.
  2. useShoppingAssistant Hook: Core hook providing AI interactions, conversation management, and state handling.
  3. Chat Component: Complete chat interface with user/AI message rendering, product recommendations, and interactive filters.
  4. InputBar Component: Text input interface with customizable send button and Enter key support.
  5. ResetChat Component: Conversation reset functionality with customizable reset interface. (Note: This component was never shipped in the public API; use startNewConversation hook instead.)
  6. AI-Powered Conversations: Natural language processing with contextual responses and multi-turn conversation support.
  7. Product Integration: Seamless product recommendations and filter application through conversational queries.
  8. TypeScript Support: Full TypeScript definitions for enhanced developer experience.
  9. Customizable UI: Fully customizable components with support for custom styling and theming.
  10. Storage Options: Configurable conversation persistence with localStorage or sessionStorage support.