mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-24 19:34:08 +01:00
🚀feat: Archive conversations (#2590)
* 🔧chore: add internationalization labels for archive feature * ✨ feat: Add function to useArchiveConversationMutation() This commit adds a new mutation function `useArchiveConversationMutation()` for archiving conversations. This function takes the ID string of the conversation to be archived and returns a mutation result object. Upon successful archiving, it removes and refreshes the conversation from the query data cache. While ChatGPT PATCHes the archived status by sending `{is_archived: true}` to the URL `/backend-api/conversation/$conversation_id`, this implementation uses the `dataService.updateConversation(payload)` with a POST method, aligning with the existing code conventions. * ✨ feat(api): add is_archived field to Conversation schema and update getConvosByPage method This commit adds a new field `is_archived` with a default value of false to the Conversation schema. It also modifies the `getConvosByPage` method within the Conversation API to adjust the query to only target conversations where `is_archived` is set to false or where the `is_archived` field does not exist. The function `getConvosQueried`, which returns conversations for a specified Conversation ID, was determined not to require consideration of whether `is_archived` is true or false, and thus was not modified. * ♻️ refactor: add className prop to DotsIcon component To enhance the versatility of the DotsIcon component, this commit introduces the ability to specify a className prop, allowing for greater customization. * ✨ feat(ui): add Edit Button to group Title change and Conversation delete buttons Added a new Edit Button to the conversations, similar to the ChatGPT UI, which groups options for editing the conversation title and deleting conversations. This grouping is accessible through a dialogue that appears when the three-dot icon is clicked. * ♻️ refactor(ui): enhance Delete Button to accept className and label options Enhanced the Delete Button component to accept a `className` for customization and an optional `appendLabel`. The DeleteButton component is used by both `Convo.tsx` and `Conversation.tsx`, but currently only `Convo.tsx` is active and `Conversation.tsx `is apparently not used; removing `Conversation.tsx` may eliminate the need for the `appendLabel` property in the future. * ♻️ refactor(ui): enhance RenameButton to accept label options Added the ability to optionally display labels; the Rename Button component is used by both `Convo.tsx` and `Conversation.tsx`, but currently only `Convo.tsx` is active and `Conversation.tsx `is apparently not used; removing `Conversation.tsx` may eliminate the need for the `appendLabel` property in the future. * 🔧 chors: additional localization labels * ♻️ refactor: change is_archived property of conversation to camelCase * Refactor the is_archived property of conversation to camelCase (isArchived) to adhere to the existing code conventions * Modify the function that retrieves conversations to accept the isArchived parameter * ♻️ refactor: add archiveConversation mutation I thought I could divert dataService.updateConversation, but added a new archiveConversation because the request types are different. It might be better to make them common, but to avoid side effects, I added a new function this time. Added process to deleteConversationMutation to delete archived conversations * ✨ feat: Add the function to hide a cancel button in DialogTemplate component The Cancel button is not needed when displaying the archive list, so I made the Cancel button optional. * ♻️ refactor: Add support for filtering archived conversations in Nav component This commit modifies the Nav component to add the ability to filter out archived conversations when fetching data. This is done by adding `isArchived: false` to the query parameters for both the `useConversationsInfiniteQuery()` and `useSearchInfiniteQuery()` hooks, effectively excluding any archived conversations from the results returned. * ♻️ refactor: add Tooltip to DeleteButton * Add Tooltip to DeleteButton component * Display Tooltip when DeleteButton only shows an Icon without text * ✨ feat(ui): add ArchiveButton component for archiving conversations To be compatible with the ChatGPT UI, no confirmation dialog is displayed when ArchiveButton is clicked. The basic behavior conforms to DeleteButton and RenameButton. * ✨ feat(ui): add Archive button to list of conversations Modify the Nav of the conversation list to include a dropdown that contains the Rename and Delete options, similar to the ChatGPT UI. Additionally, an Archive button has been added adjacent to the dropdown menu. * ✨ feat: Add ArchivedChatsTable component Adds the `ArchivedChatsTable` component, which displays a table of archived chats. It has been implemented to be as compatible with the ChatGPT UI as possible. * 🚑 fix(tooltip): increase z-index to ensure visibility over Dialog Resolve an issue where tooltips were not visible when displayed over a Dialog. The z-index of `DialogPrimitive.Portal` in `Dialog.tsx` is set to 999. Since the rationale for this value is unclear, the z-index of the tooltip has been increased to 1000 to guarantee its visibility above the Dialog component. * 🔧 chors: add internationalization labels
This commit is contained in:
parent
436f7195b5
commit
89b1e33be0
41 changed files with 792 additions and 66 deletions
|
|
@ -26,8 +26,7 @@ export default {
|
|||
'ファイルをナレッジとしてアップロードする前に、アシスタントを作成し、Code InterpreterまたはRetrievalを有効にして保存する必要があります。',
|
||||
com_assistants_image_vision: 'Image Vision',
|
||||
com_assistants_code_interpreter: 'Code Interpreter',
|
||||
com_assistants_code_interpreter_files:
|
||||
'次のファイルはCode Interpreterでのみ使用できます。',
|
||||
com_assistants_code_interpreter_files: '次のファイルはCode Interpreterでのみ使用できます。',
|
||||
com_assistants_retrieval: 'Retrieval',
|
||||
com_assistants_search_name: 'Assistantの名前で検索',
|
||||
com_assistants_tools: 'Tools',
|
||||
|
|
@ -44,7 +43,8 @@ export default {
|
|||
com_assistants_update_actions_success: 'アクションが作成または更新されました',
|
||||
com_assistants_update_actions_error: 'アクションの作成または更新中にエラーが発生しました。',
|
||||
com_assistants_delete_actions_error: 'アクションの削除中にエラーが発生しました。',
|
||||
com_assistants_actions_info: 'アシスタントが API を介して情報を取得したり、アクションを実行したりできるようにします\'s',
|
||||
com_assistants_actions_info:
|
||||
'アシスタントが API を介して情報を取得したり、アクションを実行したりできるようにします\'s',
|
||||
com_assistants_name_placeholder: 'オプション: アシスタントの名前',
|
||||
com_assistants_instructions_placeholder: 'アシスタントが使用するシステム指示',
|
||||
com_assistants_description_placeholder: 'オプション: ここにアシスタントについて説明します',
|
||||
|
|
@ -54,7 +54,8 @@ export default {
|
|||
com_assistants_create_success: 'アシスタントが正常に作成されました。',
|
||||
com_assistants_create_error: 'アシスタントの作成中にエラーが発生しました。',
|
||||
com_ui_field_required: '必須入力項目です',
|
||||
com_ui_download_error: 'ファイルのダウンロード中にエラーが発生しました。ファイルが削除された可能性があります。',
|
||||
com_ui_download_error:
|
||||
'ファイルのダウンロード中にエラーが発生しました。ファイルが削除された可能性があります。',
|
||||
com_ui_attach_error_type: 'エンドポイントでサポートされていないファイル タイプ:',
|
||||
com_ui_attach_error_size: 'エンドポイントのファイル サイズ制限を超えました:',
|
||||
com_ui_attach_error:
|
||||
|
|
@ -148,8 +149,13 @@ export default {
|
|||
com_ui_create: '作成',
|
||||
com_ui_delete_conversation: 'チャットを削除しますか?',
|
||||
com_ui_delete_conversation_confirm: 'このチャットは削除されます。',
|
||||
com_ui_delete_assistant_confirm:
|
||||
'このアシスタントを削除しますか? この操作は元に戻せません。',
|
||||
com_ui_delete_assistant_confirm: 'このアシスタントを削除しますか? この操作は元に戻せません。',
|
||||
com_ui_rename: 'タイトル変更',
|
||||
com_ui_archive: 'アーカイブ',
|
||||
com_ui_archive_error: 'アーカイブに失敗しました。',
|
||||
com_ui_unarchive: 'アーカイブ解除',
|
||||
com_ui_unarchive_error: 'アーカイブ解除に失敗しました。',
|
||||
com_ui_more_options: 'More',
|
||||
com_ui_preview: 'プレビュー',
|
||||
com_ui_upload: 'アップロード',
|
||||
com_ui_connect: '接続',
|
||||
|
|
@ -344,7 +350,8 @@ export default {
|
|||
'コンプリーションのステップをスキップする。(最終的な回答と生成されたステップをレビューする機能)',
|
||||
com_endpoint_stop: 'シーケンスを停止',
|
||||
com_endpoint_stop_placeholder: 'Enterキー押下で値を区切ります',
|
||||
com_endpoint_openai_stop: 'APIがさらにトークンを生成するのを止めるため、最大で4つのシーケンスを設定可能',
|
||||
com_endpoint_openai_stop:
|
||||
'APIがさらにトークンを生成するのを止めるため、最大で4つのシーケンスを設定可能',
|
||||
com_endpoint_config_key: 'API Keyを設定',
|
||||
com_endpoint_assistant_placeholder: '右側のサイドパネルからアシスタントを選択してください',
|
||||
com_endpoint_config_placeholder: 'ヘッダーメニューからAPI Keyを設定してください。',
|
||||
|
|
@ -395,7 +402,8 @@ export default {
|
|||
com_nav_plugin_uninstall: 'アンインストール',
|
||||
com_nav_tool_add: '追加',
|
||||
com_nav_tool_dialog: 'アシスタントツール',
|
||||
com_nav_tool_dialog_description: 'ツールの選択を維持するには、アシスタントを保存する必要があります。',
|
||||
com_nav_tool_dialog_description:
|
||||
'ツールの選択を維持するには、アシスタントを保存する必要があります。',
|
||||
com_nav_tool_remove: '削除',
|
||||
com_nav_tool_search: 'ツールを検索',
|
||||
com_show_agent_settings: 'エージェント設定を表示',
|
||||
|
|
@ -429,6 +437,13 @@ export default {
|
|||
com_nav_send_message: 'メッセージを送信する',
|
||||
com_nav_log_out: 'ログアウト',
|
||||
com_nav_user: 'ユーザー',
|
||||
com_nav_archived_chats: 'アーカイブされたチャット',
|
||||
com_nav_archived_chats_manage: '管理',
|
||||
com_nav_archived_chats_empty: 'アーカイブされたチャットはありません',
|
||||
com_nav_archive_all_chats: 'すべてのチャットをアーカイブ',
|
||||
com_nav_archive_all: 'すべてアーカイブする',
|
||||
com_nav_archive_name: '名前',
|
||||
com_nav_archive_created_at: '作成日',
|
||||
com_nav_clear_conversation: '会話を削除する',
|
||||
com_nav_clear_conversation_confirm_message:
|
||||
'本当にすべての会話を削除しますか? この操作は取り消せません。',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue