mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
Specify AgentSession for branching API in CHANGELOG.md
This commit is contained in:
parent
b0b8336a5f
commit
2f2d5ffa52
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ The new `ctx: CustomToolContext` provides `sessionManager`, `modelRegistry`, and
|
|||
|
||||
**Session event changes:**
|
||||
- `CustomToolSessionEvent` now only has `reason` and `previousSessionFile`
|
||||
- Session entries are no longer in the event. Use `ctx.sessionManager.getBranch()` to reconstruct state
|
||||
- Session entries are no longer in the event. Use `ctx.sessionManager.getBranch()` or `ctx.sessionManager.getEntries()` to reconstruct state
|
||||
- New reasons: `"tree"` (for `/tree` navigation) and `"shutdown"` (for cleanup on exit)
|
||||
- `dispose()` method removed. Use `onSession` with `reason: "shutdown"` for cleanup
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ See [docs/custom-tools.md](docs/custom-tools.md) and [examples/custom-tools/](ex
|
|||
- `model` returns `Model | undefined` (was `Model | null`)
|
||||
- `Attachment` type removed. Use `ImageContent` from `@mariozechner/pi-ai` instead. Add images directly to message content arrays.
|
||||
|
||||
**Branching API:**
|
||||
**AgentSession branching API:**
|
||||
- `branch(entryIndex: number)` → `branch(entryId: string)`
|
||||
- `getUserMessagesForBranching()` returns `{ entryId, text }` instead of `{ entryIndex, text }`
|
||||
- `reset()` and `switchSession()` now return `Promise<boolean>` (false if cancelled by hook)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue