diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-19 16:35:45 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 13:42:29 +0200 |
| commit | 2de51274177432b559be3b7deb1f14b9539f2994 (patch) | |
| tree | d47fff06ebf662f6bd7f594c78d0ae97e203a493 /internal/tui/layout | |
| parent | 2b5a33e476ae3c6b5c6345777d20792786836dda (diff) | |
| download | opencode-2de51274177432b559be3b7deb1f14b9539f2994.tar.gz opencode-2de51274177432b559be3b7deb1f14b9539f2994.zip | |
initial tool call stream
Diffstat (limited to 'internal/tui/layout')
| -rw-r--r-- | internal/tui/layout/split.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/internal/tui/layout/split.go b/internal/tui/layout/split.go index a41df6ab8..f3ab9247d 100644 --- a/internal/tui/layout/split.go +++ b/internal/tui/layout/split.go @@ -14,6 +14,10 @@ type SplitPaneLayout interface { SetLeftPanel(panel Container) tea.Cmd SetRightPanel(panel Container) tea.Cmd SetBottomPanel(panel Container) tea.Cmd + + ClearLeftPanel() tea.Cmd + ClearRightPanel() tea.Cmd + ClearBottomPanel() tea.Cmd } type splitPaneLayout struct { @@ -192,6 +196,30 @@ func (s *splitPaneLayout) SetBottomPanel(panel Container) tea.Cmd { return nil } +func (s *splitPaneLayout) ClearLeftPanel() tea.Cmd { + s.leftPanel = nil + if s.width > 0 && s.height > 0 { + return s.SetSize(s.width, s.height) + } + return nil +} + +func (s *splitPaneLayout) ClearRightPanel() tea.Cmd { + s.rightPanel = nil + if s.width > 0 && s.height > 0 { + return s.SetSize(s.width, s.height) + } + return nil +} + +func (s *splitPaneLayout) ClearBottomPanel() tea.Cmd { + s.bottomPanel = nil + if s.width > 0 && s.height > 0 { + return s.SetSize(s.width, s.height) + } + return nil +} + func (s *splitPaneLayout) BindingKeys() []key.Binding { keys := []key.Binding{} if s.leftPanel != nil { |
