fix: Disable prompt submit if problem set not selected #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Description (What does it do?)
The canvas tutor agent endpoint (https://api.rc.learn.mit.edu/ai/http/demo_canvas_tutor_agent/) will reject prompts unless accompanied by a
problem_set_title
.This PR disables prompt submit until the user has made a selection from the assignment dropdown.
How can this be tested?
Run
yarn start
to fire up Storybook.Navigate to the assignment selection preview at http://localhost:6006/?path=/docs/smoot-design-ai-aichat--docs#assignment-selection.
Ensure that the send button is disabled and that you are not able to submit a prompt by click it or by hitting enter.
Select a problem set from the assignment dropdown. Ensure that you are now able to submit a prompt.