Open task views in a sheet over the left pane

This commit is contained in:
Ian Gulliver
2026-10-21 17:00:07 -07:00
parent ccb08ab6ec
commit 193401021a
22 changed files with 698 additions and 546 deletions
+5 -5
View File
@@ -357,7 +357,7 @@ struct ComposerView: View {
@Environment(Store.self) private var store
@Environment(Overlays.self) private var overlays
@Environment(\.paneAccent) private var accent
@Environment(\.inRightPane) private var inRightPane
@Environment(\.inTask) private var inTask
@ViewState private var text = ""
@ViewState private var pick: String?
@ViewState private var shownOverride: Bool?
@@ -531,7 +531,7 @@ struct ComposerView: View {
}
}
.onDisappear {
if inRightPane {
if inTask {
store.paneFocus.setDraft(draftKey, false)
}
store.drafts?.flush()
@@ -540,14 +540,14 @@ struct ComposerView: View {
private var editor: some View {
AgentEditor(text: $text, placeholder: chat.placeholder, key: draftKey, height: 104,
focus: $focused, border: inRightPane ? accent : focused ? Palette.accent : Palette.border,
borderWidth: inRightPane && focused ? 2 : 1) {
focus: $focused, border: inTask ? accent : focused ? Palette.accent : Palette.border,
borderWidth: inTask && focused ? 2 : 1) {
submit(modelState())
}
}
private func reportDraft() {
if inRightPane {
if inTask {
store.paneFocus.setDraft(draftKey, !trimmed(text).isEmpty)
}
}