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-04-11 00:21:44 +03:00
2026-02-27 13:11:37 +02:00
2026-02-27 13:14:03 +02:00
2026-04-15 11:38:14 +03:00
2026-03-31 15:16:40 +03:00
2026-04-15 11:38:14 +03:00
2026-04-15 12:19:37 +03:00
2025-12-07 17:15:09 +02:00
2026-04-15 11:38:14 +03:00
2026-04-15 11:38:14 +03:00
2026-04-15 12:19:37 +03:00
2025-12-07 17:15:09 +02:00
2026-04-09 20:34:17 +03:00
2026-04-09 20:34:17 +03:00
2026-04-15 11:38:14 +03:00
2026-04-11 00:21:44 +03:00
2025-12-07 17:15:09 +02:00
2025-12-07 17:15:09 +02:00
2026-02-23 14:31:48 +02:00
2026-04-09 20:34:17 +03:00
2026-01-30 21:43:20 +02:00
2025-12-07 17:15:09 +02:00
2025-12-07 17:15:09 +02:00