🔖 feat: Conversation Bookmarks (#3344)

* feat: add tags property in Conversation model

* feat: add ConversationTag model

* feat: add the tags parameter to getConvosByPage

* feat: add API route to ConversationTag

* feat: add types of ConversationTag

* feat: add data access functions for conversation tags

* feat: add Bookmark table component

* feat: Add an action to bookmark

* feat: add Bookmark nav component

* fix: failed test

* refactor: made 'Saved' tag a constant

* feat: add new bookmark to current conversation

* chore: Add comment

* fix: delete tag from conversations when it's deleted

* fix: Update the query cache when the tag title is changed.

* chore: fix typo

* refactor: add description of rebuilding bookmarks

* chore: remove unused variables

* fix: position when adding a new bookmark

* refactor: add comment, rename a function

* refactor: add a unique constraint in ConversationTag

* chore: add localizations
This commit is contained in:
Yuichi Oneda 2024-07-29 07:45:59 -07:00 committed by GitHub
parent d4d56281e3
commit e565e0faab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 3751 additions and 36 deletions

View file

@ -71,6 +71,20 @@ export default {
com_ui_unarchive: '取消封存',
com_ui_unarchive_error: '取消封存對話時發生錯誤',
com_ui_more_options: '更多',
com_ui_bookmarks: '書籤',
com_ui_bookmarks_rebuild: '重建',
com_ui_bookmarks_new: '新書籤',
com_ui_bookmark_delete_confirm: '你確定要刪除這個書籤嗎?',
com_ui_bookmarks_title: '標題',
com_ui_bookmarks_count: '計數',
com_ui_bookmarks_description: '描述',
com_ui_bookmarks_create_success: '書籤創建成功',
com_ui_bookmarks_update_success: '書籤更新成功',
com_ui_bookmarks_delete_success: '書籤刪除成功',
com_ui_bookmarks_create_error: '創建書籤時出錯',
com_ui_bookmarks_update_error: '更新書籤時出錯',
com_ui_bookmarks_delete_error: '刪除書籤時出錯',
com_ui_bookmarks_add_to_conversation: '添加到當前對話',
com_auth_error_login: '無法使用提供的資訊登入。請檢查您的登入資訊後重試。',
com_auth_error_login_rl: '短時間內嘗試登入的次數過多。請稍後再試。',
com_auth_error_login_ban: '由於違反我們的服務條款,您的帳號已被暫時停用。',
@ -281,6 +295,8 @@ export default {
com_nav_help_faq: '說明與常見問題',
com_nav_settings: '設定',
com_nav_search_placeholder: '搜尋訊息',
com_nav_info_bookmarks_rebuild:
'如果書籤計數不正確,請重新構建書籤信息。書籤計數將被重新計算,數據將恢復到其正確狀態。',
com_nav_setting_general: '一般',
com_nav_setting_data: '資料控制',
/* The following are AI translated */
@ -328,6 +344,7 @@ export default {
com_sidepanel_hide_panel: '隱藏側邊選單',
com_sidepanel_attach_files: '附加檔案',
com_sidepanel_manage_files: '管理檔案',
com_sidepanel_conversation_tags: '書籤',
com_assistants_capabilities: '功能',
com_assistants_knowledge: '知識',
com_assistants_knowledge_info: '如果您在「知識」下上傳檔案,與您的助理的對話可能會包含檔案內容。',
@ -830,6 +847,62 @@ export const comparisons = {
english: 'More',
translated: '更多',
},
com_ui_bookmarks: {
english: 'Bookmarks',
translated: '書籤',
},
com_ui_bookmarks_rebuild: {
english: 'Rebuild',
translated: '重建',
},
com_ui_bookmarks_new: {
english: 'New Bookmark',
translated: '新書籤',
},
com_ui_bookmark_delete_confirm: {
english: 'Are you sure you want to delete this bookmark?',
translated: '你確定要刪除這個書籤嗎?',
},
com_ui_bookmarks_title: {
english: 'Title',
translated: '標題',
},
com_ui_bookmarks_count: {
english: 'Count',
translated: '計數',
},
com_ui_bookmarks_description: {
english: 'Description',
translated: '描述',
},
com_ui_bookmarks_create_success: {
english: 'Bookmark created successfully',
translated: '書籤創建成功',
},
com_ui_bookmarks_update_success: {
english: 'Bookmark updated successfully',
translated: '書籤更新成功',
},
com_ui_bookmarks_delete_success: {
english: 'Bookmark deleted successfully',
translated: '書籤刪除成功',
},
com_ui_bookmarks_create_error: {
english: 'There was an error creating the bookmark',
translated: '創建書籤時出錯',
},
com_ui_bookmarks_update_error: {
english: 'There was an error updating the bookmark',
translated: '更新書籤時出錯',
},
com_ui_bookmarks_delete_error: {
english: 'There was an error deleting the bookmark',
translated: '刪除書籤時出錯',
},
com_ui_bookmarks_add_to_conversation: {
english: 'Add to current conversation',
translated: '添加到當前對話',
},
com_auth_error_login: {
english:
'Unable to login with the information provided. Please check your credentials and try again.',
@ -1626,6 +1699,12 @@ export const comparisons = {
english: 'Search messages',
translated: '搜尋訊息',
},
com_nav_info_bookmarks_rebuild: {
english:
'If the bookmark count is incorrect, please rebuild the bookmark information. The bookmark count will be recalculated and the data will be restored to its correct state.',
translated:
'如果書籤計數不正確,請重新構建書籤信息。書籤計數將被重新計算,數據將恢復到其正確狀態。',
},
com_nav_setting_general: {
english: 'General',
translated: '一般',
@ -1806,6 +1885,10 @@ export const comparisons = {
english: 'Manage Files',
translated: '管理檔案',
},
com_sidepanel_conversation_tags: {
english: 'Bookmarks',
translated: '書籤',
},
com_assistants_capabilities: {
english: 'Capabilities',
translated: '功能',