Most of the new models have been reimplemented
This commit is contained in:
parent
7a5584cf9a
commit
aa828df3ae
19 changed files with 226 additions and 156 deletions
26
internal/common/ui/events/commands.go
Normal file
26
internal/common/ui/events/commands.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package events
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
func Error(err error) tea.Msg {
|
||||
return ErrorMsg(err)
|
||||
}
|
||||
|
||||
func SetStatus(msg string) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
return StatusMsg(msg)
|
||||
}
|
||||
}
|
||||
|
||||
func PromptForInput(prompt string, onDone func(value string) tea.Cmd) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
return PromptForInputMsg{
|
||||
Prompt: prompt,
|
||||
OnDone: onDone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type MessageWithStatus interface {
|
||||
StatusMessage() string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue