Skip to content

Commit

Permalink
refactor base model (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Sep 1, 2023
1 parent 4cc57ca commit 02d236f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/cmd/base/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ type Message struct {
Speaker Speaker
}

type Model struct {
type Base struct {
Window *utils.Window
Cfg *config.Config
TextInput textinput.Model
Conversation []*Message
}

func NewModel() (*Model, error) {
func New() (*Base, error) {
window := utils.NewWindow()

cfg, err := loadConfig()
if err != nil {
return nil, err
}

return &Model{
return &Base{
Window: window,
Cfg: cfg,
TextInput: newTextInput(window.Width),
Expand Down

0 comments on commit 02d236f

Please sign in to comment.