Improve TUI system prompt handling
+ allow setting a default agent
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user