-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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(frontend): Add active status for ws #5944
Conversation
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.
This is the wrong fix. will follow up
@amanape we should check AgentStatus rather than adding agent state into the websocket state |
@@ -71,7 +71,7 @@ export const useWSStatusChange = () => { | |||
} | |||
statusRef.current = status; | |||
|
|||
if (status === WsClientProviderStatus.CONNECTED && initialQuery) { | |||
if (status !== WsClientProviderStatus.DISCONNECTED && initialQuery) { |
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.
any particular reason for these flips? Or just a remnant of the original implementation?
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.
They are remnants of the original implementation, but are also helpful in the (unlikely) case we extend the WsClientProviderStatus
enum
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.
LMK if you think we should change it, should be a minute-PR
End-user friendly description of the problem this fixes or functionality that this introduces
Endpoints such as
/list-files
should only call once runtime is activeWe have two status'
CONNECTED
andDISCONNECTED
. WS is set toCONNECTED
if a ws connection is established, not when runtime is activeInclude this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below
Give a summary of what the PR does, explaining any non-trivial design decisions
ACTIVE
statusLink of any specific issues this addresses
To run this PR locally, use the following command: