mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(agent): compose session storage through repositories
This commit is contained in:
parent
a4c7cb025d
commit
f07af611d3
28 changed files with 549 additions and 556 deletions
|
|
@ -6,8 +6,7 @@ import {
|
|||
bashExecutionToText,
|
||||
convertToLlm,
|
||||
createCustomMessage,
|
||||
createInMemorySessionCollection,
|
||||
createSessionRepository,
|
||||
InMemorySessionRepository,
|
||||
FileError,
|
||||
formatPromptTemplateInvocation,
|
||||
formatSkillInvocation,
|
||||
|
|
@ -29,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 = createSessionRepository({ collection: createInMemorySessionCollection() });
|
||||
const repo = new InMemorySessionRepository();
|
||||
const result = getOrThrow(ok({ value: 1 }));
|
||||
const customMessage = createCustomMessage("note", "hello", true, undefined, "2026-01-01T00:00:00.000Z");
|
||||
const llmMessages = convertToLlm([customMessage]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue