Cleaned up tui view switching
This commit is contained in:
@@ -90,9 +90,9 @@ type Model struct {
|
||||
replyCursor cursor.Model // cursor to indicate incoming response
|
||||
}
|
||||
|
||||
func Chat(tui shared.State) Model {
|
||||
func Chat(state shared.State) Model {
|
||||
m := Model{
|
||||
State: tui,
|
||||
State: state,
|
||||
|
||||
conversation: &models.Conversation{},
|
||||
persistence: true,
|
||||
@@ -125,7 +125,7 @@ func Chat(tui shared.State) Model {
|
||||
m.replyCursor.SetChar(" ")
|
||||
m.replyCursor.Focus()
|
||||
|
||||
system := tui.Ctx.GetSystemPrompt()
|
||||
system := state.Ctx.GetSystemPrompt()
|
||||
if system != "" {
|
||||
m.messages = []models.Message{{
|
||||
Role: models.MessageRoleSystem,
|
||||
|
||||
Reference in New Issue
Block a user