fix(agent): refine session repository API

This commit is contained in:
Christian Klotz 2026-07-31 09:48:24 +03:00
parent 9b50b046d3
commit 2700511e45
No known key found for this signature in database
11 changed files with 143 additions and 189 deletions

View file

@ -13,7 +13,7 @@ import {
InMemorySessionStore,
ok,
parseCommandArgs,
SessionRepo,
SessionRepository,
streamProxy,
toError,
truncateHead,
@ -28,7 +28,7 @@ const stream = createAssistantMessageEventStream();
const agent = new Agent({ initialState: { model }, streamFn: streamSimple });
agent.steer({ role: "user", content: [{ type: "text", text: "queued" }], timestamp: 0 });
const repo = new SessionRepo({ store: new InMemorySessionStore() });
const repo = new SessionRepository({ store: new InMemorySessionStore() });
const result = getOrThrow(ok({ value: 1 }));
const customMessage = createCustomMessage("note", "hello", true, undefined, "2026-01-01T00:00:00.000Z");
const llmMessages = convertToLlm([customMessage]);