Integrate Continuous Mode in Chat System #5167
Merged
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.
Background
In order to enhance user interaction and make the chat system more dynamic, this PR introduces a new feature called "Continuous Mode". In this mode, the chat conversation can continue without requiring the user to press the send button for every message. This is especially useful for tasks or scenarios where a continuous back-and-forth conversation between the user and the agent is expected.
Changes
Refactor ChatInputField to Support Continuous Mode
isContinuousMode
to theChatInputField
widget to determine whether the chat is in continuous mode.onContinuousModePressed
to toggle the continuous mode state from an external source.isContinuousMode
state.Update ChatViewModel with Continuous Mode Logic
_isContinuousMode
to manage continuous mode within the view model._isContinuousMode
to handle its state and notify listeners when it changes.sendChatMessage
method to automatically send another message if continuous mode is enabled.Enhanced Error Handling and Payload Flexibility
input
field optional inStepRequestBody
to support sending an empty payload.toJson
method inStepRequestBody
to return an empty JSON object if bothinput
andadditionalInput
are null.PR Quality Scorecard ✨
+2 pts
+5 pts
+5 pts
+5 pts
-4 pts
+4 pts
+5 pts
-5 pts
agbenchmark
to verify that these changes do not regress performance?+10 pts