Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Packages/Sources/RxCodeChatKit/ChatBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public final class ChatBridge {
public var appVersion: String = ""
public var claudeVersion: String?
public var codexVersion: String?
/// Changes when the local composer begins a new send. Message containers
/// use this to clear any active-turn scroll state before AppState appends
/// the next user row, matching the mobile send flow.
public var sendRequestID: UUID?

/// User decision summaries for `ExitPlanMode` tool calls in the current session,
/// keyed by `toolCallId`. Pushed by AppState from per-session state and persisted
Expand Down Expand Up @@ -64,6 +68,10 @@ public final class ChatBridge {
await sendHandler?()
}

public func markUserSendRequested() {
sendRequestID = UUID()
}
Comment on lines +71 to +73

public func cancelStreaming() async {
await cancelStreamingHandler?()
}
Expand Down
7 changes: 7 additions & 0 deletions Packages/Sources/RxCodeChatKit/ChatMessageListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,16 @@ public struct ChatMessageListView: View {

extension View {
func chatMessageListRowStyle() -> some View {
#if os(macOS)
padding(EdgeInsets(top: 8, leading: 20, bottom: 24, trailing: 20))
.listRowInsets(EdgeInsets(top: 8, leading: 20, bottom: 24, trailing: 20))
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
#else
listRowInsets(EdgeInsets(top: 8, leading: 20, bottom: 24, trailing: 20))
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
#endif
}
}

Expand Down
2 changes: 2 additions & 0 deletions Packages/Sources/RxCodeChatKit/InputBarView+Queue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ extension InputBarView {
}

func sendQueuedNow(_ id: UUID) {
chatBridge.markUserSendRequested()
Task { await chatBridge.sendQueuedNow(id: id) }
}

func sendAllQueuedAsOne() {
chatBridge.markUserSendRequested()
Task { await chatBridge.sendAllQueuedAsOne() }
}

Expand Down
2 changes: 2 additions & 0 deletions Packages/Sources/RxCodeChatKit/InputBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ struct InputBarView<Accessory: View, TopAccessory: View>: View {
windowState.inputText = cmd.command + " "
} else {
windowState.inputText = ""
chatBridge.markUserSendRequested()
Task { await chatBridge.sendSlashCommand(cmd.command) }
}
}
Expand Down Expand Up @@ -750,6 +751,7 @@ struct InputBarView<Accessory: View, TopAccessory: View>: View {
return
}

chatBridge.markUserSendRequested()
Task { await chatBridge.send() }
resetIMEState()
}
Expand Down
Loading
Loading