teknium1
e2a834578d
refactor: extract clipboard methods + comprehensive tests (37 tests)
Refactored image paste internals for testability:
- Extracted _try_attach_clipboard_image() method (clipboard → state)
- Extracted _build_multimodal_content() method (images → OpenAI format)
- chat() now delegates to these instead of inline logic
Tests organized in 4 levels:
Level 1 (19 tests): Clipboard module — every platform path with
realistic subprocess simulation (tools writing files, timeouts,
empty files, cleanup on failure)
Level 2 (8 tests): _build_multimodal_content — base64 encoding,
MIME types (png/jpg/webp/unknown), missing files, multiple images,
default question for empty text
Level 3 (5 tests): _try_attach_clipboard_image — state management,
counter increment/rollback, naming convention, mixed success/failure
Level 4 (5 tests): Queue routing — tuple unpacking, command detection,
images-only payloads, text-only payloads
2026-03-05 18:07:53 -08:00
..
2026-02-26 03:20:08 +03:00
2026-03-05 01:58:33 -08:00
2026-02-27 03:29:26 -05:00
2026-03-05 18:07:53 -08:00
2026-02-26 03:20:08 +03:00
2026-02-26 13:55:54 +03:00
2026-02-26 13:54:20 +03:00
2026-03-02 04:34:21 -08:00
2026-02-26 10:56:29 -08:00
2026-03-01 02:42:15 +03:00
2026-03-02 22:53:21 +03:00
2026-02-26 00:53:57 -08:00
2026-03-04 18:10:18 +03:00
2026-02-26 03:20:08 +03:00
2026-03-04 18:34:16 +03:00
2026-03-01 11:53:50 +03:00
2026-02-26 03:20:08 +03:00
2026-03-02 19:15:59 -08:00
2026-02-26 13:27:58 +03:00
2026-02-26 03:20:08 +03:00
2026-02-26 13:54:20 +03:00
2026-03-04 14:22:30 -08:00
2026-03-04 06:06:40 -08:00
2026-02-28 20:33:48 +03:00
2026-03-04 05:30:43 -08:00
2026-03-02 02:00:09 -08:00
2026-03-04 19:19:57 -08:00
2026-03-02 16:11:49 +01:00
2026-02-28 21:25:55 +03:00
2026-03-01 05:28:12 -08:00
2026-02-28 20:33:48 +03:00
2026-03-04 17:23:23 +03:00
2026-03-02 22:53:21 +03:00
2026-02-26 03:20:08 +03:00
2026-03-05 16:44:21 -08:00
2026-03-01 01:54:27 +03:00
2026-02-26 13:30:55 +03:00