mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
* ✨ feat: add electron page tabs functionality Implement browser-style page tabs in the Electron titlebar: - Add TabBar component with explicit tab creation via context menu (desktop only) - Tab creation triggers: TopicItem/PageItem context menu "Open in New Tab" or double-click - TabBar only visible when tab count >= 2 - Update active tab's reference when navigating within it (tab follows user navigation) - Reuse existing plugin system (pluginRegistry, 11 page plugins, PageReference types) - Persist tabs to localStorage with automatic recovery on restart - Apply logic to TopicItem (agent & group) and PageItem Changes: - src/store/electron/actions/tabPages.ts: New store slice with tab state + actions - src/features/Electron/titlebar/TabBar/: New UI component + storage + hooks - src/features/Electron/navigation/: New useTabNavigation hook + extracted cachedData helper - src/app/.../Topic/List/Item/: Double-click creates tab, context menu "Open in New Tab" - src/app/.../page/.../Item/: Double-click creates tab, context menu "Open in New Tab" - i18n: New keys in topic.ts and file.ts namespaces * ✨ feat: enhance agent topic plugin and tab resolution logic - Added a new line to ensure the cached title is included when resolving tabs in the useResolvedTabs hook. - Minor adjustment in the agentTopicPlugin to improve code clarity. These changes improve the handling of cached titles in the tab resolution process and enhance the overall functionality of the agent topic plugin. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat: enhance agent and conversation handling in PageEditor - Refactored PageAgentProvider to eliminate direct pageAgentId prop, improving context management. - Updated Conversation and Copilot components to utilize conversation state for agent selection, ensuring better handling of chat-group session IDs. - Adjusted FileCopilot to synchronize active agent ID with conversation context, enhancing file interaction capabilities. These changes streamline agent management and improve the overall user experience in the PageEditor feature. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: update ESLint suppressions for chat service [skip ci] - Removed the suppression for `object-shorthand` in `src/services/chat/index.ts` to improve code quality. - Adjusted the ESLint suppressions in `eslint-suppressions.json` for better linting consistency. These changes enhance the linting process by ensuring adherence to coding standards in the chat service files. Signed-off-by: Innei <tukon479@gmail.com> * 🔧 chore: optimize NavigationBar panel width handling * ✨ feat: add tab context menu with close actions Add right-click context menu on tab items: - Close current tab - Close other tabs - Close tabs to the left (disabled on first tab) - Close tabs to the right (disabled on last tab) * 🐛 fix: defer single-click navigation on desktop to prevent double-click addTab race * ✨ feat: implement onActivate method for RecentlyViewed plugins to manage store state transitions - Added onActivate method to RecentlyViewedPlugin interface for handling tab activations. - Updated agentPlugin and agentTopicPlugin to switch topics based on tab activation. - Enhanced PluginRegistry to notify plugins on tab activation. - Modified TabBar to trigger onActivate when a tab is activated. - Improved AgentIdSync to preserve topic state during agent switches. Signed-off-by: Innei <tukon479@gmail.com> * refactor: update test for BackendProxyProtocolManager to throw on upstream fetch failure - Changed test description to reflect behavior change from returning a 502 status to throwing an error. - Updated test implementation to use expect().rejects.toThrow for handling fetch errors. Signed-off-by: Innei <tukon479@gmail.com> * refactor: use optional chaining for agent configuration properties - Updated agent configuration properties to use optional chaining for safer access. - This change prevents potential runtime errors when properties are undefined. Signed-off-by: Innei <tukon479@gmail.com> * refactor: optimize navigation handling in TabBar with startTransition - Introduced startTransition for navigation updates to improve performance and user experience. - Updated handleActivate, handleCloseOthers, handleCloseLeft, and handleCloseRight methods to use startTransition for routing. - Enhanced code readability by grouping navigation logic within startTransition. Signed-off-by: Innei <tukon479@gmail.com> --------- Signed-off-by: Innei <tukon479@gmail.com>
148 lines
8.1 KiB
JSON
148 lines
8.1 KiB
JSON
{
|
||
"addFolder": "创建文件夹",
|
||
"addLibrary": "添加",
|
||
"addPage": "创建文稿",
|
||
"detail.basic.createdAt": "创建时间",
|
||
"detail.basic.filename": "文件名",
|
||
"detail.basic.size": "文件大小",
|
||
"detail.basic.title": "基本信息",
|
||
"detail.basic.type": "格式",
|
||
"detail.basic.updatedAt": "更新时间",
|
||
"detail.data.chunkCount": "分块数",
|
||
"detail.data.embedding.default": "暂未向量化",
|
||
"detail.data.embedding.error": "失败",
|
||
"detail.data.embedding.pending": "待启动",
|
||
"detail.data.embedding.processing": "进行中",
|
||
"detail.data.embedding.success": "已完成",
|
||
"detail.data.embeddingStatus": "向量化",
|
||
"detail.data.noChunk": "无分块",
|
||
"empty": "这里还没有文件或文件夹。先上传一个文件,或创建文稿开始整理",
|
||
"header.actions.builtInBlockList.filtered": "已过滤 {{ignored}} 个文件(共 {{total}} 个文件)",
|
||
"header.actions.connect": "连接…",
|
||
"header.actions.createFolderError": "创建文件夹失败",
|
||
"header.actions.creatingFolder": "正在创建文件夹...",
|
||
"header.actions.deleteLibrary": "删除资料库",
|
||
"header.actions.gitignore.apply": "应用规则",
|
||
"header.actions.gitignore.cancel": "忽略规则",
|
||
"header.actions.gitignore.content": "检测到 .gitignore 文件(共 {{count}} 个文件),是否应用忽略规则?",
|
||
"header.actions.gitignore.filtered": "已过滤 {{ignored}} 个文件(共 {{total}} 个文件)",
|
||
"header.actions.gitignore.title": "检测到 .gitignore",
|
||
"header.actions.newFolder": "新建文件夹",
|
||
"header.actions.newPage": "新建文稿",
|
||
"header.actions.notion.error": "导入遇到了问题。你可以检查文件格式后重试",
|
||
"header.actions.notion.foundFiles": "找到 {{count}} 个文件",
|
||
"header.actions.notion.importing": "正在导入 Notion 内容...",
|
||
"header.actions.notion.noMarkdownFiles": "未在 ZIP 文件中找到 Markdown 文件",
|
||
"header.actions.notion.partial": "已成功导入 {{success}} 个文件,失败 {{failed}} 个",
|
||
"header.actions.notion.success": "成功导入 {{count}} 个文件",
|
||
"header.actions.notionGuide.cancel": "暂不导入",
|
||
"header.actions.notionGuide.desc": "先在 Notion 导出 Markdown(ZIP)。点击继续后选择压缩包,即可导入其中的页面",
|
||
"header.actions.notionGuide.ok": "选择 Notion ZIP",
|
||
"header.actions.notionGuide.title": "导入 Notion 内容",
|
||
"header.actions.uploadFile": "上传文件",
|
||
"header.actions.uploadFolder": "上传文件夹",
|
||
"header.actions.uploadFolder.creatingFolders": "正在创建文件夹结构...",
|
||
"header.newPageButton": "新建文稿",
|
||
"header.uploadButton": "上传",
|
||
"home.getStarted": "开始使用",
|
||
"home.greeting": "开始",
|
||
"home.quickActions": "快捷操作",
|
||
"home.recentFiles": "最近文件",
|
||
"home.recentPages": "最近文稿",
|
||
"home.uploadEntries.files.title": "上传文件",
|
||
"home.uploadEntries.folder.title": "上传文件夹",
|
||
"home.uploadEntries.library.title": "新建资源库",
|
||
"home.uploadEntries.newPage.title": "新建文稿",
|
||
"library.list.confirmRemoveLibrary": "将删除该资源库(其中的文件不会删除,会移入「全部文件」)。删除后不可恢复,建议确认无误再继续",
|
||
"library.list.empty": "点击 <1>+</1> 创建第一个资源库",
|
||
"library.new": "新建资源库",
|
||
"library.title": "库",
|
||
"loadMore": "加载更多",
|
||
"menu.allFiles": "全部文件",
|
||
"menu.allPages": "全部文稿",
|
||
"networkError": "获取资源库失败,请检测网络连接后重试",
|
||
"notSupportGuide.desc": "当前部署模式不支持文件管理功能。请切换到<1>服务端数据库部署模式</1>,或直接使用 <3>LobeHub Cloud</3>",
|
||
"notSupportGuide.features.allKind.desc": "支持主流文件类型,包括 Word、PPT、Excel、PDF、TXT 等常见文档格式,以及 JS、Python 等主流代码文件",
|
||
"notSupportGuide.features.allKind.title": "多种文件类型解析",
|
||
"notSupportGuide.features.embeddings.desc": "使用高性能向量模型,对文本分块进行向量化,实现文件内容的语义化检索",
|
||
"notSupportGuide.features.embeddings.title": "向量语义化",
|
||
"notSupportGuide.features.libraries.desc": "支持创建资源库,允许添加不同类型的文件,构建属于你的领域资源",
|
||
"notSupportGuide.features.libraries.title": "资源库",
|
||
"notSupportGuide.title": "当前部署模式不支持文件管理",
|
||
"pageEditor.addIcon": "添加图标",
|
||
"pageEditor.autoSaveMessage": "文稿会自动保存,无需手动保存",
|
||
"pageEditor.chooseIcon": "选择图标",
|
||
"pageEditor.deleteConfirm.content": "确认删除该文稿吗?删除后不可恢复。建议先导出或复制重要内容",
|
||
"pageEditor.deleteConfirm.title": "删除文稿",
|
||
"pageEditor.deleteError": "删除遇到了问题。你可以重试",
|
||
"pageEditor.deleteSuccess": "文稿删除成功",
|
||
"pageEditor.duplicateError": "页面复制失败",
|
||
"pageEditor.duplicateSuccess": "页面复制成功",
|
||
"pageEditor.editedAt": "最后编辑于 {{time}}",
|
||
"pageEditor.editedBy": "最后编辑者 {{name}}",
|
||
"pageEditor.editorPlaceholder": "输入文稿内容,按 / 打开命令菜单",
|
||
"pageEditor.empty.createNewDocument": "创建新文稿",
|
||
"pageEditor.empty.importNotion": "从 Notion 导入",
|
||
"pageEditor.empty.title": "选择一个文稿以开始",
|
||
"pageEditor.empty.uploadFiles": "上传文件",
|
||
"pageEditor.exportActions.openFile": "打开",
|
||
"pageEditor.exportActions.showInFolder": "在文件夹中显示",
|
||
"pageEditor.exportDialogTitle": "导出页面",
|
||
"pageEditor.exportError": "页面导出失败",
|
||
"pageEditor.exportSuccess": "页面导出成功",
|
||
"pageEditor.linkCopied": "链接已复制",
|
||
"pageEditor.menu.copyLink": "复制链接",
|
||
"pageEditor.menu.export": "导出",
|
||
"pageEditor.menu.export.markdown": "Markdown 格式",
|
||
"pageEditor.menu.exportDocument": "导出文稿",
|
||
"pageEditor.menu.importDocument": "导入文稿",
|
||
"pageEditor.menu.pin": "置顶文稿",
|
||
"pageEditor.saving": "正在保存…",
|
||
"pageEditor.titlePlaceholder": "无标题",
|
||
"pageEditor.wordCount": "{{wordCount}} 字",
|
||
"pageList.actions.openInNewTab": "在新标签页中打开",
|
||
"pageList.copyContent": "复制全文",
|
||
"pageList.duplicate": "创建副本",
|
||
"pageList.empty": "还没有文稿。点击上方按钮创建第一篇",
|
||
"pageList.filter.all": "全部",
|
||
"pageList.filter.onlyInPages": "仅在文稿中",
|
||
"pageList.noResults": "未找到匹配的文稿",
|
||
"pageList.pageCount": "共 {{count}} 个文稿",
|
||
"pageList.pageSizeItem": "{{count}} 个条目",
|
||
"pageList.title": "文稿",
|
||
"pageList.untitled": "无标题",
|
||
"portal.openInPageEditor": "在文稿中编辑",
|
||
"preview.downloadFile": "下载文件",
|
||
"preview.unsupportedFileAndContact": "此文件格式暂不支持在线预览,如有预览诉求,欢迎<1>反馈给我们</1>",
|
||
"resource": "资源",
|
||
"searchFilePlaceholder": "搜索文件",
|
||
"searchPagePlaceholder": "搜索文稿",
|
||
"tab.all": "全部",
|
||
"tab.audios": "语音",
|
||
"tab.documents": "文档",
|
||
"tab.home": "首页",
|
||
"tab.images": "图片",
|
||
"tab.moreTypes": "更多类型",
|
||
"tab.pages": "文稿",
|
||
"tab.videos": "视频",
|
||
"tab.websites": "网页",
|
||
"title": "资源",
|
||
"toggleLeftPanel": "显示/隐藏左侧面板",
|
||
"uploadDock.body.collapse": "收起",
|
||
"uploadDock.body.item.cancel": "取消",
|
||
"uploadDock.body.item.cancelled": "已取消",
|
||
"uploadDock.body.item.done": "已上传",
|
||
"uploadDock.body.item.error": "上传遇到了问题,请重试",
|
||
"uploadDock.body.item.pending": "准备上传…",
|
||
"uploadDock.body.item.processing": "文件处理中…",
|
||
"uploadDock.body.item.restTime": "剩余 {{time}}",
|
||
"uploadDock.fileQueueInfo": "正在上传前 {{count}} 个文件,剩余 {{remaining}} 个文件将排队上传",
|
||
"uploadDock.totalCount": "共 {{count}} 项",
|
||
"uploadDock.uploadStatus.cancelled": "上传已取消",
|
||
"uploadDock.uploadStatus.error": "上传出错",
|
||
"uploadDock.uploadStatus.pending": "等待上传",
|
||
"uploadDock.uploadStatus.processing": "正在上传",
|
||
"uploadDock.uploadStatus.success": "上传完成",
|
||
"uploadDock.uploadStatus.uploading": "正在上传"
|
||
}
|