Commit a776594
committed
Fix: use original file path for context in semantic diff generation
Adjust diff generation to correctly handle renamed or deleted files.
- Introduce `single` as the first file chunk to inspect rename/deletion flags.
- Compute `context_file_path` using the old file path when the chunk represents a rename or deletion, otherwise fall back to the current path.
- Ensure `context_file_path` defaults to `file_path` if it is `None`.
- Retrieve old file lines with `_get_file_lines(context_file_path, base_hash)` instead of always using `file_path`.1 parent a473949 commit a776594
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
| |||
0 commit comments