feat(ai-chat): 添加聊天记录搜索与远程欢迎语功能

This commit is contained in:
2026-05-16 17:34:24 +08:00
parent 76afe5f433
commit 7580d8b763
3 changed files with 403 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
import Config from './config.js'
import http from './http.js'
import store from '@/store/index.js'
import lang from './lang.js'
let currentConversationId = null;
export const CONVERSATION_KEY = 'ai_conversation_id';
@@ -524,6 +525,34 @@ export default {
}
},
/**
* 获取服务配置信息
*/
async getServiceConfig() {
try {
const params = {
url: '/api/kefu/info',
data: {
uniacid: this.getUniacid(),
token: store.state.token || 'test_token',
user_id: getUserId(),
member_id: getUserId(),
locale: lang.getCurrentLocale()
},
header: {
'Content-Type': 'application/json'
}
};
const response = await http.sendRequest({
...params,
async: false,
});
return response.data;
} catch (error) {
return null;
}
},
/**
* 清除会话历史(调用后端接口)
*/