llmasaservice-ui 0.7.20 → 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,7 @@ var ChatPanel = ({
238
238
  }
239
239
  }, [idle]);
240
240
  (0, import_react3.useEffect)(() => {
241
+ if (Object.keys(initialHistory).length === 0) return;
241
242
  console.log("initialHistory", initialHistory);
242
243
  setHistory(initialHistory);
243
244
  }, [initialHistory]);
package/dist/index.mjs CHANGED
@@ -204,6 +204,7 @@ var ChatPanel = ({
204
204
  }
205
205
  }, [idle]);
206
206
  useEffect(() => {
207
+ if (Object.keys(initialHistory).length === 0) return;
207
208
  console.log("initialHistory", initialHistory);
208
209
  setHistory(initialHistory);
209
210
  }, [initialHistory]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.7.20",
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,10 +159,11 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
159
159
  }, [idle]);
160
160
 
161
161
  useEffect(() => {
162
+ if (Object.keys(initialHistory).length === 0) return;
163
+
162
164
  console.log("initialHistory", initialHistory);
163
- //if (Object.keys(initialHistory).length > 0) {
164
- setHistory(initialHistory);
165
- //}
165
+ setHistory(initialHistory);
166
+
166
167
  }, [initialHistory]);
167
168
 
168
169
  useEffect(() => {