mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
parent
62c1c4031c
commit
d554409b1f
16 changed files with 386 additions and 34 deletions
|
|
@ -159,6 +159,7 @@ const runtime = await createAgentSessionRuntime(createRuntime, {
|
|||
- `newSession()`
|
||||
- `switchSession()`
|
||||
- `fork()`
|
||||
- clone flows via `fork(entryId, { position: "at" })`
|
||||
- `importFromJsonl()`
|
||||
|
||||
Important behavior:
|
||||
|
|
@ -718,7 +719,7 @@ const { session: opened } = await createAgentSession({
|
|||
const currentProjectSessions = await SessionManager.list(process.cwd());
|
||||
const allSessions = await SessionManager.listAll(process.cwd());
|
||||
|
||||
// Session replacement API for /new, /resume, /fork, and import flows.
|
||||
// Session replacement API for /new, /resume, /fork, /clone, and import flows.
|
||||
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
||||
const services = await createAgentSessionServices({ cwd });
|
||||
return {
|
||||
|
|
@ -744,8 +745,11 @@ await runtime.newSession();
|
|||
// Replace the active session with another saved session
|
||||
await runtime.switchSession("/path/to/session.jsonl");
|
||||
|
||||
// Replace the active session with a fork from a specific entry
|
||||
// Replace the active session with a fork from a specific user entry
|
||||
await runtime.fork("entry-id");
|
||||
|
||||
// Clone the active path through a specific entry
|
||||
await runtime.fork("entry-id", { position: "at" });
|
||||
```
|
||||
|
||||
**SessionManager tree API:**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue