discourse-ai/assets/javascripts/discourse
Sam 8b1b6811f4
FEATURE: add support for uploads when starting a convo (#1301)
This commit introduces file upload capabilities to the AI Bot conversations interface and improves the overall dedicated UX experience. It also changes the experimental setting to a more permanent one.

## Key changes:

- **File upload support**:
  - Integrates UppyUpload for handling file uploads in conversations
  - Adds UI for uploading, displaying, and managing attachments
  - Supports drag & drop, clipboard paste, and manual file selection
  - Shows upload progress indicators for in-progress uploads
  - Appends uploaded file markdown to message content

- **Renamed setting**:
  - Changed `ai_enable_experimental_bot_ux` to `ai_bot_enable_dedicated_ux`
  - Updated setting description to be clearer
  - Changed default value to `true` as this is now a stable feature
  - Added migration to handle the setting name change in database

- **UI improvements**:
  - Enhanced input area with better focus states
  - Improved layout and styling for conversations page
  - Added visual feedback for upload states
  - Better error handling for uploads in progress

- **Code organization**:
  - Refactored message submission logic to handle attachments
  - Updated DOM element IDs for consistency
  - Fixed focus management after submission

- **Added tests**:
  - Tests for file upload functionality
  - Tests for removing uploads before submission
  - Updated existing tests to work with the renamed setting


---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2025-05-01 12:21:07 +10:00
..
admin FEATURE: Add spending metrics to AI usage (#1268) 2025-04-17 15:09:48 -07:00
components FEATURE: add support for uploads when starting a convo (#1301) 2025-05-01 12:21:07 +10:00
connectors UX: put full page search discoveries in sidebar (#1289) 2025-04-30 12:01:21 -04:00
controllers FEATURE: add support for uploads when starting a convo (#1301) 2025-05-01 12:21:07 +10:00
lib FEATURE: correctly decorate AI bots (#1300) 2025-04-30 16:36:38 +10:00
routes FEATURE: Auto image captions (#637) 2024-05-27 10:49:24 -07:00
services FEATURE: add support for uploads when starting a convo (#1301) 2025-05-01 12:21:07 +10:00
templates FEATURE: add support for uploads when starting a convo (#1301) 2025-05-01 12:21:07 +10:00
admin-discourse-ai-plugin-route-map.js FEATURE: Configure persona backed features in admin panel (#1245) 2025-04-10 08:16:31 -07:00
admin-discourse-ai-route-map.js FEATURE: Expose sentiment classifications via the admin dashboard. (#284) 2023-11-08 10:50:37 -03:00
discourse-ai-bot-dashboard-route-map.js FEATURE: Bot Conversation Homepage (#1273) 2025-04-22 10:22:03 -05:00
discourse-ai-shared-conversation-show-route-map.js FEATURE: Share conversations with AI via a URL (#521) 2024-03-12 16:51:41 +11:00
preferences-ai-route-map.js FEATURE: Auto image captions (#637) 2024-05-27 10:49:24 -07:00