Skip to content

Commit bb658d0

Browse files
authored
feat(macos): redesign chat window as native shell with sessions sidebar, toolbar pickers, slash commands, and context usage (#101103)
* feat(chat-ui): native macOS chat window shell with sessions sidebar, context usage, and slash commands * feat(macos): host redesigned chat window shell and complete gateway chat transport * fix(chat-ui): gate slash panel on catalog support and register window shell shortcuts outside menus * fix(chat-ui): make sidebar selection tags optional and sync programmatic composer text into the focused NSTextView * fix(macos): track in-window session switches for chat window reuse * fix(chat-ui): re-bootstrap in place when deleting the active main session * docs(macos): describe the redesigned native chat window * fix(macos): scope bare global session RPCs to the routing default agent * style(chat-ui): restore blank line between rebased helpers * fix(macos): scope selected global session actions * fix(macos): refresh chat routing identity * fix(chat-ui): hide delete for main sessions * fix(macos): remove duplicate session patch path * fix(chat-ui): resolve sidebar session aliases * fix(chat-ui): isolate sidebar alias resolution * fix(chat-ui): reconcile active session aliases * fix(chat-ui): prefer selected session aliases * chore(i18n): refresh chat window inventory * fix(chat-ui): return sidebar filter result * refactor(chat-ui): split session actions
1 parent 4e2a80c commit bb658d0

18 files changed

Lines changed: 2203 additions & 182 deletions

apps/.i18n/native-source.json

Lines changed: 295 additions & 23 deletions
Large diffs are not rendered by default.

apps/macos/Sources/OpenClaw/WebChatManager.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ final class WebChatManager {
4242
func show(sessionKey: String) {
4343
self.closePanel()
4444
if let controller = self.windowController {
45+
// The window shell switches sessions in place (sidebar, /new);
46+
// windowSessionKey tracks those switches, so a window already on
47+
// the requested session must not be torn down and re-bootstrapped.
4548
if self.windowSessionKey == sessionKey {
4649
controller.show()
4750
return
@@ -55,6 +58,10 @@ final class WebChatManager {
5558
controller.onVisibilityChanged = { [weak self] visible in
5659
self?.onPanelVisibilityChanged?(visible)
5760
}
61+
controller.onSessionKeyChanged = { [weak self] key in
62+
self?.windowSessionKey = key
63+
self?.currentChatSessionKey = key
64+
}
5865
self.windowController = controller
5966
self.windowSessionKey = sessionKey
6067
self.currentChatSessionKey = sessionKey
@@ -86,6 +93,10 @@ final class WebChatManager {
8693
controller.onVisibilityChanged = { [weak self] visible in
8794
self?.onPanelVisibilityChanged?(visible)
8895
}
96+
controller.onSessionKeyChanged = { [weak self] key in
97+
self?.panelSessionKey = key
98+
self?.currentChatSessionKey = key
99+
}
89100
self.panelController = controller
90101
self.panelSessionKey = sessionKey
91102
self.currentChatSessionKey = sessionKey

0 commit comments

Comments
 (0)