From 85b5943b9e9e6828556818f31fc5a550fbfc2813 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:14:11 +0800 Subject: [PATCH 1/5] Update issue templates --- .github/ISSUE_TEMPLATE/bug-报告.md | 31 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/性能优化.md | 20 ++++++++++++++ .github/ISSUE_TEMPLATE/技术询问.md | 20 ++++++++++++++ .github/ISSUE_TEMPLATE/文档改进.md | 20 ++++++++++++++ .github/ISSUE_TEMPLATE/现有功能改进.md | 20 ++++++++++++++ .github/ISSUE_TEMPLATE/重构与技术债.md | 21 +++++++++++++++ .github/ISSUE_TEMPLATE/重要功能提案.md | 36 ++++++++++++++++++++++++++ 7 files changed, 168 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-报告.md create mode 100644 .github/ISSUE_TEMPLATE/性能优化.md create mode 100644 .github/ISSUE_TEMPLATE/技术询问.md create mode 100644 .github/ISSUE_TEMPLATE/文档改进.md create mode 100644 .github/ISSUE_TEMPLATE/现有功能改进.md create mode 100644 .github/ISSUE_TEMPLATE/重构与技术债.md create mode 100644 .github/ISSUE_TEMPLATE/重要功能提案.md diff --git a/.github/ISSUE_TEMPLATE/bug-报告.md b/.github/ISSUE_TEMPLATE/bug-报告.md new file mode 100644 index 0000000..244c2b1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-报告.md @@ -0,0 +1,31 @@ +--- +name: Bug 报告 +about: 报告发现的问题,帮助我们修复它 +title: "[Bug]: <在这里简述问题>" +labels: 'type: bug' +assignees: '' + +--- + +## 问题描述 + + +## 复现步骤 + +1. 第一步... +2. 第二步... +3. 看到错误结果... + +## 预期行为 + + +## 截图 / 录屏 + + +## 环境信息 +- **操作系统:** (例如: Windows 11 / macOS 26) +- **版本号:** (例如: v5.2.0/源码开发) +- **相关依赖(仅源码编译时需要提供此项):** (例如: Node.js 20) + +## 额外信息 + diff --git a/.github/ISSUE_TEMPLATE/性能优化.md b/.github/ISSUE_TEMPLATE/性能优化.md new file mode 100644 index 0000000..6ab59da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/性能优化.md @@ -0,0 +1,20 @@ +--- +name: 性能优化 +about: 报告性能瓶颈并提议优化方案 +title: "[PERF]: <优化点名称>" +labels: 'type: enhancement' +assignees: '' + +--- + +## 当前性能现状 + + +## 瓶颈分析 + + +## 预期优化目标 + + +## 优化思路 + diff --git a/.github/ISSUE_TEMPLATE/技术询问.md b/.github/ISSUE_TEMPLATE/技术询问.md new file mode 100644 index 0000000..b523540 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/技术询问.md @@ -0,0 +1,20 @@ +--- +name: 技术询问 +about: 如果你对使用方法有疑问,可以在这里提问 +title: "[Q&A]: <在这里简述你的疑问>" +labels: 'type: question' +assignees: '' + +--- + +## 你的问题是什么? + + +## 你已经尝试过的方法 + + +## 相关代码片段 (如果有) + +```javascript +// 代码示例 +``` diff --git a/.github/ISSUE_TEMPLATE/文档改进.md b/.github/ISSUE_TEMPLATE/文档改进.md new file mode 100644 index 0000000..e9371d5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/文档改进.md @@ -0,0 +1,20 @@ +--- +name: 文档改进 +about: 修正文档错误或补充说明 +title: "[DOCS]: <文档位置或主题>" +labels: 'type: docs' +assignees: '' + +--- + +## 相关文档链接 + + +## 当前问题 + + +## 建议修改内容 + + +## 我可以贡献 PR +- [ ] 是的,我愿意认领此任务并提交 Pull Request diff --git a/.github/ISSUE_TEMPLATE/现有功能改进.md b/.github/ISSUE_TEMPLATE/现有功能改进.md new file mode 100644 index 0000000..b3dbbe0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/现有功能改进.md @@ -0,0 +1,20 @@ +--- +name: 现有功能改进 +about: " 提交你的想法,让这个项目变得更好" +title: "[Enhancement]: <在这里简述你的需求>" +labels: 'type: enhancement' +assignees: '' + +--- + +## 是否遇到了具体的问题? + + +## 你的建议 + + +## 备选方案 + + +## 备注 + diff --git a/.github/ISSUE_TEMPLATE/重构与技术债.md b/.github/ISSUE_TEMPLATE/重构与技术债.md new file mode 100644 index 0000000..da68ea0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/重构与技术债.md @@ -0,0 +1,21 @@ +--- +name: 重构与技术债 +about: 针对现有代码结构的优化,不涉及业务逻辑改变 +title: "[REFACTOR]: <重构模块名>" +labels: 'priority: high' +assignees: '' + +--- + +## 重构背景 + + +## 技术债描述 + + +## 重构计划 + + + +## 回归测试说明 + diff --git a/.github/ISSUE_TEMPLATE/重要功能提案.md b/.github/ISSUE_TEMPLATE/重要功能提案.md new file mode 100644 index 0000000..5c58882 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/重要功能提案.md @@ -0,0 +1,36 @@ +--- +name: 重要功能提案 +about: 提议新特性或重大改进,需详细描述方案 +title: "[FEAT]: <提案简述>" +labels: 'type: feature' +assignees: '' + +--- + +## 摘要 + + +## 动机 + + +## 目标 + +- [ ] +- [ ] + +## 非目标 (可选) + + +## 提议方案 + +### 1. 实现细节 + + +### 2. 破坏性变更 + + +## 备选方案 + + +## 测试计划 + From bd6b23f4131cac0c4e00ec55ac7caf4926071525 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:20:28 +0800 Subject: [PATCH 2/5] Revert "Update issue templates" This reverts commit 85b5943b9e9e6828556818f31fc5a550fbfc2813. --- .github/ISSUE_TEMPLATE/bug-报告.md | 31 ---------------------- .github/ISSUE_TEMPLATE/性能优化.md | 20 -------------- .github/ISSUE_TEMPLATE/技术询问.md | 20 -------------- .github/ISSUE_TEMPLATE/文档改进.md | 20 -------------- .github/ISSUE_TEMPLATE/现有功能改进.md | 20 -------------- .github/ISSUE_TEMPLATE/重构与技术债.md | 21 --------------- .github/ISSUE_TEMPLATE/重要功能提案.md | 36 -------------------------- 7 files changed, 168 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-报告.md delete mode 100644 .github/ISSUE_TEMPLATE/性能优化.md delete mode 100644 .github/ISSUE_TEMPLATE/技术询问.md delete mode 100644 .github/ISSUE_TEMPLATE/文档改进.md delete mode 100644 .github/ISSUE_TEMPLATE/现有功能改进.md delete mode 100644 .github/ISSUE_TEMPLATE/重构与技术债.md delete mode 100644 .github/ISSUE_TEMPLATE/重要功能提案.md diff --git a/.github/ISSUE_TEMPLATE/bug-报告.md b/.github/ISSUE_TEMPLATE/bug-报告.md deleted file mode 100644 index 244c2b1..0000000 --- a/.github/ISSUE_TEMPLATE/bug-报告.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug 报告 -about: 报告发现的问题,帮助我们修复它 -title: "[Bug]: <在这里简述问题>" -labels: 'type: bug' -assignees: '' - ---- - -## 问题描述 - - -## 复现步骤 - -1. 第一步... -2. 第二步... -3. 看到错误结果... - -## 预期行为 - - -## 截图 / 录屏 - - -## 环境信息 -- **操作系统:** (例如: Windows 11 / macOS 26) -- **版本号:** (例如: v5.2.0/源码开发) -- **相关依赖(仅源码编译时需要提供此项):** (例如: Node.js 20) - -## 额外信息 - diff --git a/.github/ISSUE_TEMPLATE/性能优化.md b/.github/ISSUE_TEMPLATE/性能优化.md deleted file mode 100644 index 6ab59da..0000000 --- a/.github/ISSUE_TEMPLATE/性能优化.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 性能优化 -about: 报告性能瓶颈并提议优化方案 -title: "[PERF]: <优化点名称>" -labels: 'type: enhancement' -assignees: '' - ---- - -## 当前性能现状 - - -## 瓶颈分析 - - -## 预期优化目标 - - -## 优化思路 - diff --git a/.github/ISSUE_TEMPLATE/技术询问.md b/.github/ISSUE_TEMPLATE/技术询问.md deleted file mode 100644 index b523540..0000000 --- a/.github/ISSUE_TEMPLATE/技术询问.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 技术询问 -about: 如果你对使用方法有疑问,可以在这里提问 -title: "[Q&A]: <在这里简述你的疑问>" -labels: 'type: question' -assignees: '' - ---- - -## 你的问题是什么? - - -## 你已经尝试过的方法 - - -## 相关代码片段 (如果有) - -```javascript -// 代码示例 -``` diff --git a/.github/ISSUE_TEMPLATE/文档改进.md b/.github/ISSUE_TEMPLATE/文档改进.md deleted file mode 100644 index e9371d5..0000000 --- a/.github/ISSUE_TEMPLATE/文档改进.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 文档改进 -about: 修正文档错误或补充说明 -title: "[DOCS]: <文档位置或主题>" -labels: 'type: docs' -assignees: '' - ---- - -## 相关文档链接 - - -## 当前问题 - - -## 建议修改内容 - - -## 我可以贡献 PR -- [ ] 是的,我愿意认领此任务并提交 Pull Request diff --git a/.github/ISSUE_TEMPLATE/现有功能改进.md b/.github/ISSUE_TEMPLATE/现有功能改进.md deleted file mode 100644 index b3dbbe0..0000000 --- a/.github/ISSUE_TEMPLATE/现有功能改进.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 现有功能改进 -about: " 提交你的想法,让这个项目变得更好" -title: "[Enhancement]: <在这里简述你的需求>" -labels: 'type: enhancement' -assignees: '' - ---- - -## 是否遇到了具体的问题? - - -## 你的建议 - - -## 备选方案 - - -## 备注 - diff --git a/.github/ISSUE_TEMPLATE/重构与技术债.md b/.github/ISSUE_TEMPLATE/重构与技术债.md deleted file mode 100644 index da68ea0..0000000 --- a/.github/ISSUE_TEMPLATE/重构与技术债.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: 重构与技术债 -about: 针对现有代码结构的优化,不涉及业务逻辑改变 -title: "[REFACTOR]: <重构模块名>" -labels: 'priority: high' -assignees: '' - ---- - -## 重构背景 - - -## 技术债描述 - - -## 重构计划 - - - -## 回归测试说明 - diff --git a/.github/ISSUE_TEMPLATE/重要功能提案.md b/.github/ISSUE_TEMPLATE/重要功能提案.md deleted file mode 100644 index 5c58882..0000000 --- a/.github/ISSUE_TEMPLATE/重要功能提案.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: 重要功能提案 -about: 提议新特性或重大改进,需详细描述方案 -title: "[FEAT]: <提案简述>" -labels: 'type: feature' -assignees: '' - ---- - -## 摘要 - - -## 动机 - - -## 目标 - -- [ ] -- [ ] - -## 非目标 (可选) - - -## 提议方案 - -### 1. 实现细节 - - -### 2. 破坏性变更 - - -## 备选方案 - - -## 测试计划 - From bedb872034d1444b1a00814a8d1938b3fec0c2f8 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:23:18 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ChatPage.tsx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/pages/ChatPage.tsx b/src/pages/ChatPage.tsx index c2502f0..9da3b4e 100644 --- a/src/pages/ChatPage.tsx +++ b/src/pages/ChatPage.tsx @@ -3028,18 +3028,19 @@ function ChatPage(props: ChatPageProps) { return } if (result.success && result.messages) { + const resultMessages = result.messages if (offset === 0) { - setMessages(result.messages) - persistSessionPreviewCache(sessionId, result.messages) - if (result.messages.length === 0) { + setMessages(resultMessages) + persistSessionPreviewCache(sessionId, resultMessages) + if (resultMessages.length === 0) { setNoMessageTable(true) setHasMoreMessages(false) } // 群聊发送者信息补齐改为非阻塞执行,避免影响首屏切换 const isGroup = sessionId.includes('@chatroom') - if (isGroup && result.messages.length > 0) { - const unknownSenders = [...new Set(result.messages + if (isGroup && resultMessages.length > 0) { + const unknownSenders = [...new Set(resultMessages .filter(m => m.isSend !== 1 && m.senderUsername && !senderAvatarCache.has(m.senderUsername)) .map(m => m.senderUsername as string) )] @@ -3051,7 +3052,7 @@ function ChatPage(props: ChatPageProps) { // 日期跳转时滚动到顶部,否则滚动到底部 requestAnimationFrame(() => { if (isDateJumpRef.current) { - if (messageVirtuosoRef.current && result.messages.length > 0) { + if (messageVirtuosoRef.current && resultMessages.length > 0) { messageVirtuosoRef.current.scrollToIndex({ index: 0, align: 'start', behavior: 'auto' }) } else if (messageListRef.current) { messageListRef.current.scrollTop = 0 @@ -3060,7 +3061,7 @@ function ChatPage(props: ChatPageProps) { return } - const lastIndex = result.messages.length - 1 + const lastIndex = resultMessages.length - 1 if (lastIndex >= 0 && messageVirtuosoRef.current) { messageVirtuosoRef.current.scrollToIndex({ index: lastIndex, align: 'end', behavior: 'auto' }) } else if (messageListRef.current) { @@ -3068,12 +3069,12 @@ function ChatPage(props: ChatPageProps) { } }) } else { - appendMessages(result.messages, true) + appendMessages(resultMessages, true) // 加载更多也同样处理发送者信息预取 const isGroup = sessionId.includes('@chatroom') if (isGroup) { - const unknownSenders = [...new Set(result.messages + const unknownSenders = [...new Set(resultMessages .filter(m => m.isSend !== 1 && m.senderUsername && !senderAvatarCache.has(m.senderUsername)) .map(m => m.senderUsername as string) )] @@ -3093,8 +3094,8 @@ function ChatPage(props: ChatPageProps) { return } } - if (result.messages.length > 0) { - messageVirtuosoRef.current.scrollToIndex({ index: result.messages.length, align: 'start', behavior: 'auto' }) + if (resultMessages.length > 0) { + messageVirtuosoRef.current.scrollToIndex({ index: resultMessages.length, align: 'start', behavior: 'auto' }) } return } @@ -3120,7 +3121,7 @@ function ChatPage(props: ChatPageProps) { } const nextOffset = typeof result.nextOffset === 'number' ? result.nextOffset - : offset + result.messages.length + : offset + resultMessages.length setCurrentOffset(nextOffset) } else if (!result.success) { setNoMessageTable(true) @@ -5635,6 +5636,8 @@ function ChatPage(props: ChatPageProps) { }), [hasMoreMessages, hasMoreLater, isLoadingMore]) const renderMessageListItem = useCallback((index: number, msg: Message) => { + if (!currentSession) return null + const prevMsg = index > 0 ? messages[index - 1] : undefined const showDateDivider = shouldShowDateDivider(msg, prevMsg) const showTime = !prevMsg || (msg.createTime - prevMsg.createTime > 300) From 0bf57502e6586b9cff89ff078f187961dab53b22 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:24:37 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package-lock.json b/package-lock.json index 4b42f7b..d827aa2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9692,6 +9692,9 @@ "sherpa-onnx-win-x64": "^1.12.23" } }, + "node_modules/sherpa-onnx-node/node_modules/sherpa-onnx-darwin-x64": { + "optional": true + }, "node_modules/sherpa-onnx-win-ia32": { "version": "1.12.23", "resolved": "https://registry.npmmirror.com/sherpa-onnx-win-ia32/-/sherpa-onnx-win-ia32-1.12.23.tgz", From 94b0a9f89bd048afd17f8016829d5376135825b2 Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:35:52 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f68aacc..4a784bf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,10 @@ "version": "2.1.0", "description": "WeFlow", "main": "dist-electron/main.js", - "author": "cc", + "author": { + "name": "cc", + "email": "yccccccy@proton.me" + }, "repository": { "type": "git", "url": "https://github.com/hicccc77/WeFlow"