-
Notifications
You must be signed in to change notification settings - Fork 749
feat(chat): Adding state Management to stop the response for new user input prompt #6934
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
feat(chat): Adding state Management to stop the response for new user input prompt #6934
Conversation
|
| await this.messenger.sendAIResponse(response, session, tabID, triggerID, triggerPayload, chatHistory) | ||
|
|
||
| // Turn off AgentLoop flag after sending the AI response | ||
| this.sessionStorage.setAgentLoopInProgress(tabID, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this going to keep setting/resetting the flag within a single agentic loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently yes...i'll expand it to tool use next to stop tool execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit limited right now
| } else { | ||
| newUserMessage.userInputMessage.userInputMessageContext = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when would this happen? (UserInputMessageContext is undefined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of now..haven't seen any case of UserInputMessageContext being undefined but covered the case for any potential errors to maintain history thread.
| return true | ||
| }, | ||
| { timeout: 60000, truthy: true } | ||
| { timeout: 600000, truthy: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an intentional increase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes....because fsWrite for long files is exceeding and failing the conversation from service chat history validations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to add bit more context: the 60 second timeout is for the mynah chat, for agentic chat, we noticed the request could easily exceed 60 seconds if it's trying to create some new large files, hence making this change. (This is also causing the history to be invalid when we hit the 60s timeout)
| return newUserMessage | ||
| } | ||
| } | ||
| private findIndexToTrim(): number | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we would probably change this to follow more of what the CLI will do using history compacting. This is ok for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into the CLI's history compacting. I think they followed this sliding window trimming until a 10 days ago when i ported their history utilities.
|
/retryBuilds |
Problem
Responses need to stop for new user prompt and fix user history
Solution
feature/xbranches will not be squash-merged at release time.