From bbfa60c787f2ec459f1689b9a650ddbec9693ed9 Mon Sep 17 00:00:00 2001
From: Kujtim Hoxha <kujtimii.h@gmail.com>
Date: Wed, 16 Apr 2025 20:06:23 +0200
Subject: reimplement agent,provider and add file history

---
 internal/db/sql/files.sql | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'internal/db/sql/files.sql')

diff --git a/internal/db/sql/files.sql b/internal/db/sql/files.sql
index c2e799076..aba2a6111 100644
--- a/internal/db/sql/files.sql
+++ b/internal/db/sql/files.sql
@@ -6,7 +6,9 @@ WHERE id = ? LIMIT 1;
 -- name: GetFileByPathAndSession :one
 SELECT *
 FROM files
-WHERE path = ? AND session_id = ? LIMIT 1;
+WHERE path = ? AND session_id = ?
+ORDER BY created_at DESC
+LIMIT 1;
 
 -- name: ListFilesBySession :many
 SELECT *
-- 
cgit v1.2.3

