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> |
||
|---|---|---|
| .github/workflows | ||
| admin/assets/javascripts/discourse | ||
| app | ||
| assets | ||
| config | ||
| db | ||
| discourse_automation | ||
| evals | ||
| lib | ||
| public/ai-share | ||
| spec | ||
| svg-icons | ||
| test/javascripts | ||
| tokenizers | ||
| .discourse-compatibility | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc.cjs | ||
| .rubocop.yml | ||
| .streerc | ||
| .template-lintrc.cjs | ||
| Gemfile | ||
| Gemfile.lock | ||
| LICENSE | ||
| README.md | ||
| about.json | ||
| eslint.config.mjs | ||
| package.json | ||
| plugin.rb | ||
| pnpm-lock.yaml | ||
| stylelint.config.mjs | ||
| translator.yml | ||
README.md
Discourse AI Plugin
Plugin Summary
For more information, please see: https://meta.discourse.org/t/discourse-ai/259214?u=falco
Evals
The directory evals contains AI evals for the Discourse AI plugin.
You may create a local config by copying config/eval-llms.yml to config/eval-llms.local.yml and modifying the values.
To run them use:
cd evals ./run --help
Usage: evals/run [options]
-e, --eval NAME Name of the evaluation to run
--list-models List models
-m, --model NAME Model to evaluate (will eval all models if not specified)
-l, --list List evals
To run evals you will need to configure API keys in your environment:
OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key GEMINI_API_KEY=your_gemini_api_key