koko210Serve
fc4674bb13
refactor: extract media processing from bot.py into image_handling.py (Phase D Step 19)
- Create process_media_in_message() in utils/image_handling.py that handles all 4 media
types: image attachments, video/GIF attachments, Tenor GIF embeds, and rich embeds
- DRY the send→log→bipolar tail pattern (5x repeated) into _send_log_bipolar() helper
- Unify rich/article/link embed handling to use rephrase_as_miku() instead of inline
Cat→LLM routing, fixing a mood-resolution bug (was using globals.DM_MOOD for servers)
- Add 'rich_embed' media_type to rephrase_as_miku() prefix switch
- Remove 3 inline 'import base64' from bot.py (already module-level in image_handling.py)
- bot.py: 986 → 623 lines (-363)
- image_handling.py: 559 → 881 lines (+322)
- All 170 tests pass (21 config/state + 149 route split)
2026-04-15 12:19:37 +03:00
..
2026-02-23 13:53:22 +02:00
2026-02-23 13:31:15 +02:00
2026-03-05 21:59:27 +02:00
2026-02-23 13:53:22 +02:00
2026-04-11 00:21:44 +03:00
2026-03-05 21:59:27 +02:00
2026-01-22 22:08:07 +02:00
2026-02-27 13:14:03 +02:00
2025-12-07 17:15:09 +02:00
2026-03-03 12:42:33 +02:00
2026-01-10 20:46:19 +02:00
2026-01-10 20:46:19 +02:00
2026-01-10 20:46:19 +02:00
2026-02-15 19:51:00 +02:00
2026-03-30 14:30:34 +03:00
2026-01-11 02:01:41 +02:00
2026-04-11 00:21:44 +03:00
2026-01-09 00:03:59 +02:00
2026-04-10 23:53:14 +03:00
2026-01-10 20:46:19 +02:00
2026-04-15 12:19:37 +03:00
2026-01-10 20:46:19 +02:00
2026-04-11 00:21:44 +03:00
2026-01-10 20:46:19 +02:00
2026-02-19 11:02:58 +02:00
2026-01-10 20:46:19 +02:00
2026-03-04 00:45:23 +02:00
2026-03-04 00:45:23 +02:00
2025-12-07 17:15:09 +02:00
2026-03-31 15:09:57 +03:00
2026-01-10 20:46:19 +02:00
2026-01-10 20:46:19 +02:00
2025-12-07 17:15:09 +02:00
2026-01-20 23:06:17 +02:00
2026-02-18 12:01:08 +02:00
2026-02-08 14:55:01 +02:00
2026-01-10 20:46:19 +02:00
2026-01-30 21:43:20 +02:00
2026-01-20 23:06:17 +02:00
2026-02-27 13:14:03 +02:00
2026-02-18 12:01:08 +02:00
2025-12-07 17:15:09 +02:00