You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The map was being passed down everywhere, but the locking mechanism only
ever lived in `app.go`, which might cause concurrent access issues.
This changes it to a `*csync.Map`.
Signed-off-by: Carlos Alexandro Becker <[email protected]>
Copy file name to clipboardExpand all lines: internal/llm/tools/edit.go
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ import (
10
10
"strings"
11
11
"time"
12
12
13
+
"github.com/charmbracelet/crush/internal/csync"
13
14
"github.com/charmbracelet/crush/internal/diff"
14
15
"github.com/charmbracelet/crush/internal/fsext"
15
16
"github.com/charmbracelet/crush/internal/history"
@@ -39,7 +40,7 @@ type EditResponseMetadata struct {
39
40
}
40
41
41
42
typeeditToolstruct {
42
-
lspClientsmap[string]*lsp.Client
43
+
lspClients*csync.Map[string, *lsp.Client]
43
44
permissions permission.Service
44
45
files history.Service
45
46
workingDirstring
@@ -104,7 +105,7 @@ WINDOWS NOTES:
104
105
Remember: when making multiple file edits in a row to the same file, you should prefer to send all edits in a single message with multiple calls to this tool, rather than multiple messages with a single call each.`
0 commit comments