pi-mono/packages/coding-agent/test/session-manager
Haoyu Zha f04d9bc428
feat(session-manager): allow supplying custom session ID in newSession() (#2130)
* feat(session-manager): allow supplying custom session ID in newSession()

Add optional `id` field to `NewSessionOptions`. When provided, this ID
is used as the session ID instead of generating a random UUID. Existing
callers are unaffected since the field is optional and falls back to
`randomUUID()`.

Closes #2097

* test(session-manager): add tests for custom session ID in newSession()

Verify that newSession() uses the provided id when supplied, falls back
to randomUUID() when omitted, and includes the custom id in the session
header.
2026-03-14 01:34:48 +01:00
..
build-context.test.ts refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
custom-session-id.test.ts feat(session-manager): allow supplying custom session ID in newSession() (#2130) 2026-03-14 01:34:48 +01:00
file-operations.test.ts Fixes #933 2026-01-25 02:51:05 +01:00
labels.test.ts Add label support for session entries 2025-12-30 22:42:18 +01:00
migration.test.ts Merge hooks and custom-tools into unified extensions system (#454) 2026-01-05 01:43:35 +01:00
save-entry.test.ts Merge hooks and custom-tools into unified extensions system (#454) 2026-01-05 01:43:35 +01:00
tree-traversal.test.ts fix(coding-agent): prevent duplicate session headers when forking from pre-assistant entry 2026-02-27 22:18:26 +01:00