diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-24 00:52:07 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-24 00:52:07 +0300 |
| commit | 74fa90cecc6f6dfd93dc64893659771001ad2d82 (patch) | |
| tree | a34ed445c525b719ba602ac086a2959e460934d7 /src/agent_resume.rs | |
| parent | 64a12de1cdc0cf3730da82103d4d84ddd919d407 (diff) | |
fix: scope opencode hook to main agent and adopt new sessions
refs #765
Diffstat (limited to 'src/agent_resume.rs')
| -rw-r--r-- | src/agent_resume.rs | 8 |
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()) ); |
