Skip to content

Commit 7f8cfce

Browse files
lin-snowclaude
andcommitted
fix(web): 修复 chat 来源在移动端横向溢出 + 向量索引 tab 加可选说明
- ChatSources: 来源链接 max-width 由固定 32rem 改为 100% 并加 min-width:0, 容器补 min-width:0/max-width:100%,超长来源显示省略号,不再撑破窄屏导致整页横滚 - 向量索引设置 tab 顶部新增(可选)说明,提示不配置也能正常对话(zh/en/ja/de 四语) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d9153b5 commit 7f8cfce

6 files changed

Lines changed: 15 additions & 1 deletion

File tree

web/src/locales/messages/de-DE.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@
991991
},
992992
"embeddingSetting": {
993993
"title": "Vektorindex",
994+
"optionalHint": "(Optional) Der Vektorindex ermöglicht Copilot die semantische Suche in deinen bisherigen Echos. Der Chat funktioniert auch ohne ihn.",
994995
"enable": "Index aktivieren",
995996
"modelName": "Embedding-Modell",
996997
"modelPlaceholder": "z. B. text-embedding-3-small",

web/src/locales/messages/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@
991991
},
992992
"embeddingSetting": {
993993
"title": "Vector Index",
994+
"optionalHint": "(Optional) The vector index lets Copilot semantically retrieve your past echos. Chat works fine without it.",
994995
"enable": "Enable index",
995996
"modelName": "Embedding model",
996997
"modelPlaceholder": "e.g. text-embedding-3-small",

web/src/locales/messages/ja-JP.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@
991991
},
992992
"embeddingSetting": {
993993
"title": "ベクトルインデックス",
994+
"optionalHint": "(任意)ベクトルインデックスは Copilot が過去の Echo を意味的に検索するための機能です。設定しなくても会話は利用できます。",
994995
"enable": "インデックスを有効化",
995996
"modelName": "Embedding モデル",
996997
"modelPlaceholder": "例: text-embedding-3-small",

web/src/locales/messages/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@
991991
},
992992
"embeddingSetting": {
993993
"title": "向量索引",
994+
"optionalHint": "(可选)向量索引用于让 Copilot 检索历史 Echo 的语义内容,不配置也能正常对话。",
994995
"enable": "启用索引",
995996
"modelName": "Embedding 模型",
996997
"modelPlaceholder": "如 text-embedding-3-small",

web/src/views/chat/modules/ChatSources.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,16 @@ const hiddenCount = computed(() => displaySources.value.length - LIMIT)
112112
flex-direction: column;
113113
gap: 0.15rem;
114114
margin-top: 0.35rem;
115+
min-width: 0;
116+
max-width: 100%;
115117
}
116118
117119
.sources__item {
118120
display: flex;
119121
flex-direction: column;
120122
gap: 0.25rem;
123+
min-width: 0;
124+
max-width: 100%;
121125
}
122126
123127
/* 缩略图行:紧贴来源文字下方,一排小图 */
@@ -158,7 +162,10 @@ const hiddenCount = computed(() => displaySources.value.length - LIMIT)
158162
display: inline-flex;
159163
align-items: baseline;
160164
gap: 0.3rem;
161-
max-width: 32rem;
165+
166+
/* 用 100% 而非固定 32rem,避免在移动端窄屏下撑破容器导致整页横向滚动 */
167+
max-width: 100%;
168+
min-width: 0;
162169
border: none;
163170
background: transparent;
164171
padding: 0;

web/src/views/panel/modules/TheCopilot/TheEmbeddingSetting.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<!-- Copyright (C) 2025-2026 lin-snow -->
33
<template>
44
<div class="w-full text-[var(--color-text-secondary)]">
5+
<!-- 可选说明:向量索引非必需,不配置也能正常对话 -->
6+
<p class="text-xs opacity-70 mb-4">{{ t('embeddingSetting.optionalHint') }}</p>
7+
58
<!-- 启用 -->
69
<div class="flex items-center justify-between mb-4">
710
<h2 class="font-semibold">{{ t('embeddingSetting.enable') }}</h2>

0 commit comments

Comments
 (0)