Commit 5fd4618
authored
fix: Show "edit" instead of "create" in permission prompt for existing files (#1538)
## Problem
Write tool permission prompts always say "Create new file" even when overwriting an existing file, because the old file content was never resolved during the permission request flow.
Closes #1529
## Changes
1. Add disk-read fallback in Write tool case when file isn't in the content cache
2. Pass fileContentCache and cwd to toolInfoFromToolUse in permission flow so cached content and relative paths are available
## How did you test this?
Manually1 parent a2b92ee commit 5fd4618
File tree
2 files changed
+15
-4
lines changed- packages/agent/src/adapters/claude
- conversion
- permissions
2 files changed
+15
-4
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
234 | 242 | | |
235 | 243 | | |
236 | 244 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
0 commit comments