🗨️ fix: respect line breaks in prompt variables (#3459)

* fix: always display new lines in PromptEditor

* fix: allow multiline inputs in prompt template
This commit is contained in:
Jacob Colyvan 2024-07-28 06:02:34 +08:00 committed by GitHub
parent 14eff23b57
commit d4d56281e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View file

@ -70,7 +70,7 @@ const PromptEditor: React.FC<Props> = ({ name, isEditing, setIsEditing }) => {
onBlur={() => setIsEditing(false)}
/>
) : (
<span className="block break-words px-2 py-1 dark:text-gray-200">{field.value}</span>
<pre className="block break-words px-2 py-1 dark:text-gray-200">{field.value}</pre>
)
}
/>