diff --git a/cmd/chat.go b/cmd/chat.go index 728405b..66a5fe5 100644 --- a/cmd/chat.go +++ b/cmd/chat.go @@ -104,7 +104,7 @@ Be concise and action-oriented. After every tool call, wait for the result.` } history := loadChatHistory() - if history == nil || len(history) == 0 { + if len(history) == 0 { history = []map[string]string{systemPrompt} } else if history[0]["role"] != "system" { history = append([]map[string]string{systemPrompt}, history...)