diff options
| author | Albert Ilagan <[email protected]> | 2025-06-15 01:47:34 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-14 12:47:34 -0500 |
| commit | 0239761f31cd754942b2540c905201b08a2bf7ff (patch) | |
| tree | 6ff88bc30f570367edbfe5a0a5150fd1bc68343a | |
| parent | a53f9165e9d6614310f7b4eb9efc355192fdc26e (diff) | |
| download | opencode-0239761f31cd754942b2540c905201b08a2bf7ff.tar.gz opencode-0239761f31cd754942b2540c905201b08a2bf7ff.zip | |
tui: remove quit dialog (#97)
| -rw-r--r-- | packages/tui/internal/tui/tui.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/packages/tui/internal/tui/tui.go b/packages/tui/internal/tui/tui.go index b678d553b..426ebd326 100644 --- a/packages/tui/internal/tui/tui.go +++ b/packages/tui/internal/tui/tui.go @@ -92,13 +92,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { a.modal = nil return a, nil case "ctrl+c": - if _, ok := a.modal.(dialog.QuitDialog); ok { - return a, tea.Quit - } else { - quitDialog := dialog.NewQuitDialog() - a.modal = quitDialog - return a, nil - } + return a, tea.Quit } // don't send commands to the modal @@ -135,8 +129,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case commands.ExecuteCommandMsg: switch msg.Name { case "quit": - quitDialog := dialog.NewQuitDialog() - a.modal = quitDialog + return a, tea.Quit case "new": a.app.Session = &client.SessionInfo{} a.app.Messages = []client.MessageInfo{} |
