-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(agent-manager): add image support #5176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(agent-manager): add image support #5176
Conversation
- Paste images from clipboard (Ctrl/Cmd+V) or select via file browser - Works in new agent prompts, follow-up messages, and resumed sessions - Support for PNG, JPEG, WebP, and GIF formats (up to 20 images) - Click thumbnails to preview, hover to remove - New `newTask` stdin message type for initial prompts with images - Temp image files cleaned up when extension deactivates
🦋 Changeset detectedLatest commit: 90f1515 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@marius-kilocode Heads up: I wasn't able to fully test this feature because Claude Code (which I was using) no longer works with Kilocode. The implementation is complete but could use additional testing before merge. |
- Add convertImagesToDataUrls() helper to useStdinJsonHandler.ts - Properly convert file paths received from Agent Manager to data URLs - Update --attach flag validation to work with --json-io mode - Add comprehensive tests for image conversion in stdin handler - Add image-handler.spec.ts for openImage function tests
- Extract CLI image conversion functions to cli/src/media/image-utils.ts - Extract extension temp image management to TempImageManager.ts - Add logging to cleanupTempImages error handling - Update outdated comment about CLI args in CliProcessHandler.ts - Fix TypeScript error in ExtensionMessageRow.tsx (FallbackProps type) - Add test-temp/ to cli/.gitignore
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis PR adds comprehensive image support to the Agent Manager, enabling users to paste images from clipboard or select via file browser. The implementation is well-structured with:
Files Reviewed (21 files)
|
|
@Drilmo I had todo a couple of changes to get this work. For the record on this PR:
|
- Handle undefined, null, empty string, and non-string inputs - Show error message for invalid inputs instead of crashing - Fixes 4 failing tests in image-handler.spec.ts
- Update image-utils.test.ts to expect { images: [], errors: [] } format
- Update useStdinJsonHandler.test.ts mock to return ImageConversionResult
- All 2040 CLI tests now pass
Previously images were only sent to the first version (i === 0). Now all versions receive the same images for consistent behavior.
|
Thanks @marius-kilocode for taking the time to review and finalize this! Really appreciate you handling the adjustments. The changes make sense:
Let me know if there's anything else needed on my end! |
Images are now displayed in a separate row above the action buttons, positioned at bottom-10 to avoid covering the text input area.
Dynamically adjust paddingBottom from 40px to 76px when images are selected to prevent image thumbnails from covering the text input.
Add key prop to DynamicTextArea that changes based on hasImages state, forcing React to remount the component and recalculate its size when images are added or removed.
Changed from badge-background (purple in light theme) to button-background and button-foreground for better visibility in both light and dark themes.
405adcf to
43daa93
Compare
…locales - Translate 'addImage' and 'removeImage' keys to all 21 supported languages - Fix indentation issues in locale files (extra tab removed) - Languages: ar, ca, cs, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, th, tr, uk, vi, zh-CN, zh-TW
60d000b to
c009b72
Compare
Summary
Add image support to Agent Manager, enabling multimodal interactions with agents.
Technical Details
newTaskstdin message type for initial prompts with imagesAddImageButton,ImageThumbnail,useImagePastehookTest Plan