feat(image upload): uploading images with inline text markers and sma…#135
feat(image upload): uploading images with inline text markers and sma…#135jesse-merhi wants to merge 3 commits intosubsy:mainfrom
Conversation
…rt deletion detection + Prettier code formatting
|
@jesse-merhi is attempting to deploy a commit to the plgeek Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedToo many files! 81 files out of 231 files are above the max files limit of 150. You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Apologies for the super long PR.... I didnt expect the formatting to touch so much but it seems it was fairly inconsistent around the place 😓. |
|
@jesse-merhi would you mind taking another pass at this PR that is more contained and based on latest (quite significant) changes in the codebase? |
Summary
Adds the ability for users to paste images into their
create-prdchat and send it to the agent. It also includes some handling for cleaning up and deleting images.Key Features
[Image N]markers: When an image is attached, a marker like[Image 1]is inserted at the cursor positionmax_images_per_messageallows you to limit how many messages - default is unlimited.Testing
bun test src/tui/utils/image-attachment.test.tsFiles
src/tui/hooks/useImageAttachment.ts - Core image attachment state management
src/tui/hooks/useImageAttachmentWithFeedback.ts - Wrapper with toast notifications
src/tui/hooks/useToast.ts - Toast notification system
src/tui/hooks/usePaste.ts - Paste event handling hook
src/tui/components/Toast.tsx - Toast UI component
src/tui/utils/image-detection.ts - Image format detection (path, base64, magic bytes)
src/tui/utils/image-storage.ts - Image storage with deduplication
src/tui/utils/exit-cleanup.ts - Exit cleanup handle
Prettier Code Formatting
I also added prettier code formatting. I realise perhaps this is not everyone's ideal formatter - but its fairly fast and easy to configure.