                                       // console.log('Chunk processed'); // For debugging
                                         }
                                     } catch (e) {
                                         console.warn('Failed to parse stream data line:', line, e);
                                     }
                                }
                                 // Check if [DONE] was processed inside this message's lines
                                 if (message.includes('[DON