Commit f3cc2de
committed
Fix compare_to:prompt mode not detecting committed changes
The get_changed_files_prompt() function only looked at staged changes,
which meant files committed during an agent response were not detected.
Changes:
- capture_prompt_work_tree.sh now saves HEAD ref to .last_head_ref
- get_changed_files_prompt() compares HEAD against captured ref to
detect committed changes in addition to staged/untracked files
This fixes rules like uv-lock-sync that use compare_to:prompt not
firing when pyproject.toml is committed before the Stop hook runs.1 parent 0f3a7d8 commit f3cc2de
File tree
4 files changed
+51
-9
lines changed- .deepwork/jobs/deepwork_rules/hooks
- src/deepwork/hooks
4 files changed
+51
-9
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
212 | 215 | | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
215 | 235 | | |
216 | 236 | | |
217 | 237 | | |
218 | 238 | | |
219 | 239 | | |
220 | 240 | | |
221 | | - | |
222 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
223 | 255 | | |
224 | | - | |
| 256 | + | |
225 | 257 | | |
226 | 258 | | |
227 | 259 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments