| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Add `OnMessageTextChanged` to `AgentUiEvent` to capture user input. - Migrate message text state from local Compose state to the ViewModel, utilizing `SavedStateHandle` for state persistence across configuration changes and process death. - Reset the message text in the ViewModel when an `OnSendMessage` event is processed.
There was a problem hiding this comment.
This pull request refactors the messageText state in the AgentDemo screen, moving it from local UI state to the AgentDemoViewModel backed by SavedStateHandle to ensure state persistence across configuration changes. The reviewer suggested adding unit tests to verify that the view model correctly updates and clears this state.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Sorry, something went wrong.
| is AgentUiEvent.OnMessageTextChanged -> { | ||
| savedStateHandle[KEY_MESSAGE_TEXT] = event.text | ||
| } |
Sorry, something went wrong.
# Conflicts: # agent/app/src/main/java/com/example/appfunctions/agent/ui/screens/agentdemo/AgentDemoScreen.kt # agent/app/src/main/java/com/example/appfunctions/agent/ui/screens/agentdemo/AgentDemoViewModel.kt
| Back | FazBrowse Home | New Git URL |
What I have done and why
Fix #13
Video fix:
https://github.com/user-attachments/assets/00c9b9ce-e24a-437d-bb81-e314438afe22