chore:智能客服回答不重复

This commit is contained in:
2026-03-19 14:26:32 +08:00
parent e33ad16d10
commit 5a46bb8d69
2 changed files with 32 additions and 38 deletions

View File

@@ -875,19 +875,14 @@ export default {
}, },
(completeResult) => { (completeResult) => {
// 流结束回调 // 流结束回调
let finalContent = '';
let convId = ''; let convId = '';
if (typeof completeResult === 'string') { if (typeof completeResult !== 'string') {
finalContent = completeResult;
} else {
finalContent = completeResult.content || '';
convId = completeResult.conversation_id || ''; convId = completeResult.conversation_id || '';
} }
// 更新最终内容 // 标记流式结束
streamMessage.isStreaming = false; streamMessage.isStreaming = false;
streamMessage.content = finalContent;
// 添加操作按钮 // 添加操作按钮
streamMessage.actions = [ streamMessage.actions = [
@@ -919,12 +914,10 @@ export default {
}, },
(completeResult) => { (completeResult) => {
// 流结束回调 // 流结束回调
let finalContent = completeResult?.content || '';
let convId = completeResult?.conversation_id || ''; let convId = completeResult?.conversation_id || '';
// 更新最终内容 // 标记流式结束
streamMessage.isStreaming = false; streamMessage.isStreaming = false;
streamMessage.content = finalContent;
// 添加操作按钮 // 添加操作按钮
streamMessage.actions = [ streamMessage.actions = [

View File

@@ -134,8 +134,9 @@ async function main() {
// 2) 创建 ZIP 文件(如果未指定 --no-zip) // 2) 创建 ZIP 文件(如果未指定 --no-zip)
if (!options.noZip) { if (!options.noZip) {
const cwd = path.join(__dirname, '..'); const cwd = path.join(__dirname, '..');
const sourceDir = path.join(cwd, 'unpackage', 'dist', 'build', 'mp-weixin'); const buildDir = options.mode === 'production' ? 'build' : 'dev';
const destDir = path.join(cwd, 'unpackage', 'dist', 'build'); const sourceDir = path.join(cwd, 'unpackage', 'dist', buildDir, 'mp-weixin');
const destDir = path.join(cwd, 'unpackage', 'dist', buildDir);
const zipFilePath = await createZipWithSystemCommand(sourceDir, destDir); const zipFilePath = await createZipWithSystemCommand(sourceDir, destDir);
console.log(`ZIP 文件路径: ${zipFilePath}`); console.log(`ZIP 文件路径: ${zipFilePath}`);