@@ -101,25 +101,7 @@ public struct OpenClawChatView: View {
101101 . ignoresSafeArea ( )
102102 }
103103
104- VStack ( spacing: Layout . stackSpacing) {
105- self . messageList
106- . padding ( . horizontal, Layout . outerPaddingHorizontal)
107- OpenClawChatComposer (
108- viewModel: self . viewModel,
109- style: self . style,
110- showsSessionSwitcher: self . showsSessionSwitcher,
111- userAccent: self . userAccent,
112- assistantName: self . assistantName,
113- assistantAvatarText: self . assistantAvatarText,
114- assistantAvatarTint: self . assistantAvatarTint,
115- composerChrome: self . composerChrome,
116- messagePlaceholder: self . messagePlaceholder,
117- talkControl: self . talkControl)
118- . padding ( . horizontal, Layout . composerPaddingHorizontal)
119- }
120- . padding ( . vertical, Layout . outerPaddingVertical)
121- . frame ( maxWidth: . infinity)
122- . frame ( maxHeight: . infinity, alignment: . top)
104+ self . content
123105 }
124106 . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . top)
125107 . onAppear { self . viewModel. load ( ) }
@@ -130,6 +112,49 @@ public struct OpenClawChatView: View {
130112 }
131113 }
132114
115+ @ViewBuilder
116+ private var content : some View {
117+ #if os(macOS)
118+ VStack ( spacing: Layout . stackSpacing) {
119+ self . messageList
120+ . padding ( . horizontal, Layout . outerPaddingHorizontal)
121+ self . composer
122+ . padding ( . horizontal, Layout . composerPaddingHorizontal)
123+ }
124+ . padding ( . vertical, Layout . outerPaddingVertical)
125+ . frame ( maxWidth: . infinity)
126+ . frame ( maxHeight: . infinity, alignment: . top)
127+ #else
128+ VStack ( spacing: 0 ) {
129+ self . messageList
130+ . padding ( . horizontal, Layout . outerPaddingHorizontal)
131+ }
132+ . padding ( . top, Layout . outerPaddingVertical)
133+ . frame ( maxWidth: . infinity)
134+ . frame ( maxHeight: . infinity, alignment: . top)
135+ . safeAreaInset ( edge: . bottom, spacing: 0 ) {
136+ self . composer
137+ . padding ( . horizontal, Layout . composerPaddingHorizontal)
138+ . padding ( . top, Layout . stackSpacing)
139+ . padding ( . bottom, Layout . outerPaddingVertical)
140+ }
141+ #endif
142+ }
143+
144+ private var composer : some View {
145+ OpenClawChatComposer (
146+ viewModel: self . viewModel,
147+ style: self . style,
148+ showsSessionSwitcher: self . showsSessionSwitcher,
149+ userAccent: self . userAccent,
150+ assistantName: self . assistantName,
151+ assistantAvatarText: self . assistantAvatarText,
152+ assistantAvatarTint: self . assistantAvatarTint,
153+ composerChrome: self . composerChrome,
154+ messagePlaceholder: self . messagePlaceholder,
155+ talkControl: self . talkControl)
156+ }
157+
133158 private var messageList : some View {
134159 ZStack {
135160 ScrollView {
0 commit comments