Introduces `get_user_avatar_data` to retrieve a user's avatar as base64 encoded image data, allowing the AI to "see" the profile picture directly. This includes special handling in `process_requested_tools` to attach the image as a `types.Part` in the prompt.
Also adds `get_user_highest_role_color` to fetch the color and details of a user's highest-positioned role.
Update Gurt's prompt to clarify that Ame-chan is not an AI and introduce the KAngel bot. Also, update the Gemini model version to `gemini-2.5-flash-preview-05-20` and remove uptime from server specs.
This commit improves user identification in two key areas:
1. **AI Response Context:**
In `gurt/api.py`, messages processed by the AI now include a more informative author string, combining the user's display name and username (e.g., "DisplayName (Username: actual_username)"). This provides richer context about message authors.
2. **Tool Definitions:**
Descriptions for tools in `gurt/config.py` and `gurt/prompt.py` (e.g., `search_user_messages`, `get_user_facts`) and their parameters have been updated to explicitly state that user identification relies on "User ID". This enhances clarity for the AI model and developers.
Updated the description for `run_terminal_command` to specify it runs in an "empty" Docker sandbox.
Added documentation for the new `execute_internal_command` tool, which executes commands on the host machine.
Implement `/gurtignore` commands to manage channels Gurt should ignore.
- Add `gurtignore add` to add a channel to the ignore list.
- Add `gurtignore remove` to remove a channel from the ignore list.
- Add `gurtignore list` to display currently ignored channels.
- Update `GurtCog` and `config.py` to support ignored channel IDs and file management.
- Ensure ignore commands are owner-only.
- Modify `listeners.py` to prevent Gurt from processing messages in ignored channels.
This commit adds the loading of the lockdown cog in main.py. It also includes error handling to catch and log any exceptions that may occur during the loading process, improving the bot's robustness.
Implement new slash commands `/headpat` and `/hug` to `MessageCog` and `NeruMessageCog`. These commands send wholesome messages to mentioned users and track usage between them.
Adds a counter to the molest and rape commands, showing how many times the interaction has occurred between the two users. This provides immediate feedback on the frequency of these actions.
Introduces a new `command_usage_counters` table to track how many times specific commands are used between two users.
- Adds `_ensure_usage_table_exists` to create the table if it doesn't exist.
- Implements `_increment_usage_counter` to update or insert usage counts.
- Adds `_get_usage_count` to retrieve usage counts.
- Integrates usage tracking into the `molest` command (both slash and legacy).
- Adds logging for database operations related to usage tracking.
Changes the `group_customizations` data structure to store a dictionary containing `name` and `description` for each group, rather than just the custom name. This aligns with how command customizations are stored and prepares for future additions like custom group descriptions.
Updates the dashboard UI and settings cog to correctly display the new group customization format, while maintaining backward compatibility for existing data.
- Move `initCustomBot` call from `DOMContentLoaded` listener in `custom-bot.js` to `initDashboard` in `utils.js`.
- Ensure `initCustomBot` is called only after user authentication is checked and dashboard elements are ready.
- Add `show`, `hide`, and `toggle` utility functions to the `DOM` object in `utils.js` for managing element visibility.
This commit introduces a new custom bot configuration dashboard, providing a streamlined interface for managing bot settings.
Key changes include:
- **UI/UX Enhancements:**
- Added new CSS for a modern, responsive dashboard layout, including header, navigation, and form styling.
- Implemented a dynamic bot status indicator (online/offline).
- Improved form validation and user feedback mechanisms.
- **Frontend Logic:**
- Refactored `custom-bot.js` to handle loading, saving, and validating bot settings.
- Integrated `showFeedback` utility for consistent user notifications.
- Updated API calls to use `fetch` for better control and error handling.
- **HTML Structure:**
- Modified `index.html` to incorporate the new dashboard layout and elements.
- **Utility Functions:**
- Added `showFeedback` function in `utils.js` for displaying success/error messages.
This feature significantly improves the user experience for configuring custom bots.