- Added logic to await the first main-thread assistant message after a UserGroup to accurately count AIGroup messages.
- Updated tests to reflect the new message counting behavior, ensuring correct results in session file analysis.
- Wrapped the cleanup of the temporary directory in a try-finally block to ensure it executes even if an error occurs during the test.
- Added retry logic to the directory removal process to handle potential ENOTEMPTY errors on Windows, enhancing test reliability.
This commit enhances the robustness of the test by ensuring proper cleanup and error handling.