mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(agent): expose session stores through factories
This commit is contained in:
parent
2700511e45
commit
a1bb7e4483
12 changed files with 158 additions and 118 deletions
|
|
@ -5,15 +5,14 @@ import {
|
|||
bashExecutionToText,
|
||||
convertToLlm,
|
||||
createCustomMessage,
|
||||
createInMemorySessionRepository,
|
||||
FileError,
|
||||
formatPromptTemplateInvocation,
|
||||
formatSkillInvocation,
|
||||
formatSkillsForSystemPrompt,
|
||||
getOrThrow,
|
||||
InMemorySessionStore,
|
||||
ok,
|
||||
parseCommandArgs,
|
||||
SessionRepository,
|
||||
streamProxy,
|
||||
toError,
|
||||
truncateHead,
|
||||
|
|
@ -28,7 +27,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 SessionRepository({ store: new InMemorySessionStore() });
|
||||
const repo = createInMemorySessionRepository();
|
||||
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