@wallavi/widget 1.13.1 → 1.13.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/dist/index.d.mts CHANGED
@@ -174,8 +174,10 @@ interface ChatWidgetConfig {
174
174
  showThinking?: boolean;
175
175
  regenerateMessage?: boolean;
176
176
  /**
177
- * Persist messages and threadId in sessionStorage so the conversation
178
- * survives page reloads and navigations. Uses agentId as the storage key.
177
+ * Persist the conversation so it survives page reloads and navigations.
178
+ * The storage key is `wallavi_<agentId>_<userId>` when `userContext.userId`
179
+ * is set, otherwise `wallavi_<agentId>`. Messages go in sessionStorage under
180
+ * `<key>_msgs` and the threadId in localStorage under `<key>_tid`.
179
181
  */
180
182
  persist?: boolean;
181
183
  onNavigate?: (path: string) => void;
package/dist/index.d.ts CHANGED
@@ -174,8 +174,10 @@ interface ChatWidgetConfig {
174
174
  showThinking?: boolean;
175
175
  regenerateMessage?: boolean;
176
176
  /**
177
- * Persist messages and threadId in sessionStorage so the conversation
178
- * survives page reloads and navigations. Uses agentId as the storage key.
177
+ * Persist the conversation so it survives page reloads and navigations.
178
+ * The storage key is `wallavi_<agentId>_<userId>` when `userContext.userId`
179
+ * is set, otherwise `wallavi_<agentId>`. Messages go in sessionStorage under
180
+ * `<key>_msgs` and the threadId in localStorage under `<key>_tid`.
179
181
  */
180
182
  persist?: boolean;
181
183
  onNavigate?: (path: string) => void;
package/dist/index.js CHANGED
@@ -1102,7 +1102,6 @@ function useChat({
1102
1102
  if (persistKey) {
1103
1103
  try {
1104
1104
  sessionStorage.removeItem(`${persistKey}_msgs`);
1105
- sessionStorage.removeItem(`${persistKey}_tid`);
1106
1105
  localStorage.removeItem(`${persistKey}_tid`);
1107
1106
  } catch {
1108
1107
  }
package/dist/index.mjs CHANGED
@@ -1076,7 +1076,6 @@ function useChat({
1076
1076
  if (persistKey) {
1077
1077
  try {
1078
1078
  sessionStorage.removeItem(`${persistKey}_msgs`);
1079
- sessionStorage.removeItem(`${persistKey}_tid`);
1080
1079
  localStorage.removeItem(`${persistKey}_tid`);
1081
1080
  } catch {
1082
1081
  }
package/package.json CHANGED
@@ -22,8 +22,8 @@
22
22
  "tsup": "^8.3.5",
23
23
  "tsx": "^4.19.2",
24
24
  "typescript": "^5.7.3",
25
- "@wallavi/typescript-config": "0.0.1",
26
- "@wallavi/protocol": "0.0.1"
25
+ "@wallavi/protocol": "0.0.1",
26
+ "@wallavi/typescript-config": "0.0.1"
27
27
  },
28
28
  "exports": {
29
29
  ".": {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "private": false,
46
46
  "types": "./dist/index.d.ts",
47
- "version": "1.13.1",
47
+ "version": "1.13.2",
48
48
  "scripts": {
49
49
  "build": "tsup && pnpm build:css",
50
50
  "build:css": "tailwindcss -i ./src/styles.css -o ./dist/styles.css --config tailwind.config.cjs --minify",