diff options
| author | Jay V <[email protected]> | 2025-05-21 15:01:25 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-05-21 15:01:25 -0400 |
| commit | 9049295cc961b250be6144585dde322e778534d7 (patch) | |
| tree | c8a2f09ed6cea54eb9587243eb7dbe298fef1b20 /internal/llm/tools/write.go | |
| parent | 4526b14b17dc49f3ef4f3b1a1d02eff5c6b6b59f (diff) | |
| parent | dff8e77eb6d1709fa1ddeb52d0d9c19afd13d385 (diff) | |
| download | opencode-9049295cc961b250be6144585dde322e778534d7.tar.gz opencode-9049295cc961b250be6144585dde322e778534d7.zip | |
Merge branch 'dev' into docs
Diffstat (limited to 'internal/llm/tools/write.go')
| -rw-r--r-- | internal/llm/tools/write.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/llm/tools/write.go b/internal/llm/tools/write.go index f99b3b789..caefc556f 100644 --- a/internal/llm/tools/write.go +++ b/internal/llm/tools/write.go @@ -6,7 +6,6 @@ import ( "fmt" "os" "path/filepath" - "strings" "time" "github.com/sst/opencode/internal/config" @@ -161,16 +160,11 @@ func (w *writeTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error filePath, ) - rootDir := config.WorkingDirectory() - permissionPath := filepath.Dir(filePath) - if strings.HasPrefix(filePath, rootDir) { - permissionPath = rootDir - } p := w.permissions.Request( ctx, permission.CreatePermissionRequest{ SessionID: sessionID, - Path: permissionPath, + Path: filePath, ToolName: WriteToolName, Action: "write", Description: fmt.Sprintf("Create file %s", filePath), |
