From 9cc9df301836cb9a10781dbae80f194839a2632e Mon Sep 17 00:00:00 2001 From: Perry Li Date: Thu, 6 Mar 2025 10:10:53 +0000 Subject: [PATCH 1/3] fix(chat): resolve duplicate collapsible IDs causing citation modal failures Fix an issue where clicking inline citations in subsequent chat messages failed to open the citation modal when multiple collapsible sections are present. The root cause was duplicate "collapsible-sources" IDs assigned to all Collapsible components. This led document.getElementById() to always return the first instance, preventing subsequent messages from opening their CitationModal. Changes: - Modify Collapsible ID generation in Citations.svelte to use unique IDs with "collapsible-${message.id}" pattern - Update ResponseMessage.svelte's onSourceClick handler to reference the dynamic collapsible IDs - Ensure proper citation modal binding for each chat message's sources Affected components: - Collapsible (expandable content sections) - CitationsModal (citation detail popup) This ensures each chat message's sources are independently collapsible and maintains proper citation modal binding throughout message history. --- src/lib/components/chat/Messages/Citations.svelte | 2 +- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Messages/Citations.svelte b/src/lib/components/chat/Messages/Citations.svelte index 893a64608..4a8361338 100644 --- a/src/lib/components/chat/Messages/Citations.svelte +++ b/src/lib/components/chat/Messages/Citations.svelte @@ -124,7 +124,7 @@ {:else} { console.log(id, idx); let sourceButton = document.getElementById(`source-${message.id}-${idx}`); - const sourcesCollapsible = document.getElementById(`collapsible-sources`); + const sourcesCollapsible = document.getElementById(`collapsible-${message.id}`); if (sourceButton) { sourceButton.click(); From 561f4d5d69a8435db2e1cd9754609882c1809deb Mon Sep 17 00:00:00 2001 From: Panda Date: Thu, 6 Mar 2025 11:26:04 +0100 Subject: [PATCH 2/3] i18n: zh-cn --- src/lib/i18n/locales/zh-CN/translation.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index ebb53a1b5..1c8f523c3 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -359,7 +359,7 @@ "Embedding model set to \"{{embedding_model}}\"": "语义向量模型设置为 \"{{embedding_model}}\"", "Enable API Key": "启用 API 密钥", "Enable autocomplete generation for chat messages": "启用聊天消息的输入框内容猜测补全", - "Enable Code Execution": "", + "Enable Code Execution": "启用代码执行", "Enable Code Interpreter": "启用代码解释器", "Enable Community Sharing": "启用分享至社区", "Enable Memory Locking (mlock) to prevent model data from being swapped out of RAM. This option locks the model's working set of pages into RAM, ensuring that they will not be swapped out to disk. This can help maintain performance by avoiding page faults and ensuring fast data access.": "启用内存锁定(mlock)以防止模型数据被交换出RAM。此选项将模型的工作集页面锁定在RAM中,确保它们不会被交换到磁盘。这可以通过避免页面错误和确保快速数据访问来帮助维持性能。", @@ -451,7 +451,7 @@ "Example: mail": "例如:mail", "Example: ou=users,dc=foo,dc=example": "例如:ou=users,dc=foo,dc=example", "Example: sAMAccountName or uid or userPrincipalName": "例如:sAMAccountName 或 uid 或 userPrincipalName", - "Exceeded the number of seats in your license. Please contact support to increase the number of seats.": "", + "Exceeded the number of seats in your license. Please contact support to increase the number of seats.": "超出了许可证中的席位数量。请联系支持人员以增加席位数量。", "Exclude": "排除", "Execute code for analysis": "执行代码进行分析", "Expand": "展开", @@ -1159,7 +1159,7 @@ "Write your model template content here": "在此写入模型模板内容", "Yesterday": "昨天", "You": "你", - "You are currently using a trial license. Please contact support to upgrade your license.": "", + "You are currently using a trial license. Please contact support to upgrade your license.": "您目前正在使用试用许可证。请联系支持人员升级您的许可证。", "You can only chat with a maximum of {{maxCount}} file(s) at a time.": "每次对话最多仅能附上 {{maxCount}} 个文件。", "You can personalize your interactions with LLMs by adding memories through the 'Manage' button below, making them more helpful and tailored to you.": "通过点击下方的“管理”按钮,你可以添加记忆,以个性化大语言模型的互动,使其更有用,更符合你的需求。", "You cannot upload an empty file.": "请勿上传空文件。", From 98376fbbce34d856122046724a25f7dfb80c5fe7 Mon Sep 17 00:00:00 2001 From: Panda Date: Thu, 6 Mar 2025 13:08:35 +0100 Subject: [PATCH 3/3] i18n: zh-cn --- src/lib/i18n/locales/zh-CN/translation.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/i18n/locales/zh-CN/translation.json b/src/lib/i18n/locales/zh-CN/translation.json index 1c8f523c3..f821101c6 100644 --- a/src/lib/i18n/locales/zh-CN/translation.json +++ b/src/lib/i18n/locales/zh-CN/translation.json @@ -451,7 +451,7 @@ "Example: mail": "例如:mail", "Example: ou=users,dc=foo,dc=example": "例如:ou=users,dc=foo,dc=example", "Example: sAMAccountName or uid or userPrincipalName": "例如:sAMAccountName 或 uid 或 userPrincipalName", - "Exceeded the number of seats in your license. Please contact support to increase the number of seats.": "超出了许可证中的席位数量。请联系支持人员以增加席位数量。", + "Exceeded the number of seats in your license. Please contact support to increase the number of seats.": "已达到最大授权人数,请联系支持人员提升授权人数。", "Exclude": "排除", "Execute code for analysis": "执行代码进行分析", "Expand": "展开", @@ -640,7 +640,7 @@ "Local Models": "本地模型", "Location access not allowed": "不允许访问位置信息", "Logit Bias": "Logit 偏置", - "Lost": "丢失", + "Lost": "落败", "LTR": "从左至右", "Made by Open WebUI Community": "由 OpenWebUI 社区制作", "Make sure to enclose them with": "确保将它们包含在内", @@ -1159,7 +1159,7 @@ "Write your model template content here": "在此写入模型模板内容", "Yesterday": "昨天", "You": "你", - "You are currently using a trial license. Please contact support to upgrade your license.": "您目前正在使用试用许可证。请联系支持人员升级您的许可证。", + "You are currently using a trial license. Please contact support to upgrade your license.": "当前为试用许可证,请联系支持人员升级许可证。", "You can only chat with a maximum of {{maxCount}} file(s) at a time.": "每次对话最多仅能附上 {{maxCount}} 个文件。", "You can personalize your interactions with LLMs by adding memories through the 'Manage' button below, making them more helpful and tailored to you.": "通过点击下方的“管理”按钮,你可以添加记忆,以个性化大语言模型的互动,使其更有用,更符合你的需求。", "You cannot upload an empty file.": "请勿上传空文件。",