aboutsummaryrefslogtreecommitdiff
path: root/src/agent_resume.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/agent_resume.rs')
-rw-r--r--src/agent_resume.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/agent_resume.rs b/src/agent_resume.rs
index dbd1d9f2..f23ff5e0 100644
--- a/src/agent_resume.rs
+++ b/src/agent_resume.rs
@@ -71,7 +71,9 @@ pub fn session_ref_from_report(
pub fn normalize_session_start_source(value: Option<String>) -> Option<String> {
match value.as_deref().map(str::trim) {
- Some(source @ ("startup" | "resume" | "clear" | "compact")) => Some(source.to_string()),
+ Some(source @ ("startup" | "resume" | "clear" | "compact" | "new")) => {
+ Some(source.to_string())
+ }
_ => None,
}
}
@@ -519,6 +521,10 @@ mod tests {
Some("compact".into())
);
assert_eq!(
+ normalize_session_start_source(Some("new".into())),
+ Some("new".into())
+ );
+ assert_eq!(
normalize_session_start_source(Some(" resume ".into())),
Some("resume".into())
);