Skip to content

Commit a788a90

Browse files
committed
Refresh conversationInfo on every session sync
Update lastMessage and summary even when no new chat messages arrive, so the UI reflects edits and reordering that happen outside of new message arrivals.
1 parent 4044c59 commit a788a90

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

ClaudeIsland/Services/State/SessionStore.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,10 @@ actor SessionStore {
11261126
await self?.process(.clearDetected(sessionId: sessionId))
11271127
}
11281128

1129+
// Always update conversationInfo (lastMessage, summary, etc.)
1130+
// even when there are no new chat messages to process
1131+
await self?.updateConversationInfo(sessionId: sessionId, cwd: cwd)
1132+
11291133
guard !result.newMessages.isEmpty || result.clearDetected else {
11301134
return
11311135
}
@@ -1144,6 +1148,18 @@ actor SessionStore {
11441148
}
11451149
}
11461150

1151+
/// Update conversationInfo (lastMessage, summary, etc.) independently of chat item processing
1152+
private func updateConversationInfo(sessionId: String, cwd: String) async {
1153+
guard var session = sessions[sessionId] else { return }
1154+
let conversationInfo = await ConversationParser.shared.parse(
1155+
sessionId: sessionId,
1156+
cwd: cwd
1157+
)
1158+
session.conversationInfo = conversationInfo
1159+
sessions[sessionId] = session
1160+
publishState()
1161+
}
1162+
11471163
private func cancelPendingSync(sessionId: String) {
11481164
pendingSyncs[sessionId]?.cancel()
11491165
pendingSyncs.removeValue(forKey: sessionId)

0 commit comments

Comments
 (0)