13 Commits

Author SHA1 Message Date
d98a69769b
Use correct endpoint for file processing status checks
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.
2025-05-21 12:34:54 -06:00
92e4deda5f
feat: Include file extension in upload URLs
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.
2025-05-21 12:25:09 -06:00
47353d7c8b
feat: Poll for file processing status after upload
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.
2025-05-21 12:23:49 -06:00
6ac3a6d5bc
Fix: Correct file URL generation for uploaded files
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.
2025-05-21 12:02:28 -06:00
bcc42664d0
fix: Update API base URL by removing trailing segment for correct endpoint usage 2025-05-21 11:59:23 -06:00
c6ad3aeae0
fix: Update API base URL and improve request logging in UploadCog 2025-05-21 11:54:31 -06:00
bfd0d606ab
feat: Add timeout and interaction control to captcha modal
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.
2025-05-21 11:50:19 -06:00
04c2dd75b9
Refactor: Simplify captcha interaction and API logic
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.
2025-05-21 11:46:26 -06:00
149a96a90d
feat: Enhance captcha handling with submission tracking and user restriction 2025-05-21 11:43:34 -06:00
085d9be740
feat: Refactor captcha handling to use a view for modal submission 2025-05-21 11:37:42 -06:00
35546ed55b
fix: Add headers to aiohttp ClientSession for UploadCog 2025-05-21 11:20:19 -06:00
6549a5c324
feat: Implement interactive image captcha for file uploads 2025-05-21 11:17:55 -06:00
8788cea989
feat: Add upload cog, update AI model, and refine Teto prompt
- 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.
2025-05-21 11:14:06 -06:00