Update the file status polling mechanism to use the `/upload/api/file-status/{file_status_id}` endpoint. The `file_status_id` now includes the file extension when available, ensuring the correct identifier is sent to the API. This resolves issues with incorrect status retrieval and improves reliability of file processing checks.
Append the file extension to the generated upload URL if available. This ensures the URL is more accurate and directly points to the file with its correct type, both at initial generation and after file processing completes.
Implement polling for the uploaded file's `access_ready` status to ensure it's fully processed and available before presenting the final details.
This improves the user experience by:
- Displaying an initial "waiting for file processing" message.
- Editing the same message with the final upload embed once processing is complete, providing a smoother interaction.
Additionally, updated API response keys for file size (from `file_size` to `size`) and original name (from `original_name` to `file_name`) to align with recent API changes.
The previous file URL included a redundant `/upload` segment, leading to an incorrect path. This change removes the extra segment to ensure generated file URLs are valid and accessible.
Set a 10-minute timeout for the `CaptchaModal` to prevent it from hanging indefinitely. Implemented a `wait()` method within the modal, allowing the calling function to asynchronously wait for submission or timeout. This enables proper flow control for the upload process.
Restricted the "Solve Captcha" button in `CaptchaView` to only be clickable by the user who initiated the command, preventing unauthorized interaction.
Removed internal submission tracking (event, timeout flag, wait method) from `CaptchaModal`, streamlining its state management.
Eliminated the `original_interactor_id` check in `CaptchaView`, allowing any user to attempt solving the captcha.
Cleaned up redundant API path normalization logic and removed debugging print statements in `_make_api_request` for a more concise implementation.
- Introduce `upload_cog.py` for handling file uploads.
- Update AI model from `google/gemini-2.5-flash-preview` to `google/gemini-2.5-flash-preview-05-20` for improved performance and stability.
- Refine Teto's roleplay system prompt:
- Add explicit 18+ age disclaimer for all roleplay characters.
- Include context about prepended usernames for better AI understanding.
- Adjust Teto's perceived age to 18 for consistency.
- Remove outdated or unnecessary prompt instructions.