Skip to content

Commit

Permalink
hide prompt if systemMessageContent is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
heimoshuiyu committed Jul 18, 2024
1 parent 3328b3e commit b9fdfb8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/chatbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,14 @@ export default function ChatBOX(props: {
<br />
</p>
)}
<div class="chat chat-start">
<div class="chat-header">Prompt</div>
<div class="chat-bubble chat-bubble-accent">
{chatStore.systemMessageContent}
{chatStore.systemMessageContent.trim() && (
<div class="chat chat-start">
<div class="chat-header">Prompt</div>
<div class="chat-bubble chat-bubble-accent">
{chatStore.systemMessageContent}
</div>
</div>
</div>
)}

{chatStore.history.map((_, messageIndex) => (
<Message
Expand Down

0 comments on commit b9fdfb8

Please sign in to comment.