buildSessionData builds a SessionData from the current CLI state. Uses ChatHistory field to store the unified history for backwards compatibility.
()
| 211 | // buildSessionData builds a SessionData from the current CLI state. |
| 212 | // Uses ChatHistory field to store the unified history for backwards compatibility. |
| 213 | func (cli *ChatCLI) buildSessionData() *SessionData { |
| 214 | return &SessionData{ |
| 215 | Version: 2, |
| 216 | ChatHistory: cli.history, |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | // restoreSessionData restores history from a SessionData. |
| 221 | // Merges legacy separate histories into the unified history for backwards compatibility. |