llmasaservice-ui 0.7.22 → 0.7.23

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
@@ -720,7 +720,6 @@ var ChatPanel = ({
720
720
  });
721
721
  };
722
722
  const formatPromptForDisplay = (prompt) => {
723
- var _a;
724
723
  if (!prompt) {
725
724
  return "";
726
725
  }
@@ -729,7 +728,7 @@ var ChatPanel = ({
729
728
  const withoutContext = parts.length > 0 ? parts[0] : "";
730
729
  if (withoutContext.includes("PROMPT:")) {
731
730
  const promptParts = withoutContext.split("PROMPT:");
732
- return promptParts.length > 1 ? (_a = promptParts[1]) != null ? _a : "".trim() : withoutContext.trim();
731
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
733
732
  }
734
733
  return withoutContext.trim();
735
734
  }
package/dist/index.mjs CHANGED
@@ -686,7 +686,6 @@ var ChatPanel = ({
686
686
  });
687
687
  };
688
688
  const formatPromptForDisplay = (prompt) => {
689
- var _a;
690
689
  if (!prompt) {
691
690
  return "";
692
691
  }
@@ -695,7 +694,7 @@ var ChatPanel = ({
695
694
  const withoutContext = parts.length > 0 ? parts[0] : "";
696
695
  if (withoutContext.includes("PROMPT:")) {
697
696
  const promptParts = withoutContext.split("PROMPT:");
698
- return promptParts.length > 1 ? (_a = promptParts[1]) != null ? _a : "".trim() : withoutContext.trim();
697
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
699
698
  }
700
699
  return withoutContext.trim();
701
700
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.7.22",
3
+ "version": "0.7.23",
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
@@ -753,7 +753,7 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
753
753
  // Remove the optional chaining since withoutContext is always a string
754
754
  if (withoutContext.includes("PROMPT:")) {
755
755
  const promptParts = withoutContext.split("PROMPT:");
756
- return promptParts.length > 1 ? promptParts[1] ?? "".trim() : withoutContext.trim();
756
+ return promptParts.length > 1 ? (promptParts[1] || "").trim() : withoutContext.trim();
757
757
  }
758
758
 
759
759
  return withoutContext.trim();