SWE-agent
SWE-agent copied to clipboard
Web UI: Reset the user-entered source value after changing the problem source dropdown.
Reference Issues/PRs
Fixes https://github.com/princeton-nlp/SWE-agent/issues/362
What does this implement/fix? Explain your changes.
Use useEffect
to monitor the problem source dropdown, and when it changes, reset the user value to empty (so that the default text appears for that field).
The textarea corresponding to the "Write" dropdown doesn't need changes since the actual markup is updated on switch (between input
s and textarea
).
Testing Instructions
- On a fresh page load, enter something into the "GitHub issue URL" field.
- Switch the dropdown above it to "Local file", and verify the "Path to local .MD..." field is empty (displaying the placeholder text).
- Enter data in that field again, and switch the dropdown back to its original value. Verify the "GitHub issue URL" field is empty again.