mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 16:00:58 +00:00
Add skipConversationRestore for before_branch hooks (#286)
This commit is contained in:
parent
4492a3f304
commit
2953a9d8d4
3 changed files with 14 additions and 2 deletions
|
|
@ -154,7 +154,12 @@ pi.on("session", async (event, ctx) => {
|
|||
if (event.reason === "before_clear") {
|
||||
return { cancel: true };
|
||||
}
|
||||
// No return needed if not cancelling
|
||||
|
||||
// For before_branch only: create branch but skip conversation restore
|
||||
// (useful for checkpoint hooks that restore files separately)
|
||||
if (event.reason === "before_branch") {
|
||||
return { skipConversationRestore: true };
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue