- Remove all backward-compatibility logic from the AddFile function.
- The function now assumes all input logs use the modern, nested
'Chat -> Entries' structure.
- This simplifies the codebase significantly but requires that
all old log files be deprecated or converted.
- Note: This commit leaves the build in a broken state, as other
files still reference the now-removed fields.
- The AddFile function now correctly parses both the old flat log
format and the new format where chats are grouped by topic.
- It flattens the new structure by iterating through the 'Entries'
of a chat group and appending them to the main chat list.
- This allows the application to transparently load both old and
new log files.
- Sanitize the Chats slice before marshaling or formatting to remove
any nil entries that may have been introduced.
- This is a robust fix for the segmentation fault panics.