ios: limit number of items in console (#1859)

This commit is contained in:
Stanislav Dmitrenko
2023-01-30 12:07:06 +00:00
committed by GitHub
parent dfa0272065
commit a58be6ebb6
3 changed files with 12 additions and 5 deletions

View File

@@ -110,8 +110,8 @@ struct TerminalView: View {
if composeState.message.starts(with: "/sql") && (!prefPerformLA || !developerTools) {
let resp = ChatResponse.chatCmdError(user: nil, chatError: ChatError.error(errorType: ChatErrorType.commandError(message: "Failed reading: empty")))
DispatchQueue.main.async {
ChatModel.shared.terminalItems.append(.cmd(.now, cmd))
ChatModel.shared.terminalItems.append(.resp(.now, resp))
ChatModel.shared.addTerminalItem(.cmd(.now, cmd))
ChatModel.shared.addTerminalItem(.resp(.now, resp))
}
} else {
DispatchQueue.global().async {