AttachedFilesSnapshot returns a copy of the session's attached file paths. Callers may freely mutate the returned slice without affecting the session.
()
| 740 | // AttachedFilesSnapshot returns a copy of the session's attached file paths. |
| 741 | // Callers may freely mutate the returned slice without affecting the session. |
| 742 | func (s *Session) AttachedFilesSnapshot() []string { |
| 743 | s.mu.RLock() |
| 744 | defer s.mu.RUnlock() |
| 745 | return slices.Clone(s.AttachedFiles) |
| 746 | } |
| 747 | |
| 748 | type Opt func(s *Session) |
| 749 |