Commit Graph

14 Commits

Author SHA1 Message Date
76aaf6c437 Fix autonomous logic: prevent actions when user addresses Miku
- Moved on_message_event() call to END of message processing in bot.py
- Only track messages for autonomous when NOT addressed to Miku
- Fixed autonomous_engine.py to convert all message-triggered actions to join_conversation
- Prevent inappropriate autonomous actions (general, share_tweet, change_profile_picture) when triggered by user messages
- Ensures Miku responds to user messages FIRST before any autonomous action fires

This fixes the issue where autonomous actions would fire before Miku's response to user messages, and ensures the 'detect and join conversation' safeguard works properly.
2025-12-10 10:56:34 +02:00
675bb21653 Disable model warmup to improve switching speed
- Added --no-warmup flag to both llama3.1 and vision models
- Reduces model switch time by 2-5 seconds per swap
- No impact on response quality, only minor first-token latency
- Better for frequent model switching use case and tight VRAM budget
2025-12-10 10:09:37 +02:00
a7f3a0a0ee Add comprehensive CLI tool with interactive shell mode
- Created miku-cli.py: Full-featured CLI for Miku bot API
- Added interactive shell mode for continuous command execution
- Implemented all API endpoints: status, mood, autonomous, DM, blocking, profile pictures
- Consistent hyphenated command naming across shell and regular modes
- Created API_REFERENCE.md: Complete API endpoint documentation
- Created CLI_README.md: User guide with examples and usage instructions
- Error handling and user-friendly output formatting
2025-12-10 10:02:34 +02:00
711101816a Fix: Apply twscrape monkey patch to resolve 'Failed to parse scripts' error
Twitter changed their JavaScript response format to include unquoted keys in JSON objects, which breaks twscrape's parser. This fix applies a monkey patch that uses regex to quote the unquoted keys before parsing.

This resolves the issue preventing figurine notifications from being sent for the past several days.

Reference: https://github.com/vladkens/twscrape/issues/284
2025-12-10 09:48:25 +02:00
f27d7f4afe Fix JavaScript integer precision loss for Discord IDs in web UI
- Removed parseInt() calls that were causing Discord snowflake IDs to lose precision
- Discord IDs exceed JavaScript's safe integer limit (2^53-1), causing corruption
- Fixed sendBedtime(), triggerAutonomous(), custom prompt, and addServer() functions
- Keep guild_id and channel_id values as strings throughout the frontend
- Backend FastAPI correctly parses string IDs to Python integers without precision loss
- Resolves issue where wrong server ID was sent (e.g., 1429954521576116200 instead of 1429954521576116337)
2025-12-08 01:14:29 +02:00
330cedd9d1 chore: organize backup files into dated directory structure
- Consolidated all .bak.* files from bot/ directory into backups/2025-12-07/
- Moved unused autonomous_wip.py to backups (verified not imported anywhere)
- Relocated old .bot.bak.80825/ backup directory into backups/2025-12-07/old-bot-bak-80825/
- Preserved autonomous_v1_legacy.py as it is still actively used by autonomous.py
- Created new backups/ directory with date-stamped subdirectory for better organization
2025-12-07 23:54:38 +02:00
9009e9fc80 Add animated GIF support for profile pictures
- Detect animated GIFs and preserve animation frames during upload
- Extract dominant color from first frame for role color syncing
- Generate multi-frame descriptions using existing video analysis pipeline
- Skip face detection/cropping for GIFs to maintain original animation
- Update UI to inform users about GIF support and Nitro requirement
- Add metadata flag to distinguish animated vs static profile pictures
2025-12-07 23:48:12 +02:00
782d8e4f84 Fix syntax error in image processing: fix truncated variable assignment 2025-12-07 18:03:36 +02:00
7dd671d6cf Fix syntax error: remove stray URL in bot.py 2025-12-07 18:02:22 +02:00
d58be3b33e Remove all Ollama remnants and complete migration to llama.cpp
- Remove Ollama-specific files (Dockerfile.ollama, entrypoint.sh)
- Replace all query_ollama imports and calls with query_llama
- Remove langchain-ollama dependency from requirements.txt
- Update all utility files (autonomous, kindness, image_generation, etc.)
- Update README.md documentation references
- Maintain backward compatibility alias in llm.py
2025-12-07 17:50:28 +02:00
a6da4c0c2e Update README.md 2025-12-07 17:36:59 +02:00
37063b7f85 Add comprehensive README with features, setup, and documentation 2025-12-07 17:29:24 +02:00
88d4256755 Organize documentation: Move all .md files to readmes/ directory 2025-12-07 17:21:59 +02:00
8c74ad5260 Initial commit: Miku Discord Bot 2025-12-07 17:15:09 +02:00