reimplement agent,provider and add file history

This commit is contained in:
Kujtim Hoxha
2025-04-16 20:06:23 +02:00
parent 76b4065f17
commit bbfa60c787
73 changed files with 3742 additions and 4026 deletions

View File

@@ -3,8 +3,6 @@ package tools
import (
"sync"
"time"
"github.com/kujtimiihoxha/termai/internal/config"
)
// File record to track when files were read/written
@@ -19,14 +17,6 @@ var (
fileRecordMutex sync.RWMutex
)
func removeWorkingDirectoryPrefix(path string) string {
wd := config.WorkingDirectory()
if len(path) > len(wd) && path[:len(wd)] == wd {
return path[len(wd)+1:]
}
return path
}
func recordFileRead(path string) {
fileRecordMutex.Lock()
defer fileRecordMutex.Unlock()