feat(schema): add type: 'image' to EVAL.yaml ContentItemSchema#831
Merged
feat(schema): add type: 'image' to EVAL.yaml ContentItemSchema#831
Conversation
Introduce a discriminated union Content type (ContentText | ContentImage | ContentFile) that enables multimodal content to flow through the pipeline without lossy flattening. Changes: - Add packages/core/src/evaluation/content.ts with Content union type, type guards (isContent, isContentArray), and getTextContent() accessor - Update Message.content from 'unknown' to 'string | Content[]' - Update extractLastAssistantContent() to handle Content[] via getTextContent() - Update claude-cli provider to preserve non-text content blocks (images) instead of dropping them during extraction - Update cli provider to handle Content[] from external processes - Export all content types from @agentv/core public API - Add 25 unit tests covering type guards, accessors, backward compat, and extractLastAssistantContent with Content[] Closes #817 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 'image' to ContentItemSchema type enum in eval-file.schema.ts - Add image file processing in message-processor.ts (base64 encoding, media type detection) - Support both processMessages and processExpectedMessages - Extension-based media type mapping: png, jpg, jpeg, gif, webp, svg, bmp - Image content produces ContentImage blocks with data URI source - Clear error messages for missing files and unsupported extensions - Regenerated eval-schema.json - Unit tests for media type detection, image processing, and error cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploying agentv with
|
| Latest commit: |
4ac05cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5cd722e8.agentv.pages.dev |
| Branch Preview URL: | https://feat-819-yaml-image.agentv.pages.dev |
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.
Closes #819
Changes
'image'toContentItemSchematype enum ineval-file.schema.tsmessage-processor.ts:processMessagesandprocessExpectedMessageshandletype: 'image'eval-schema.jsonYAML syntax
Depends on
#828 (
feat/817-content-union)