mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(agent): restore streamFn extension compatibility
Keep streamFn required for typed callers while preserving the legacy runtime fallback for extensions that omit it.\n\nfixes #6915
This commit is contained in:
parent
b142504125
commit
b9e5c5d941
26 changed files with 210 additions and 88 deletions
|
|
@ -24,7 +24,7 @@ const model = getModel("google", "gemini-2.5-flash");
|
|||
const schema = Type.Object({ prompt: Type.String() });
|
||||
const stream = createAssistantMessageEventStream();
|
||||
|
||||
const agent = new Agent({ initialState: { model }, streamFunction: streamSimple });
|
||||
const agent = new Agent({ initialState: { model }, streamFn: streamSimple });
|
||||
agent.steer({ role: "user", content: [{ type: "text", text: "queued" }], timestamp: 0 });
|
||||
const repo = new InMemorySessionRepo();
|
||||
const result = getOrThrow(ok({ value: 1 }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue