From 79fc69741caee2646927cc8076688f132dfc2527 Mon Sep 17 00:00:00 2001
From: Etherll
Date: Thu, 28 May 2026 05:20:22 +0300
Subject: [PATCH] =?UTF-8?q?Studio:=20post-merge=20build=20fixes=20?=
=?UTF-8?q?=E2=80=94=20drop=20dead=20score=20handling,=20dedupe=20activeTh?=
=?UTF-8?q?readId,=20add=20knowledgeBases=20i18n=20key?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Follow-ups after merging origin/main into feature/rag:
* chat-adapter.ts: drop `score` field from DocumentSourcePart and the
`chunk.score` copy — the remote "hide RAG retrieval scores from chunks,
citations, and side panel" commit removed `score` from ParsedChunk.
* chat-settings-sheet.tsx: remove the duplicate `const activeThreadId =`
introduced by the merge (kept the HEAD-side declaration at line 497).
* chat-settings-sheet.tsx: drop the "Min relevance" Slider that referenced
`ragMinScore` / `setRagMinScore` — same intent as the hide-scores commit
(these are still on the runtime store but the side-panel UI is gone).
* i18n locales (en, zh-CN): add `settings.tabs.knowledgeBases` translation
key so the new TabDef entry passes the TranslationKey union check.
Verified: `tsc --noEmit` clean, `vite build` succeeds.
Co-Authored-By: Claude Opus 4.7 (1M context)
---
.../src/features/chat/api/chat-adapter.ts | 4 ---
.../src/features/chat/chat-settings-sheet.tsx | 25 -------------------
studio/frontend/src/i18n/locales/en.ts | 1 +
studio/frontend/src/i18n/locales/zh-CN.ts | 1 +
4 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.ts
index 2ef884d6e0..2978c168be 100644
--- a/studio/frontend/src/features/chat/api/chat-adapter.ts
+++ b/studio/frontend/src/features/chat/api/chat-adapter.ts
@@ -401,7 +401,6 @@ interface DocumentSourcePart {
pageCharEnd?: string;
lineStart?: string;
lineEnd?: string;
- score?: string;
text: string;
}
@@ -477,9 +476,6 @@ function toDocumentSourcePart(
if (chunk.lineEnd) {
part.lineEnd = chunk.lineEnd;
}
- if (chunk.score) {
- part.score = chunk.score;
- }
return part;
}
diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
index 0e08855848..de3450119c 100644
--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx
+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
@@ -712,7 +712,6 @@ export function ChatSettingsPanel({
activeExternalProvider.providerType,
externalSelection?.modelId,
);
- const activeThreadId = useChatRuntimeStore((s) => s.activeThreadId);
const openAiApiKeyForSection = activeExternalProvider
? getExternalProviderApiKey(activeExternalProvider.id) || null
: null;
@@ -1658,30 +1657,6 @@ export function ChatSettingsPanel({
grounding, more tokens.
-
-
-
- Min relevance
-
-
- {ragMinScore === 0 ? "off" : ragMinScore.toFixed(2)}
-
-
-
v != null && setRagMinScore(v)}
- disabled={!ragEnabled}
- />
-
- Cosine-similarity floor for retrieved chunks (0 = off). Set
- above 0 so unrelated docs are dropped — useful when your
- query is off-topic from what's indexed. Try 0.3 as a
- starting point.
-
-
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index b94f3aa105..ccfa19664f 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -89,6 +89,7 @@ export const en = {
profile: "Profile",
appearance: "Appearance",
chat: "Chat",
+ knowledgeBases: "Knowledge Bases",
connections: "Connections",
apiKeys: "API",
about: "Help",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index 4074a5760b..4695ce0439 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -89,6 +89,7 @@ export const zhCN = {
profile: "个人资料",
appearance: "外观",
chat: "聊天",
+ knowledgeBases: "知识库",
connections: "连接",
apiKeys: "API",
about: "帮助",