refactor(FR-896): chat card state managment and naming convention#3573
Merged
Conversation
Member
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
72b3e8d to
4909efe
Compare
ragingwind
approved these changes
Apr 24, 2025
4909efe to
8df2bc7
Compare
47f0324 to
5f8ae64
Compare
8df2bc7 to
375e1c0
Compare
5f8ae64 to
ac20500
Compare
e7f30ab to
bd5e7ec
Compare
bd5e7ec to
7f62189
Compare
ac20500 to
74e7e26
Compare
ragingwind
reviewed
Apr 24, 2025
Merge activity
|
) Resolves #3574 (FR-896) # Refactor Chat Components for Better State Management - Refactored `AIAgentSelect` to use the `useAIAgent` hook directly instead of requiring agents to be passed as props - Simplified `ChatCard` component by removing redundant state management and using controlled components - Added `onUpdateChat` callback to `ChatCard` to propagate changes to parent components - Improved `ChatHeader` component by making it more declarative with explicit callbacks - Enhanced `Conversation` component to properly update chat state using the new callback pattern -Fetch default endpoint selection in `ChatPage` to improve initial user experience - Removed unnecessary state variables and transitions for better performance - Fixed prop types and interfaces across components for better type safety
74e7e26 to
51835df
Compare
7f62189 to
fcbb821
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Resolves #3574 (FR-896)
Refactor Chat Components for Better State Management
AIAgentSelectto use theuseAIAgenthook directly instead of requiring agents to be passed as propsChatCardcomponent by removing redundant state management and using controlled componentsonUpdateChatcallback toChatCardto propagate changes to parent componentsChatHeadercomponent by making it more declarative with explicit callbacksConversationcomponent to properly update chat state using the new callback pattern-Fetch default endpoint selection in
ChatPageto improve initial user experience