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

roleGen: properly reset the outline when they are changed manually #1847

Conversation

goneri
Copy link
Contributor

@goneri goneri commented Feb 19, 2025

When the user goes back to the first page, we need to ignore the outline used
previously or we will mess up the next role generation request.

  • reset the request if the outline get changed
  • don't reset the outline if the user get back on page one
    • the outline and request will be reset only if the user changes the prompt
  • keep the prompt if the WCA answer has not prompt set
  • finally, if selectionStart() returns undefined, we default on 0

When the user goes back to the first page, we need to ignore the `outline` used
previously or we will mess up the next role generation request.

- reset the request if the outline get changed
- don't reset the outline if the user get back on page one
  - the outline and request will be reset only if the user changes the prompt
- keep the prompt if the WCA answer has not prompt set
- finally, if `selectionStart()` returns `undefined`, we default on `0`
@goneri goneri enabled auto-merge (rebase) February 19, 2025 17:20
@goneri goneri merged commit 1f05ab6 into main Feb 19, 2025
12 of 13 checks passed
@goneri goneri deleted the goneri/roleGen-properly-reset-the-outline-when-they-are-changed-manually_31765 branch February 19, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants