Derrick Hammer (aider)
40b75bc57f
feat(coder): Handle LLM response interruption
...
Introduce a mechanism to cleanly interrupt the LLM's streaming response, particularly useful for GUI or non-terminal interfaces.
- Add `AiderAbortException` to signal interruption from the IO layer.
- Implement `io.is_interrupted()` as a check within the streaming loop (`show_send_output_stream`).
- Update `send_message` to catch `AiderAbortException` and `KeyboardInterrupt`.
- Ensure partial response content is captured and marked as "(interrupted)" in the message history upon interruption.
- Skip post-processing steps (applying edits, running tests/lint, etc.) if the response was interrupted.
- Add tests for the new interruption handling logic.
2025-05-19 04:51:36 -04:00
Paul Gauthier (aider)
3ed897c665
fix: Correct Columns call count assertions in io tests
2025-05-08 09:43:36 -07:00
Paul Gauthier (aider)
bfcff84b28
fix: Patch rich.columns.Columns where it is used
2025-05-08 09:42:18 -07:00
Paul Gauthier (aider)
4124cee722
test: Fix TestInputOutputFormatFiles method signatures
2025-05-08 09:39:22 -07:00
Paul Gauthier (aider)
d18a9f32bc
fix: Fix flaky tests for pretty file list formatting
2025-05-08 09:38:21 -07:00
Paul Gauthier (aider)
aef3863c4a
fix: Remove unused import in test_io.py
2025-05-08 09:36:33 -07:00
Paul Gauthier (aider)
f31128706d
style: Format test_io.py
2025-05-08 09:36:20 -07:00
Paul Gauthier (aider)
1307215b8f
test: Test io.format_files_for_input pretty output
2025-05-08 09:36:15 -07:00
Paul Gauthier (aider)
a07f312089
style: Apply linter fixes
2025-03-31 10:33:00 +13:00
Paul Gauthier (aider)
605d8fe59a
fix: Fix ColorParseError by ensuring hex colors have # prefix
2025-03-31 10:32:48 +13:00
Paul Gauthier (aider)
3b0a5a8b41
style: Format code with linter and remove extra whitespaces
2025-03-05 18:20:56 -08:00
Paul Gauthier (aider)
81d39e9bde
test: Add tests for ensure_hash_prefix and color initialization
2025-03-05 18:20:50 -08:00
Paul Gauthier (aider)
6d0078d39b
style: Remove trailing whitespace in test_io.py
2025-02-06 13:56:22 -08:00
Paul Gauthier (aider)
9b80b693c1
test: add tests for multiline mode restoration after prompt interrupts
2025-02-06 13:56:14 -08:00
Paul Gauthier (aider)
a2622263ce
test: add cases for 's'/'skip' and 'a'/'all' in confirm_ask without group
2025-02-06 08:29:00 -08:00
Paul Gauthier (aider)
0cba898280
fix: Make line endings validation test order-independent
2025-01-13 09:38:36 -08:00
Paul Gauthier (aider)
b9edec069a
fix: Update test to match error message format for line endings validation
2025-01-13 09:38:13 -08:00
Paul Gauthier (aider)
ebb38c6518
style: Format test_io.py to comply with linter rules
2025-01-13 09:36:31 -08:00
Paul Gauthier (aider)
fa80d2f3cc
test: add line endings validation tests for InputOutput
2025-01-13 09:36:26 -08:00
Paul Gauthier (aider)
e94b05851f
style: Format test_io.py with consistent string quotes and spacing
2025-01-11 15:48:10 -08:00
Paul Gauthier (aider)
571a5962b7
test: update test to use invalid Unicode that triggers encoding error
2025-01-11 15:48:05 -08:00
Paul Gauthier (aider)
8b6863dc40
style: Format test_io.py with consistent quotes and spacing
2025-01-11 15:46:33 -08:00
Paul Gauthier (aider)
01af629399
test: add test for Unicode to ASCII fallback in tool messages
2025-01-11 15:46:28 -08:00
Paul Gauthier (aider)
e6be69ec6d
test: add test case for TERM=dumb terminal handling
2025-01-10 14:24:27 -08:00
Paul Gauthier
a6ee3ce07f
cleanup
2024-12-11 20:12:26 -08:00
Paul Gauthier (aider)
5f36ddd425
test: Fix multiline mode tests and add toggle test
2024-12-11 20:10:30 -08:00
Paul Gauthier (aider)
bec67074e0
feat: Add tests for multiline input mode
2024-12-11 20:10:26 -08:00
Paul Gauthier
dde2dee304
fix last test
2024-10-24 14:31:41 -07:00
Paul Gauthier (aider)
55a99143c2
test: set fancy_input=False in all InputOutput() test instances
2024-10-24 14:31:11 -07:00
Paul Gauthier
ba2bee61de
test: fix confirm_ask_yes_no test by disabling fancy input
2024-10-24 14:31:09 -07:00
Paul Gauthier (aider)
5fd8fb15b9
fix: add fancy_input=False to all InputOutput test initializations
2024-10-24 14:27:53 -07:00
Paul Gauthier
0091ab004c
fix: Update autocomplete test to handle partial file names
2024-09-28 15:29:54 -07:00
Paul Gauthier (aider)
d647ebf058
fix: remove unused import of Completion in test_io.py
2024-09-28 15:28:29 -07:00
Paul Gauthier (aider)
c2b48b5256
style: format code and improve readability in test_io.py
2024-09-28 15:28:14 -07:00
Paul Gauthier (aider)
d5b8a15410
test: add unit tests for AutoCompleter.get_command_completions method
2024-09-28 15:28:11 -07:00
Paul Gauthier
2139de76fb
test: remove unused test for command completions in TestInputOutput class
2024-09-28 15:28:10 -07:00
Paul Gauthier (aider)
e832ee8450
style: format code and run linter on test_io.py
2024-09-28 15:24:18 -07:00
Paul Gauthier (aider)
37236aa907
fix: update test_get_command_completions to match new method signature with Document and CompleteEvent parameters
2024-09-28 15:24:14 -07:00
Paul Gauthier (aider)
4ea68efd0e
test: Fix confirm_ask test to handle invalid input and verify call count
2024-09-28 15:19:19 -07:00
Paul Gauthier (aider)
843cc9ee4e
style: run linter and fix whitespace in test_io.py
2024-09-28 15:16:59 -07:00
Paul Gauthier (aider)
ec10ead0c3
test: add unit tests for allow_never option in confirm_ask method
2024-09-28 15:16:56 -07:00
Paul Gauthier (aider)
8da88eef64
fix: remove unused import of builtins module
2024-09-10 14:09:40 -07:00
Paul Gauthier (aider)
3685f307c7
style: reorder imports in test_io.py
2024-09-10 14:09:33 -07:00
Paul Gauthier (aider)
d5d087123a
test: update input mocking in TestInputOutput
2024-09-10 14:09:29 -07:00
Paul Gauthier
e11cd8ecbb
test: update AutoCompleter test for command matching
2024-08-28 16:03:40 -07:00
Paul Gauthier (aider)
d2bc24cb18
fix: update test_get_command_completions to handle matching_commands return value
2024-08-28 16:01:10 -07:00
Paul Gauthier (aider)
6687a24547
style: format test_io.py with linter
2024-08-28 16:00:49 -07:00
Paul Gauthier (aider)
d02e96f773
test: add test case for get_command_completions with "/model gpt" input
2024-08-28 16:00:45 -07:00
Paul Gauthier
a3554ffbbc
fix /read completions
2024-08-27 16:40:07 -07:00
Paul Gauthier
31f7856f41
feat: enhance autocomplete functionality for code tokens and filenames
2024-08-27 15:24:45 -07:00