@5minds/node-red-dashboard-2-processcube-chat 0.1.1-develop-3537a6-mf54lair → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,22 +85,9 @@ export default {
85
85
  }
86
86
 
87
87
  // Process files if present
88
- if (files.length > 0) {
89
- const processedFiles = await this.processFiles(files);
90
-
91
- if (newMessages.length > 0) {
92
- // Add files to existing message
93
- const lastMessage = newMessages[newMessages.length - 1];
94
- lastMessage.files = processedFiles;
95
- } else {
96
- // Create new message for files only
97
- newMessages.push({
98
- role: 'user',
99
- text: '', // Empty text when only files are sent
100
- files: processedFiles,
101
- });
102
- console.log('lus777', newMessages);
103
- }
88
+ if (files.length > 0 && newMessages.length > 0) {
89
+ const lastMessage = newMessages[newMessages.length - 1];
90
+ lastMessage.files = await this.processFiles(files);
104
91
  }
105
92
  } else if (body.messages) {
106
93
  newMessages = body.messages;