refactor(session): route construction through Session.create

This commit is contained in:
imccyu
2026-08-04 18:41:07 +08:00
parent c7f693aa40
commit 8cbdd5b9d0
61 changed files with 305 additions and 292 deletions
@@ -45,7 +45,7 @@ describe('first-message LLM title provider', () => {
providerPlugin.apply(ctx, LLM_CONFIG)
await expect(registered!.generate({
session: new Session(SessionId('empty-first-provider')),
session: Session.create(SessionId('empty-first-provider')),
messages: [],
signal: new AbortController().signal,
})).rejects.toThrow(/requires one human message/)