mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 10:14:22 +01:00
reimplement agent,provider and add file history
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user