llmasaservice-ui 0.7.24 → 0.7.25

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
@@ -241,6 +241,10 @@ var ChatPanel = ({
241
241
  if (Object.keys(initialHistory).length === 0) return;
242
242
  setHistory(initialHistory);
243
243
  }, [initialHistory]);
244
+ (0, import_react3.useEffect)(() => {
245
+ if (!conversation || conversation === "") return;
246
+ setHistory(initialHistory);
247
+ }, [conversation]);
244
248
  (0, import_react3.useEffect)(() => {
245
249
  const handleBeforeUnload = (event) => {
246
250
  if (callToActionMustSendEmail && showCallToAction && callToActionEmailAddress && callToActionEmailAddress !== "" && !hasSentCallToActionEmail) {
package/dist/index.mjs CHANGED
@@ -207,6 +207,10 @@ var ChatPanel = ({
207
207
  if (Object.keys(initialHistory).length === 0) return;
208
208
  setHistory(initialHistory);
209
209
  }, [initialHistory]);
210
+ useEffect(() => {
211
+ if (!conversation || conversation === "") return;
212
+ setHistory(initialHistory);
213
+ }, [conversation]);
210
214
  useEffect(() => {
211
215
  const handleBeforeUnload = (event) => {
212
216
  if (callToActionMustSendEmail && showCallToAction && callToActionEmailAddress && callToActionEmailAddress !== "" && !hasSentCallToActionEmail) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.7.24",
3
+ "version": "0.7.25",
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
@@ -164,6 +164,11 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
164
164
 
165
165
  }, [initialHistory]);
166
166
 
167
+ useEffect(() => {
168
+ if (!conversation || conversation === "") return;
169
+ setHistory(initialHistory);
170
+ }, [conversation]);
171
+
167
172
  useEffect(() => {
168
173
  const handleBeforeUnload = (event: BeforeUnloadEvent) => {
169
174
  if (