chore:AI回答显示思考...
This commit is contained in:
@@ -783,6 +783,14 @@ export default {
|
|||||||
async: false,
|
async: false,
|
||||||
});
|
});
|
||||||
console.log('[AI Service] getServiceConfig response:', JSON.stringify(response));
|
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;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[AI Service] getServiceConfig error:', error);
|
console.error('[AI Service] getServiceConfig error:', error);
|
||||||
|
|||||||
@@ -2642,7 +2642,7 @@
|
|||||||
"loadMoreHistory": "加载更多历史消息",
|
"loadMoreHistory": "加载更多历史消息",
|
||||||
"loadingHistory": "加载历史消息中...",
|
"loadingHistory": "加载历史消息中...",
|
||||||
"aiThinking": "AI正在思考",
|
"aiThinking": "AI正在思考",
|
||||||
"receivingReply": "正在接收回复",
|
"receivingReply": "思考中",
|
||||||
"aiThinkingStatus1": "AI正在思考",
|
"aiThinkingStatus1": "AI正在思考",
|
||||||
"aiThinkingStatus2": "AI正在分析",
|
"aiThinkingStatus2": "AI正在分析",
|
||||||
"aiThinkingStatus3": "AI正在检索",
|
"aiThinkingStatus3": "AI正在检索",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const lang = {
|
|||||||
loadMoreHistory: 'Load more history',
|
loadMoreHistory: 'Load more history',
|
||||||
loadingHistory: 'Loading history...',
|
loadingHistory: 'Loading history...',
|
||||||
aiThinking: 'AI is thinking',
|
aiThinking: 'AI is thinking',
|
||||||
receivingReply: 'Receiving reply',
|
receivingReply: 'Thinking',
|
||||||
aiThinkingStatus1: 'AI is thinking',
|
aiThinkingStatus1: 'AI is thinking',
|
||||||
aiThinkingStatus2: 'AI is analyzing',
|
aiThinkingStatus2: 'AI is analyzing',
|
||||||
aiThinkingStatus3: 'AI is searching',
|
aiThinkingStatus3: 'AI is searching',
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const lang = {
|
|||||||
loadMoreHistory: '加载更多历史消息',
|
loadMoreHistory: '加载更多历史消息',
|
||||||
loadingHistory: '加载历史消息中...',
|
loadingHistory: '加载历史消息中...',
|
||||||
aiThinking: 'AI正在思考',
|
aiThinking: 'AI正在思考',
|
||||||
receivingReply: '正在接收回复',
|
receivingReply: '思考中',
|
||||||
aiThinkingStatus1: 'AI正在思考',
|
aiThinkingStatus1: 'AI正在思考',
|
||||||
aiThinkingStatus2: 'AI正在分析',
|
aiThinkingStatus2: 'AI正在分析',
|
||||||
aiThinkingStatus3: 'AI正在检索',
|
aiThinkingStatus3: 'AI正在检索',
|
||||||
|
|||||||
@@ -1115,7 +1115,8 @@ async sendStreamMessage(userMessage, attachments = []) {
|
|||||||
} else {
|
} else {
|
||||||
targetMsg = this.messages[loadingIdx]
|
targetMsg = this.messages[loadingIdx]
|
||||||
this._stopLoadingTextRotation(targetMsg)
|
this._stopLoadingTextRotation(targetMsg)
|
||||||
targetMsg.loadingText = this.$lang('ai-chat.index.receivingReply')
|
// 固定文案, 不走 $lang: 远端语言覆写会覆盖本地 lang 文件, 导致改了 lang/zh-cn 也不生效
|
||||||
|
targetMsg.loadingText = '思考中'
|
||||||
// 进入流式接收状态: 让思考面板在收到 thought 事件时自动展开并显示"思考中..."
|
// 进入流式接收状态: 让思考面板在收到 thought 事件时自动展开并显示"思考中..."
|
||||||
this.$set(targetMsg, 'isStreaming', true)
|
this.$set(targetMsg, 'isStreaming', true)
|
||||||
if (!targetMsg.thoughtsText) this.$set(targetMsg, 'thoughtsText', '')
|
if (!targetMsg.thoughtsText) this.$set(targetMsg, 'thoughtsText', '')
|
||||||
@@ -3169,7 +3170,8 @@ _handleStreamError(msg) {
|
|||||||
gap: 12rpx;
|
gap: 12rpx;
|
||||||
|
|
||||||
.typing-dots {
|
.typing-dots {
|
||||||
display: flex;
|
/* 隐藏三个圆点动画 */
|
||||||
|
display: none !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.dot {
|
.dot {
|
||||||
|
|||||||
Reference in New Issue
Block a user