| 469 | } |
| 470 | read_json("chat_history.json").await |
| 471 | } |
| 472 | |
| 473 | pub async fn save_chat_history(sessions: &[ChatSession]) { |
| 474 | if let Some(rb) = get_remote_backend() { |
| 475 | remote_cache_invalidate("/api/chat/sessions/bulk"); |
| 476 | remote_cache_invalidate("/api/chat/sessions"); |
| 477 | let _ = remote_client() |
| 478 | .put(format!("{}/api/chat/sessions/bulk", rb.url)) |
| 479 | .bearer_auth(&rb.token) |
| 480 | .json(&sessions.to_vec()) |
nothing calls this directly
no outgoing calls
no test coverage detected