Skip to content

fix: Show "edit" instead of "create" in permission prompt for existing files#1538

Merged
charlesvien merged 1 commit intomainfrom
04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files
Apr 8, 2026
Merged

fix: Show "edit" instead of "create" in permission prompt for existing files#1538
charlesvien merged 1 commit intomainfrom
04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 7, 2026

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?

Manually

@charlesvien charlesvien changed the title Show "edit" instead of "create" in permission prompt for existing files fix: Show "edit" instead of "create" in permission prompt for existing files Apr 7, 2026
@charlesvien charlesvien force-pushed the 04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files branch from 065f007 to 4b8f8a8 Compare April 8, 2026 02:00
@charlesvien charlesvien force-pushed the 04-07-remove_double_scrollbar_from_repo_selector branch from cfcbb8f to 074bba6 Compare April 8, 2026 02:00
@charlesvien charlesvien marked this pull request as ready for review April 8, 2026 02:04
@charlesvien charlesvien force-pushed the 04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files branch from 4b8f8a8 to d1da956 Compare April 8, 2026 22:55
@charlesvien charlesvien force-pushed the 04-07-remove_double_scrollbar_from_repo_selector branch from 074bba6 to 7e29b50 Compare April 8, 2026 22:55
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 8, 2026

Merge activity

  • Apr 8, 11:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 11:26 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 8, 11:33 PM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-07-remove_double_scrollbar_from_repo_selector to graphite-base/1538 April 8, 2026 23:25
@charlesvien charlesvien changed the base branch from graphite-base/1538 to main April 8, 2026 23:25
@charlesvien charlesvien force-pushed the 04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files branch from d1da956 to 0f172d7 Compare April 8, 2026 23:26
@charlesvien charlesvien merged commit 5fd4618 into main Apr 8, 2026
16 checks passed
@charlesvien charlesvien deleted the 04-07-show_edit_instead_of_create_in_permission_prompt_for_existing_files branch April 8, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

permission request always (or usually?) says "create" instead of "edit" for file writes

2 participants