mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
fix: update to toast instead of app exit post changes
This commit is contained in:
parent
bff60e332d
commit
1523afbcc3
1 changed files with 2 additions and 2 deletions
|
@ -983,12 +983,12 @@ func (a appModel) executeCommand(command commands.Command) (tea.Model, tea.Cmd)
|
|||
c.Stdin = os.Stdin
|
||||
c.Stdout = os.Stdout
|
||||
c.Stderr = os.Stderr
|
||||
cmd := tea.ExecProcess(c, func(err error) tea.Msg {
|
||||
cmd := tea.ExecProcess(c, func(err error) tea.Msg {
|
||||
if err != nil {
|
||||
slog.Error("Failed to open config", "error", err)
|
||||
return toast.NewErrorToast("Failed to open config")()
|
||||
}
|
||||
return tea.QuitMsg{}
|
||||
return toast.NewSuccessToast("Config updated, restart to apply changes")()
|
||||
})
|
||||
cmds = append(cmds, cmd)
|
||||
case commands.AppExitCommand:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue