更新AI聊天页面样式

This commit is contained in:
pingchuan
2025-06-06 15:07:57 +08:00
parent d4ad36c3f2
commit 1b79f973da
17 changed files with 11257 additions and 2813 deletions
+22
View File
@@ -122,16 +122,38 @@ export const difyClient = {
files: files || [],
};
console.log('🌐 [DifyClient] 发送聊天消息:', {
queryLength: query.length,
queryPreview: query.substring(0, 100) + (query.length > 100 ? '...' : ''),
user,
responseMode,
conversationId,
hasInputs: !!inputs && Object.keys(inputs).length > 0,
inputsKeys: inputs ? Object.keys(inputs) : [],
hasFiles: !!files && files.length > 0,
filesCount: files?.length || 0
});
const response = await difyFetch('chat-messages', {
method: 'POST',
body: JSON.stringify(body),
});
console.log('📡 [DifyClient] Dify API响应:', {
status: response.status,
statusText: response.statusText,
hasBody: !!response.body,
contentType: response.headers.get('Content-Type'),
responseMode
});
// 对于流式响应,直接返回Response对象
if (responseMode === 'streaming') {
console.log('🌊 [DifyClient] 返回流式响应对象');
return response;
}
console.log('📄 [DifyClient] 解析JSON响应');
return response.json();
},