Commit d64953c
fix(acp): Allow multiple Ctrl-C calls to exit program (#82)
Previously, Op::Shutdown was silently ignored by the ACP backend,
causing the double Ctrl-C quit mechanism to fail. When a user pressed
Ctrl-C at idle state, the TUI would send Op::Shutdown but the ACP
backend would ignore it, so no ShutdownComplete event was sent back and
the program would never exit.
This change properly handles Op::Shutdown by:
1. Canceling any in-progress ACP session
2. Sending a ShutdownComplete event back to the TUI
This allows the TUI to receive the shutdown signal and exit properly.
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0aeb6ec commit d64953c
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
182 | 195 | | |
183 | 196 | | |
184 | 197 | | |
| |||
198 | 211 | | |
199 | 212 | | |
200 | 213 | | |
201 | | - | |
202 | | - | |
| 214 | + | |
203 | 215 | | |
204 | 216 | | |
205 | 217 | | |
| |||
604 | 616 | | |
605 | 617 | | |
606 | 618 | | |
| 619 | + | |
607 | 620 | | |
608 | 621 | | |
609 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| |||
0 commit comments