Fixed bug on chatMessage
This commit is contained in:
parent
2c1203c437
commit
d15c5636a2
1 changed files with 33 additions and 32 deletions
|
|
@ -150,8 +150,8 @@ export default function ChatMessage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col">
|
<div>
|
||||||
{template && (
|
{template ? (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
className="form-modal-initial-prompt-btn"
|
className="form-modal-initial-prompt-btn"
|
||||||
|
|
@ -167,8 +167,8 @@ export default function ChatMessage({
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<span className="prose inline-block break-words text-primary dark:prose-invert">
|
<span className="prose inline-block break-words text-primary dark:prose-invert">
|
||||||
{promptOpen &&
|
{promptOpen
|
||||||
template?.split("\n")?.map((line, index) => {
|
? template?.split("\n")?.map((line, index) => {
|
||||||
const regex = /{([^}]+)}/g;
|
const regex = /{([^}]+)}/g;
|
||||||
let match;
|
let match;
|
||||||
let parts = [];
|
let parts = [];
|
||||||
|
|
@ -195,12 +195,13 @@ export default function ChatMessage({
|
||||||
parts.push(line.substring(lastIndex));
|
parts.push(line.substring(lastIndex));
|
||||||
}
|
}
|
||||||
return <p>{parts}</p>;
|
return <p>{parts}</p>;
|
||||||
})}
|
})
|
||||||
|
: chat.message[chat.chatKey]}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
)}
|
) : (
|
||||||
<br />
|
|
||||||
<span>{chat.message[chat.chatKey]}</span>
|
<span>{chat.message[chat.chatKey]}</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue