Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

jacobcolyvan
Copy link
Contributor

@jacobcolyvan jacobcolyvan commented Jul 26, 2024

Pull Request Template

Summary

This PR addresses two small bugs in the prompt dialogs:
1.
Allows inputting multi-line variables in prompt dialogs / doesn't strip pasted text of its line breaks.

2.
Don't strip newlines in the editing section of a prompt template, i.e. from this:
Screenshot 2024-07-26 at 22 11 02
to this:
Screenshot 2024-07-26 at 22 11 24

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)

Testing

Tested inputting values with new lines as variables in the prompt dialog. Can confirm it works as expected on brave/chromium and firefox.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes
  • I have written tests demonstrating that my changes are effective or that my feature works

@danny-avila danny-avila changed the title fix: respect line breaks in prompt variables 🗨️ fix: respect line breaks in prompt variables Jul 27, 2024
@danny-avila danny-avila merged commit d4d5628 into danny-avila:main Jul 27, 2024
danny-avila pushed a commit that referenced this pull request Aug 5, 2024
* fix: always display new lines in PromptEditor

* fix: allow multiline inputs in prompt template
danny-avila pushed a commit that referenced this pull request Aug 17, 2024
* fix: always display new lines in PromptEditor

* fix: allow multiline inputs in prompt template
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
* fix: always display new lines in PromptEditor

* fix: allow multiline inputs in prompt template
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
* fix: always display new lines in PromptEditor

* fix: allow multiline inputs in prompt template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Multiline text in variables loses line breaks in Prompts
2 participants