mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 17:00:59 +00:00
Fix branch selector for single message and --no-session mode
- Allow branch selector to open with single user message (changed <= 1 to === 0 check) - Support in-memory branching for --no-session mode (no files created) - Add isEnabled() getter to SessionManager - Update sessionFile getter to return null when sessions disabled - Update SessionSwitchEvent types to allow null session files - Add branching tests for single message and --no-session scenarios fixes #163
This commit is contained in:
parent
09a48fd1c3
commit
3d35e7c469
10 changed files with 292 additions and 27 deletions
|
|
@ -122,8 +122,8 @@ Fired when session changes (`/branch` or session switch).
|
|||
|
||||
```typescript
|
||||
pi.on("session_switch", async (event, ctx) => {
|
||||
// event.newSessionFile: string
|
||||
// event.previousSessionFile: string
|
||||
// event.newSessionFile: string | null (null in --no-session mode)
|
||||
// event.previousSessionFile: string | null (null in --no-session mode)
|
||||
// event.reason: "branch" | "switch"
|
||||
});
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue