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: selecting agent tools too fast reverts selection #1539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivyjeong13
Copy link
Contributor

@ivyjeong13 ivyjeong13 commented Jan 30, 2025

  • adds AbortController to cancel an ongoing request
  • do not use useEffect form watch to trigger onChange along with reset (can potentially cause an infinite loop of onChange firing and saving)

the infinite loop from bullet point 2:

Screen.Recording.2025-01-30.at.2.34.39.PM.mov

Tested on 3G Network to emulate slow network behavior.
Screenshot 2025-01-30 at 3 50 24 PM

Note: This updates the updateAgent call, may need to also do the same for Workflow

@@ -62,8 +62,6 @@ export function Agent({ className, currentThreadId, onRefresh }: AgentProps) {

debouncedUpdateAgent(updatedAgent);

setAgentUpdates(updatedAgent);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

setAgentUpdates happens below this so axed this one

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.

1 participant