fix(miniprogram): improve knowledge base selection

This commit is contained in:
wolfkill
2026-04-27 19:55:57 +08:00
committed by lyingbug
parent d06111e5f7
commit abd188d344
9 changed files with 262 additions and 24 deletions
+2 -1
View File
@@ -34,7 +34,8 @@ Page({
this.setData({ answer: "", rawResponse: "", loading: true });
try {
const sessionId = await this.ensureSession();
const response = await knowledgeChat(sessionId, this.data.query.trim());
const settings = getSettings();
const response = await knowledgeChat(sessionId, this.data.query.trim(), settings.selectedKnowledgeBaseId);
const rawResponse = typeof response === "string" ? response : JSON.stringify(response);
const answer = collectAnswerFromSSE(rawResponse);
this.setData({
+1 -1
View File
@@ -5,6 +5,6 @@
.answer {
white-space: pre-wrap;
line-height: 1.7;
color: #102a43;
color: #1a1a1a;
font-size: 28rpx;
}