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: improve multiple prompts #463

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

thedadams
Copy link
Contributor

When a prompt was followed by another prompt, React was "helping" us by not completing resetting the state. This caused an issue where the old state would be used in the next prompt, making it appear as though the prompt was already submitted.

This change will reset this state so it will not be reused.

This change also includes some small changes around what is displayed before and after prompts. For example, when an authentication prompt disappeared, the message would still say,
" needs to authenticate ." Now, the message will switch back to "Waiting for model response..."

When a prompt was followed by another prompt, React was "helping" us by
not completing resetting the state. This caused an issue where the old
state would be used in the next prompt, making it appear as though the
prompt was already submitted.

This change will reset this state so it will not be reused.

This change also includes some small changes around what is displayed
before and after prompts. For example, when an authentication prompt
disappeared, the message would still say,
"<Tool> needs to authenticate ." Now, the message will switch back to
"Waiting for model response..."

Signed-off-by: Donnie Adams <[email protected]>
@cjellick
Copy link
Contributor

cjellick commented Sep 7, 2024

fixes it for me 🙌

cjellick
cjellick previously approved these changes Sep 7, 2024
Copy link
Contributor

@cjellick cjellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good and works. feel free to merge with just my approval or wait for a second on monday. im fine either way

Signed-off-by: Donnie Adams <[email protected]>
@thedadams
Copy link
Contributor Author

I realized later that we could clean up some of the state, so I did that.

@thedadams thedadams merged commit 2be2f66 into gptscript-ai:main Sep 9, 2024
1 check passed
@thedadams thedadams deleted the gh-460 branch September 9, 2024 14:54
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.

4 participants