llmasaservice-ui 0.7.21 → 0.7.22

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.js CHANGED
@@ -238,6 +238,8 @@ var ChatPanel = ({
238
238
  }
239
239
  }, [idle]);
240
240
  (0, import_react3.useEffect)(() => {
241
+ if (Object.keys(initialHistory).length === 0) return;
242
+ console.log("initialHistory", initialHistory);
241
243
  setHistory(initialHistory);
242
244
  }, [initialHistory]);
243
245
  (0, import_react3.useEffect)(() => {
package/dist/index.mjs CHANGED
@@ -204,6 +204,8 @@ var ChatPanel = ({
204
204
  }
205
205
  }, [idle]);
206
206
  useEffect(() => {
207
+ if (Object.keys(initialHistory).length === 0) return;
208
+ console.log("initialHistory", initialHistory);
207
209
  setHistory(initialHistory);
208
210
  }, [initialHistory]);
209
211
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.7.21",
3
+ "version": "0.7.22",
4
4
  "description": "Prebuilt UI components for LLMAsAService.io",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/ChatPanel.tsx CHANGED
@@ -159,7 +159,11 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
159
159
  }, [idle]);
160
160
 
161
161
  useEffect(() => {
162
- setHistory(initialHistory);
162
+ if (Object.keys(initialHistory).length === 0) return;
163
+
164
+ console.log("initialHistory", initialHistory);
165
+ setHistory(initialHistory);
166
+
163
167
  }, [initialHistory]);
164
168
 
165
169
  useEffect(() => {