chore:AI回答显示思考...

This commit is contained in:
2026-09-16 11:14:53 +08:00
parent 7a5de9a44f
commit 3f99a1b9e4
5 changed files with 15 additions and 5 deletions

View File

@@ -783,6 +783,14 @@ export default {
async: false,
});
console.log('[AI Service] getServiceConfig response:', JSON.stringify(response));
// 媒体上传需要 config_uuid (后端校验 config_uid/config_uuid 不能为空)。
// 此前从未写入过该缓存, 导致上传表单里 config_uuid 恒为空。
// 这里从 info 响应中提取并持久化, 兼容多种字段名。
const cfg = response && response.data;
if (cfg && typeof cfg === 'object') {
const uuid = cfg.config_uuid || cfg.config_uid || cfg.uuid || (cfg.info && (cfg.info.config_uuid || cfg.info.uuid)) || '';
if (uuid) uni.setStorageSync('current_config_uuid', uuid);
}
return response.data;
} catch (error) {
console.error('[AI Service] getServiceConfig error:', error);

View File

@@ -2642,7 +2642,7 @@
"loadMoreHistory": "加载更多历史消息",
"loadingHistory": "加载历史消息中...",
"aiThinking": "AI正在思考",
"receivingReply": "正在接收回复",
"receivingReply": "思考中",
"aiThinkingStatus1": "AI正在思考",
"aiThinkingStatus2": "AI正在分析",
"aiThinkingStatus3": "AI正在检索",

View File

@@ -23,7 +23,7 @@ export const lang = {
loadMoreHistory: 'Load more history',
loadingHistory: 'Loading history...',
aiThinking: 'AI is thinking',
receivingReply: 'Receiving reply',
receivingReply: 'Thinking',
aiThinkingStatus1: 'AI is thinking',
aiThinkingStatus2: 'AI is analyzing',
aiThinkingStatus3: 'AI is searching',

View File

@@ -23,7 +23,7 @@ export const lang = {
loadMoreHistory: '加载更多历史消息',
loadingHistory: '加载历史消息中...',
aiThinking: 'AI正在思考',
receivingReply: '正在接收回复',
receivingReply: '思考中',
aiThinkingStatus1: 'AI正在思考',
aiThinkingStatus2: 'AI正在分析',
aiThinkingStatus3: 'AI正在检索',

View File

@@ -1115,7 +1115,8 @@ async sendStreamMessage(userMessage, attachments = []) {
} else {
targetMsg = this.messages[loadingIdx]
this._stopLoadingTextRotation(targetMsg)
targetMsg.loadingText = this.$lang('ai-chat.index.receivingReply')
// 固定文案, 不走 $lang: 远端语言覆写会覆盖本地 lang 文件, 导致改了 lang/zh-cn 也不生效
targetMsg.loadingText = '思考中'
// 进入流式接收状态: 让思考面板在收到 thought 事件时自动展开并显示"思考中..."
this.$set(targetMsg, 'isStreaming', true)
if (!targetMsg.thoughtsText) this.$set(targetMsg, 'thoughtsText', '')
@@ -3169,7 +3170,8 @@ _handleStreamError(msg) {
gap: 12rpx;
.typing-dots {
display: flex;
/* 隐藏三个圆点动画 */
display: none !important;
align-items: center;
.dot {