From 5f780287aecedf08f94b6a1e0ae2a8822683a3fc Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Tue, 10 Dec 2024 17:55:10 +0300 Subject: Fix: display and upsert correct roles and icons --- storage/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/storage.go') diff --git a/storage/storage.go b/storage/storage.go index 9a1595c..b876dbc 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -56,8 +56,8 @@ func (p ProviderSQL) GetLastChatByAgent(agent string) (*models.Chat, error) { func (p ProviderSQL) UpsertChat(chat *models.Chat) (*models.Chat, error) { // Prepare the SQL statement query := ` - INSERT OR REPLACE INTO chats (id, name, msgs, created_at, updated_at) - VALUES (:id, :name, :msgs, :created_at, :updated_at) + INSERT OR REPLACE INTO chats (id, name, msgs, agent, created_at, updated_at) + VALUES (:id, :name, :msgs, :agent, :created_at, :updated_at) RETURNING *;` stmt, err := p.db.PrepareNamed(query) if err != nil { -- cgit v1.2.3