fix issues

This commit is contained in:
2026-07-29 10:38:19 +08:00
parent abf84e1081
commit f3faa36e99
4 changed files with 34 additions and 10 deletions

View File

@@ -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' }; }