Private
Public Access
1
0

Cleaned up tui view switching

This commit is contained in:
2024-05-30 07:18:31 +00:00
parent ed784bb1cf
commit 97cd047861
3 changed files with 14 additions and 22 deletions

View File

@@ -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,