File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
crates/but-claude/src/hooks Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ pub fn handle_post_tool_call() -> anyhow::Result<ClaudeHookOutput> {
371
371
. strip_prefix ( project. path . clone ( ) ) ?
372
372
. to_string_lossy ( )
373
373
. to_string ( ) ;
374
- input. tool_response . file_path = relative_file_path;
374
+ input. tool_response . file_path = relative_file_path. clone ( ) ;
375
375
376
376
let ctx = & mut CommandContext :: open ( & project, AppSettings :: load_from_default_path_creating ( ) ?) ?;
377
377
@@ -406,16 +406,14 @@ pub fn handle_post_tool_call() -> anyhow::Result<ClaudeHookOutput> {
406
406
None ,
407
407
) ?;
408
408
409
- let file_path = Path :: new ( & input. tool_response . file_path ) . strip_prefix ( project. path . clone ( ) ) ?;
410
-
411
409
let assignment_reqs: Vec < HunkAssignmentRequest > = assignments
412
410
. into_iter ( )
413
411
. filter ( |a| a. stack_id . is_none ( ) )
414
412
. filter ( |a| {
415
413
// If the hook_headers is empty, we probably created a file.
416
414
if hook_headers. is_empty ( ) {
417
- Path :: new ( & a. path ) == file_path
418
- } else if Path :: new ( & a. path ) == file_path {
415
+ a. path . to_lowercase ( ) == relative_file_path . to_lowercase ( )
416
+ } else if a. path . to_lowercase ( ) == relative_file_path . to_lowercase ( ) {
419
417
if let Some ( a) = a. hunk_header {
420
418
hook_headers
421
419
. iter ( )
You can’t perform that action at this time.
0 commit comments