Private
Public Access
1
0

Improve TUI system prompt handling

+ allow setting a default agent
This commit is contained in:
2024-09-23 03:00:03 +00:00
parent 676aa7b004
commit a46d211e10
6 changed files with 23 additions and 15 deletions

View File

@@ -139,17 +139,6 @@ func Chat(app *model.AppModel) *Model {
m.replyCursor.SetChar(" ")
m.replyCursor.Focus()
system := app.Ctx.DefaultSystemPrompt()
agent := app.Ctx.GetAgent(app.Ctx.Config.Defaults.Agent)
if agent != nil && agent.SystemPrompt != "" {
system = agent.SystemPrompt
}
if system != "" {
m.App.Messages = api.ApplySystemPrompt(m.App.Messages, system, false)
}
m.input.Focus()
m.input.MaxHeight = 0
m.input.CharLimit = 0