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

View File

@@ -31,7 +31,7 @@ async function settle(): Promise<void> {
describe('all-messages LLM title provider', () => {
it('includes seeded history and the latest prompt while inheriting the logged request route', async () => {
const seeded = new Session(SessionId('seed-source'))
const seeded = Session.create(SessionId('seed-source'))
seeded.append('turn/start', { turn: 1, trigger: { kind: 'message', source: { kind: 'user' } } })
const inherited = seeded.append('user/message', createUserMessage({
content: [{ type: 'text', text: 'inherited prompt' }], source: { kind: 'user' },