()
| 408 | } |
| 409 | |
| 410 | func (m *appModel) handleToggleSplitDiff() (tea.Model, tea.Cmd) { |
| 411 | m.sessionState.ToggleSplitDiffView() |
| 412 | enabled := m.sessionState.SplitDiffView() |
| 413 | |
| 414 | // Persist to global userconfig |
| 415 | go persistSplitDiffView(enabled) |
| 416 | |
| 417 | return m, tea.Batch( |
| 418 | m.updateChatCmd(editfile.ToggleDiffViewMsg{}), |
| 419 | m.updateChatCmd(messages.SessionToggleChangedMsg{}), |
| 420 | ) |
| 421 | } |
| 422 | |
| 423 | // persistSplitDiffView writes the current split-diff toggle to the user |
| 424 | // config without blocking the UI. Errors are logged but otherwise ignored |
no test coverage detected