💬 feat: assistant conversation starter (#3699)

* feat: initial UI convoStart

* fix: ConvoStarter UI

* fix: convoStarters bug

* feat: Add input field focus on conversation starters

* style: conversation starter UI update

* feat: apply fixes for starters

* style: update conversationStarters UI and fixed typo

* general UI update

* feat: Add onClick functionality to ConvoStarter component

* fix: quick fix test

* fix(AssistantSelect): remove object check

* fix: updateAssistant `conversation_starters` var

* chore: remove starter autofocus

* fix: no empty conversation starters, always show input, use Constants value for max count

* style: Update defaultTextPropsLabel styles, for a11y placeholder

* refactor: Update ConvoStarter component styles and class names for a11y and theme

* refactor: convostarter, move plus button to within persistent element

* fix: types

* chore: Update landing page assistant description styling with theming

* chore: assistant types

* refactor: documents routes

* refactor: optimize conversation starter mutations/queries

* refactor: Update listAllAssistants return type to Promise<Array<Assistant>>

* feat: edit existing starters

* feat(convo-starters): enhance ConvoStarter component and add animations

    - Update ConvoStarter component styling for better visual appeal
    - Implement fade-in animation for smoother appearance
    - Add hover effect with background color change
    - Improve text overflow handling with line-clamp and text-balance
    - Ensure responsive design for various screen sizes

* feat(assistant): add conversation starters to assistant builder

- Add localization strings for conversation starters
- Update mobile.css with shake animation for max starters reached
- Enhance user experience with tooltips and dynamic input handling

* refactor: select specific fields for assistant documents fetch

* refactor: remove endpoint query key, fetch all assistant docs for now, add conversation_starters to v1 methods

* refactor: add document filters based on endpoint config

* fix: starters not applied during creation

* refactor: update AssistantSelect component to handle undefined lastSelectedModels

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Marco Beretta 2024-08-31 13:42:20 -04:00 committed by GitHub
parent 63b80c3067
commit 79f9cd5a4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 602 additions and 214 deletions

View file

@ -549,7 +549,7 @@ export default {
com_nav_change_picture: 'تغيير الصورة',
com_nav_plugin_install: 'تثبيت',
com_nav_plugin_uninstall: 'إلغاء تثبيت',
com_nav_tool_add: 'إضافة',
com_ui_add: 'إضافة',
com_nav_tool_remove: 'إزالة',
com_nav_tool_dialog: 'أدوات المساعد',
com_nav_tool_dialog_description: 'يجب حفظ المساعد لإبقاء اختيارات الأدوات.',
@ -2594,7 +2594,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'إلغاء تثبيت',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'إضافة',
},

View file

@ -425,7 +425,7 @@ export default {
com_nav_plugin_store: 'Loja de plugins',
com_nav_plugin_install: 'Instalar',
com_nav_plugin_uninstall: 'Desinstalar',
com_nav_tool_add: 'Adicionar',
com_ui_add: 'Adicionar',
com_nav_tool_remove: 'Remover',
com_nav_tool_dialog: 'Ferramentas do Assistente',
com_nav_tool_dialog_description:
@ -2021,7 +2021,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'Desinstalar',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Adicionar',
},

View file

@ -216,7 +216,7 @@ export default {
com_ui_fork_from_message: 'Wähle eine Abzweigungsoption',
com_ui_mention:
'Erwähne einen Endpunkt, Assistenten oder eine Voreinstellung, um schnell dorthin zu wechseln',
com_ui_add: 'Ein KI-Modell oder eine Voreinstellung für eine zusätzliche Antwort hinzufügen',
com_ui_add_model_preset: 'Ein KI-Modell oder eine Voreinstellung für eine zusätzliche Antwort hinzufügen',
com_ui_regenerate: 'Neu generieren',
com_ui_continue: 'Fortfahren',
com_ui_edit: 'Bearbeiten',
@ -592,7 +592,7 @@ export default {
com_nav_plugin_store: 'Plugin-Store',
com_nav_plugin_install: 'Installieren',
com_nav_plugin_uninstall: 'Deinstallieren',
com_nav_tool_add: 'Hinzufügen',
com_ui_add: 'Hinzufügen',
com_nav_tool_remove: 'Entfernen',
com_nav_tool_dialog: 'Assistenten-Werkzeuge',
com_ui_misc: 'Sonstiges',
@ -2283,7 +2283,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'Deinstallieren',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Hinzufügen',
},

View file

@ -78,6 +78,8 @@ export default {
com_assistants_update_error: 'There was an error updating your assistant.',
com_assistants_create_success: 'Successfully created',
com_assistants_create_error: 'There was an error creating your assistant.',
com_assistants_conversation_starters: 'Conversation Starters',
com_assistants_conversation_starters_placeholder: 'Enter a conversation starter',
com_ui_date_today: 'Today',
com_ui_date_yesterday: 'Yesterday',
com_ui_date_previous_7_days: 'Previous 7 days',
@ -221,7 +223,8 @@ export default {
com_ui_fork_visible: 'Visible messages only',
com_ui_fork_from_message: 'Select a fork option',
com_ui_mention: 'Mention an endpoint, assistant, or preset to quickly switch to it',
com_ui_add: 'Add a model or preset for an additional response',
com_ui_add_model_preset: 'Add a model or preset for an additional response',
com_assistants_max_starters_reached: 'Max number of conversation starters reached',
com_ui_regenerate: 'Regenerate',
com_ui_continue: 'Continue',
com_ui_edit: 'Edit',
@ -603,7 +606,7 @@ export default {
com_nav_plugin_store: 'Plugin store',
com_nav_plugin_install: 'Install',
com_nav_plugin_uninstall: 'Uninstall',
com_nav_tool_add: 'Add',
com_ui_add: 'Add',
com_nav_tool_remove: 'Remove',
com_nav_tool_dialog: 'Assistant Tools',
com_ui_misc: 'Misc.',

View file

@ -431,7 +431,7 @@ export default {
com_nav_plugin_store: 'Tienda de plugins',
com_nav_plugin_install: 'Instalar',
com_nav_plugin_uninstall: 'Desinstalar',
com_nav_tool_add: 'Agregar',
com_ui_add: 'Agregar',
com_nav_tool_remove: 'Eliminar',
com_nav_tool_dialog: 'Herramientas del asistente',
com_nav_tool_dialog_description:
@ -2153,7 +2153,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'Desinstalar',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Agregar',
},

View file

@ -202,7 +202,7 @@ export default {
com_ui_fork_visible: 'Vain näkyvät viestit',
com_ui_fork_from_message: 'Valitse haarautustapa',
com_ui_mention: 'Mainitse päätepiste, Avustaja tai asetus vaihtaaksesi siihen pikana',
com_ui_add: 'Lisää malli tai esiasetus lisävastausta varten',
com_ui_add_model_preset: 'Lisää malli tai esiasetus lisävastausta varten',
com_ui_regenerate: 'Luo uudestaan',
com_ui_continue: 'Jatka',
com_ui_edit: 'Muokkaa',
@ -571,7 +571,7 @@ export default {
com_nav_plugin_store: 'Lisäosakauppa',
com_nav_plugin_install: 'Asenna',
com_nav_plugin_uninstall: 'Poista',
com_nav_tool_add: 'Lisää',
com_ui_add: 'Lisää',
com_nav_tool_remove: 'Poista',
com_nav_tool_dialog: 'Avustajatyökalut',
com_ui_misc: 'Muu',

View file

@ -418,7 +418,7 @@ export default {
com_ui_date_december: 'Décembre',
com_ui_nothing_found: 'Aucun résultat trouvé',
com_ui_go_to_conversation: 'Aller à la conversation',
com_nav_tool_add: 'Ajouter',
com_ui_add: 'Ajouter',
com_nav_tool_remove: 'Supprimer',
com_nav_tool_dialog: 'Outils de l\'assistant',
com_nav_tool_dialog_description:
@ -624,7 +624,7 @@ export default {
com_ui_upload_invalid_var:
'Fichier non valide pour le téléchargement. L\'image ne doit pas dépasser {0} Mo',
com_ui_read_aloud: 'Lire à haute voix',
com_ui_add: 'Ajouter un modèle ou un préréglage pour une réponse supplémentaire',
com_ui_add_model_preset: 'Ajouter un modèle ou un préréglage pour une réponse supplémentaire',
com_ui_loading: 'Chargement...',
com_ui_all_proper: 'Tout',
com_ui_chat: 'Discussion',
@ -2208,7 +2208,7 @@ export const comparisons = {
english: 'Go to conversation',
translated: 'Aller à la conversation',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Ajouter',
},

View file

@ -354,7 +354,7 @@ export default {
com_nav_plugin_store: 'חנות פלאגין',
com_nav_plugin_install: 'התקן',
com_nav_plugin_uninstall: 'הסר התקנה',
com_nav_tool_add: 'הוסף',
com_ui_add: 'הוסף',
com_nav_tool_remove: 'הסר',
com_nav_tool_dialog: 'כלי סייען',
com_nav_tool_dialog_description: 'יש לשמור את האסיסטנט כדי להמשיך בבחירת הכלים.',
@ -1728,7 +1728,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'הסר התקנה',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'הוסף',
},

View file

@ -483,7 +483,7 @@ export default {
com_nav_plugin_store: 'Store plugin',
com_nav_plugin_install: 'Installa',
com_nav_plugin_uninstall: 'Disinstalla',
com_nav_tool_add: 'Aggiungi',
com_ui_add: 'Aggiungi',
com_nav_tool_remove: 'Rimuovi',
com_nav_tool_dialog: 'Strumenti Assistente',
com_nav_tool_dialog_description:
@ -2326,7 +2326,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'Disinstalla',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Aggiungi',
},

View file

@ -431,7 +431,7 @@ export default {
com_nav_plugin_store: 'プラグインストア',
com_nav_plugin_install: 'インストール',
com_nav_plugin_uninstall: 'アンインストール',
com_nav_tool_add: '追加',
com_ui_add: '追加',
com_nav_tool_dialog: 'アシスタントツール',
com_nav_tool_dialog_description:
'ツールの選択を維持するには、アシスタントを保存する必要があります。',
@ -2165,7 +2165,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'アンインストール',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: '追加',
},

View file

@ -544,7 +544,7 @@ export default {
com_nav_change_picture: '프로필 사진 변경',
com_nav_plugin_install: '플러그인 설치',
com_nav_plugin_uninstall: '플러그인 제거',
com_nav_tool_add: '추가',
com_ui_add: '추가',
com_nav_tool_remove: '제거',
com_nav_tool_dialog: '어시스턴트 도구',
com_nav_tool_dialog_description: 'Assistant를 저장해야 도구 선택이 유지됩니다.',
@ -2595,7 +2595,7 @@ export const comparisons = {
english: 'Uninstall',
translated: '플러그인 제거',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: '추가',
},

View file

@ -567,7 +567,7 @@ export default {
com_nav_welcome_assistant: 'Выберите ассистента',
com_nav_plugin_install: 'Установить',
com_nav_plugin_uninstall: 'Удалить',
com_nav_tool_add: 'Добавить',
com_ui_add: 'Добавить',
com_nav_tool_remove: 'Удалить',
com_nav_tool_dialog: 'Инструменты ассистента',
com_nav_tool_dialog_description:
@ -2656,7 +2656,7 @@ export const comparisons = {
english: 'Uninstall',
translated: 'Удалить',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: 'Добавить',
},

View file

@ -530,7 +530,7 @@ export default {
com_nav_plugin_store: 'Eklenti mağazası',
com_nav_plugin_install: 'Yükle',
com_nav_plugin_uninstall: 'Kaldır',
com_nav_tool_add: 'Ekle',
com_ui_add: 'Ekle',
com_nav_tool_remove: 'Kaldır',
com_nav_tool_dialog: 'Asistan Araçları',
com_nav_tool_dialog_description: 'Araç seçimlerinin kalıcı olması için asistan kaydedilmelidir.',

View file

@ -392,7 +392,7 @@ export default {
com_nav_plugin_store: '插件商店',
com_nav_plugin_install: '安装',
com_nav_plugin_uninstall: '卸载',
com_nav_tool_add: '添加',
com_ui_add: '添加',
com_nav_tool_remove: '移除',
com_nav_tool_dialog: '助手工具',
com_nav_tool_dialog_description: '必须保存助手才能保留工具选择。',
@ -2071,7 +2071,7 @@ export const comparisons = {
english: 'Uninstall',
translated: '卸载',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: '添加',
},

View file

@ -522,7 +522,7 @@ export default {
com_nav_change_picture: '更換圖片',
com_nav_plugin_install: '安裝',
com_nav_plugin_uninstall: '解除安裝',
com_nav_tool_add: '新增',
com_ui_add: '新增',
com_nav_tool_remove: '移除',
com_nav_tool_dialog: 'AI 工具',
com_nav_tool_dialog_description: '必須儲存 Assistant 才能保留工具選擇。',
@ -2563,7 +2563,7 @@ export const comparisons = {
english: 'Uninstall',
translated: '解除安裝',
},
com_nav_tool_add: {
com_ui_add: {
english: 'Add',
translated: '新增',
},

View file

@ -1355,7 +1355,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: Desinstalar
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: Adicionar

View file

@ -1379,7 +1379,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: Deinstallieren
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: Hinzufügen

View file

@ -1355,7 +1355,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: Desinstalar
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: Agregar

View file

@ -1155,7 +1155,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: הסר התקנה
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: הוסף

View file

@ -1507,7 +1507,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: Disinstalla
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: Aggiungi

View file

@ -1407,7 +1407,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: アンインストール
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: 追加

View file

@ -1359,7 +1359,7 @@ Write a prompt that is mindful of the nuances in the language with respect to it
- **english**: Uninstall
- **translated**: 卸载
- **com_nav_tool_add**:
- **com_ui_add**:
- **english**: Add
- **translated**: 添加