Refactor command handling in ChatRepository for Android and iOS
- Reset commandLines and commandKind to default values when a command table event is received, ensuring a clean state for subsequent commands. - This change improves the handling of command events and maintains consistency across platforms.
This commit is contained in:
@@ -483,6 +483,8 @@ final class ChatRepository: ObservableObject {
|
||||
}
|
||||
|
||||
case .commandTable(let title, let columns, let rows):
|
||||
current.commandLines = []
|
||||
current.commandKind = nil
|
||||
current.commandTable = CommandTableState(title: title, columns: columns, rows: rows)
|
||||
|
||||
case .error(let message):
|
||||
|
||||
Reference in New Issue
Block a user