(path: &PathBuf)
| 1390 | } |
| 1391 | |
| 1392 | fn load_frecency(path: &PathBuf) -> HashMap<String, FrecencyEntry> { |
| 1393 | std::fs::read_to_string(path) |
| 1394 | .ok() |
| 1395 | .and_then(|s| serde_json::from_str::<FrecencyStore>(&s).ok()) |
| 1396 | .map(|store| store.entries) |
| 1397 | .unwrap_or_default() |
| 1398 | } |
| 1399 | |
| 1400 | fn load_stash(path: &PathBuf) -> Vec<PromptStashEntry> { |
| 1401 | let store = std::fs::read_to_string(path) |