Repository navigation
[EPIC-V][LOU-V12] agent.send(), session.send(), evals and the React hook accept content parts - #109
Merged
Merged
Conversation
…ook accept content parts send()/stream() on agents and sessions, t.send() and useLoushyAgent().send() take an AgentInput (string | ContentPart[] | Message[]). SqliteStore saves Uint8Array parts as base64 like FileSessionStore. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
…blic-api # Conflicts: # CHANGELOG.md # src/react/reducer.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
AgentInput = string | ContentPart[] | Message[](src/providers/content.ts) withtoMessages()anddescribeInput()helpers.agent.send()/agent.stream()(SimpleAgent),session.send()/stream(),t.send()in evals anduseLoushyAgent().send()accept it: a string or parts become one user message, aMessage[]is passed through (appended to the transcript in a session).[image]/[file]marker per non-text part.SqliteStoresessions and checkpoints encodeUint8Arrayparts as{ "$bytes": "<base64>" }likeFileSessionStore(reuses its exportedencodeBytes/decodeBytes; about 6 changed lines, V11.2 done here).Why
Finishes the "Multimodal input" matrix row after LOU-V11 (#106): messages could carry parts, but only
AgentExecutor.execute()could take them.Acceptance criteria
send/streamonSimpleAgentandAgentSessionacceptAgentInput; checkpoint/resume paths work with parts (tested with a crash +agent.resume()).t.send()anduseLoushyAgent().send()acceptAgentInput; the hook shows text viatextOfplus[image]/[file]markers.SqliteStoresessions/checkpoints round-tripUint8Arrayparts.mockModel:agent.send(parts)asserted on the recorded request, session round trip viamemoryStore()and:memory:SqliteStore, evalt.send(parts), hooksend(parts), reducer, type test.How verified
npx tsc --noEmit: cleannpm run lint: 0 errors, 404 warnings (none in changed files)npm run test:types: 6 files, 30 tests, no type errorsnpx vitest run: 158 files passed, 2294 passed / 3 skippednpm run build && npm run build --workspace=packages/create-loushy-agent: successnpm run docs:verify-snippets -- --skip-build: all 120 snippets type-checknpm run docs:llms:check: oknpm run test:coverage: 2294 passed;npm run fallow: exit 0, 0 above threshold🤖 Generated with Claude Code
https://claude.ai/code/session_016bY29ibQgv3MDdjAbUT4YR
Generated by Claude Code