@websolutespa/bom-llm 2.0.3 → 2.0.4

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
@@ -1,5 +1,11 @@
1
1
  # @websolutespa/bom-llm
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified: useLlmView clear with openingContext
8
+
3
9
  ## 2.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/esm/index.js CHANGED
@@ -19895,6 +19895,7 @@ const createLlmViewStore = _ref => {
19895
19895
  opened,
19896
19896
  embedded,
19897
19897
  portal,
19898
+ clear,
19898
19899
  send,
19899
19900
  setEmbed,
19900
19901
  setCurrentContext
@@ -20066,10 +20067,15 @@ const createLlmViewStore = _ref => {
20066
20067
  const opened = !state.opened;
20067
20068
  if (opened) {
20068
20069
  state.openingContext = openingContext;
20069
- setCurrentContext(openingContext ? {
20070
- context: openingContext,
20071
- title: 'opening-context'
20072
- } : undefined);
20070
+ if (openingContext) {
20071
+ clear();
20072
+ setCurrentContext({
20073
+ context: openingContext,
20074
+ title: 'opening-context'
20075
+ });
20076
+ } else {
20077
+ setCurrentContext();
20078
+ }
20073
20079
  }
20074
20080
  pushDataLayer({
20075
20081
  event: opened ? state.openingContext ? 'llm_open_context' : 'llm_open' : 'llm_close',
@@ -20093,10 +20099,15 @@ const createLlmViewStore = _ref => {
20093
20099
  set(state => {
20094
20100
  if (opened) {
20095
20101
  state.openingContext = openingContext;
20096
- setCurrentContext(openingContext ? {
20097
- context: openingContext,
20098
- title: 'opening-context'
20099
- } : undefined);
20102
+ if (openingContext) {
20103
+ clear();
20104
+ setCurrentContext({
20105
+ context: openingContext,
20106
+ title: 'opening-context'
20107
+ });
20108
+ } else {
20109
+ setCurrentContext();
20110
+ }
20100
20111
  }
20101
20112
  pushDataLayer({
20102
20113
  event: opened ? state.openingContext ? 'llm_open_context' : 'llm_open' : 'llm_close',
@@ -20166,6 +20177,7 @@ function LlmViewProvider(_ref2) {
20166
20177
  ...props
20167
20178
  } = _ref2;
20168
20179
  const {
20180
+ clear,
20169
20181
  send,
20170
20182
  setEmbed,
20171
20183
  setCurrentContext
@@ -20174,6 +20186,7 @@ function LlmViewProvider(_ref2) {
20174
20186
  if (!storeRef.current) {
20175
20187
  storeRef.current = createLlmViewStore({
20176
20188
  ...props,
20189
+ clear,
20177
20190
  send,
20178
20191
  setEmbed,
20179
20192
  setCurrentContext