debug: 添加文件内容注入日志,排查文件未被AI分析的问题

This commit is contained in:
thzxx
2026-06-18 14:17:58 +08:00
parent ec0722170e
commit e81d355c68
+3 -1
View File
@@ -1006,7 +1006,9 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
if (text) apiParts.push(text);
if (userFiles.length > 0) {
const fileContents = pendingFiles.map(f => ({ language: f.language, content: f.content }));
apiParts.push(...buildFileContentParts(fileContents));
const fileParts = buildFileContentParts(fileContents);
apiParts.push(...fileParts);
logInfo('📄 文件内容已注入', `${fileParts.length} 段, 共 ${fileContents.reduce((s, f) => s + f.content.length, 0)} 字符`);
}
let allVids: Array<{ name: string; count: number; dur: number; frames: Array<{ timestampSeconds: number; name: string }> }> = [];
if (hasVideos) {