llmasaservice-ui 0.7.22 → 0.7.24

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
@@ -239,7 +239,6 @@ var ChatPanel = ({
239
239
  }, [idle]);
240
240
  (0, import_react3.useEffect)(() => {
241
241
  if (Object.keys(initialHistory).length === 0) return;
242
- console.log("initialHistory", initialHistory);
243
242
  setHistory(initialHistory);
244
243
  }, [initialHistory]);
245
244
  (0, import_react3.useEffect)(() => {
@@ -720,7 +719,6 @@ var ChatPanel = ({
720
719
  });
721
720
  };
722
721
  const formatPromptForDisplay = (prompt) => {
723
- var _a;
724
722
  if (!prompt) {
725
723
  return "";
726
724
  }
@@ -729,7 +727,7 @@ var ChatPanel = ({
729
727
  const withoutContext = parts.length > 0 ? parts[0] : "";
730
728
  if (withoutContext.includes("PROMPT:")) {
731
729
  const promptParts = withoutContext.split("PROMPT:");
732
- return promptParts.length > 1 ? (_a = promptParts[1]) != null ? _a : "".trim() : withoutContext.trim();
730
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
733
731
  }
734
732
  return withoutContext.trim();
735
733
  }
package/dist/index.mjs CHANGED
@@ -205,7 +205,6 @@ var ChatPanel = ({
205
205
  }, [idle]);
206
206
  useEffect(() => {
207
207
  if (Object.keys(initialHistory).length === 0) return;
208
- console.log("initialHistory", initialHistory);
209
208
  setHistory(initialHistory);
210
209
  }, [initialHistory]);
211
210
  useEffect(() => {
@@ -686,7 +685,6 @@ var ChatPanel = ({
686
685
  });
687
686
  };
688
687
  const formatPromptForDisplay = (prompt) => {
689
- var _a;
690
688
  if (!prompt) {
691
689
  return "";
692
690
  }
@@ -695,7 +693,7 @@ var ChatPanel = ({
695
693
  const withoutContext = parts.length > 0 ? parts[0] : "";
696
694
  if (withoutContext.includes("PROMPT:")) {
697
695
  const promptParts = withoutContext.split("PROMPT:");
698
- return promptParts.length > 1 ? (_a = promptParts[1]) != null ? _a : "".trim() : withoutContext.trim();
696
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
699
697
  }
700
698
  return withoutContext.trim();
701
699
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.7.22",
3
+ "version": "0.7.24",
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
@@ -160,8 +160,6 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
160
160
 
161
161
  useEffect(() => {
162
162
  if (Object.keys(initialHistory).length === 0) return;
163
-
164
- console.log("initialHistory", initialHistory);
165
163
  setHistory(initialHistory);
166
164
 
167
165
  }, [initialHistory]);
@@ -753,7 +751,7 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
753
751
  // Remove the optional chaining since withoutContext is always a string
754
752
  if (withoutContext.includes("PROMPT:")) {
755
753
  const promptParts = withoutContext.split("PROMPT:");
756
- return promptParts.length > 1 ? promptParts[1] ?? "".trim() : withoutContext.trim();
754
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
757
755
  }
758
756
 
759
757
  return withoutContext.trim();