cleanupTempDir removes the temporary directory and all its contents
()
| 645 | |
| 646 | // cleanupTempDir removes the temporary directory and all its contents |
| 647 | func (s *Server) cleanupTempDir() { |
| 648 | if err := os.RemoveAll(s.tempDir); err != nil { |
| 649 | s.logger.Error("Failed to clean up temporary directory", "tempDir", s.tempDir, "error", err) |
| 650 | } else { |
| 651 | s.logger.Info("Cleaned up temporary directory", "tempDir", s.tempDir) |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | func (s *Server) SaveState(source string) error { |
| 656 | if err := s.conversation.SaveState(); err != nil { |