(
path: &Path,
project_root: &Path,
location_cwd: Option<&Path>,
new_cursor: StoredCursor,
)
| 167 | } |
| 168 | |
| 169 | fn empty_changed_transcript( |
| 170 | path: &Path, |
| 171 | project_root: &Path, |
| 172 | location_cwd: Option<&Path>, |
| 173 | new_cursor: StoredCursor, |
| 174 | ) -> ParsedTranscript { |
| 175 | let project = project_root.to_string_lossy().to_string(); |
| 176 | ParsedTranscript { |
| 177 | draft: SessionDraft { |
| 178 | session_id: path |
| 179 | .file_stem() |
| 180 | .and_then(|stem| stem.to_str()) |
| 181 | .unwrap_or("unknown") |
| 182 | .to_string(), |
| 183 | project_key: project.clone(), |
| 184 | project_path: project, |
| 185 | title: None, |
| 186 | metadata_json: serde_json::to_string(&session_metadata(location_cwd)).ok(), |
| 187 | parent_session_id: None, |
| 188 | is_subagent: false, |
| 189 | agent_id: None, |
| 190 | parent_tool_use_id: None, |
| 191 | }, |
| 192 | messages: Vec::new(), |
| 193 | new_cursor, |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | fn collect_workspace_session_files(sessions_root: &Path, project_root: &Path) -> Vec<PathBuf> { |
| 198 | let Ok(entries) = std::fs::read_dir(sessions_root) else { |
no test coverage detected