Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkondratek committed Apr 4, 2024
1 parent 65ac961 commit 6a5d236
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/main/kotlin/com/sourcegraph/cody/chat/AgentChatSession.kt
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ private constructor(

ChatMessage(speaker = parsed, message.text)
}
this.messages.addAll(chatMessages)
chatMessages.forEachIndexed { index, chatMessage ->
chatPanel.addOrUpdateMessage(chatMessage, index)
}

val newConnectionId =
restoreChatSession(agent, chatMessages, chatModelProviderFromState, state.internalId!!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class HistoryService(private val project: Project) :
val found = getOrCreateChat(internalId)
if (found.messages.size < chatMessages.size) {
found.setUpdatedTimeAt(LocalDateTime.now())
found.messages = chatMessages.map(::convertToMessageState).toMutableList()
synchronized(listeners) { listeners.forEach { it(found) } }
}
found.messages = chatMessages.map(::convertToMessageState).toMutableList()
synchronized(listeners) { listeners.forEach { it(found) } }
}

@Synchronized
Expand Down

0 comments on commit 6a5d236

Please sign in to comment.