fix issues
This commit is contained in:
@@ -69,11 +69,6 @@ async function analyzeWithDeepSeek(text, historyMessages, username, isAdmin, roo
|
||||
messages.push({ role: 'system', content: '当前服务器时间:' + new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai', hour12: false }) });
|
||||
const content = await callDeepSeek(messages, username);
|
||||
console.log('🤖 AI 返回:', content.substring(0, 200));
|
||||
// 打印消息结构,方便排查缓存
|
||||
console.log('📋 消息结构:', messages.map(function(m, i) {
|
||||
var preview = m.content.substring(0, 60).split('\n').join(' ');
|
||||
return '[' + i + '] ' + m.role + ' (' + m.content.length + '字): ' + preview;
|
||||
}).join('\n'));
|
||||
try {
|
||||
var cleaned = content.replace(/```json|```/g, '').trim();
|
||||
if (!cleaned) { console.warn('⚠️ AI 返回空内容'); return { action: 'ignore' }; }
|
||||
|
||||
Reference in New Issue
Block a user