Skip to content

Enhance image carousel with section support and chat integration#301308

Merged
rebornix merged 4 commits intomainfrom
rebornix/boiling-locust
Mar 13, 2026
Merged

Enhance image carousel with section support and chat integration#301308
rebornix merged 4 commits intomainfrom
rebornix/boiling-locust

Conversation

@rebornix
Copy link
Member

Introduce support for sections and captions in the image carousel. Refactor the image extraction logic for improved type safety and integrate image extraction from chat responses to enhance the carousel experience.

@rebornix rebornix enabled auto-merge March 13, 2026 00:24
@rebornix rebornix self-assigned this Mar 13, 2026
Copilot AI review requested due to automatic review settings March 13, 2026 00:24
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the image carousel feature to support sections (grouped thumbnails with titles) and per-image captions, while moving the image extraction logic from a dedicated service (ImageCarouselService) into a standalone utility function (extractImagesFromChatResponse) in the chat domain. The chat integration for building carousel collections is moved into ImageAttachmentWidget, removing the prior IImageCarouselService dependency.

Changes:

  • Replaced images with sections (array of ICarouselSection) on IImageCarouselCollection, and added caption to ICarouselImage, with corresponding editor UI updates (section rendering, caption display, counter removal).
  • Deleted ImageCarouselService and replaced it with a pure function extractImagesFromChatResponse in a new chatImageExtraction.ts file, improving type safety and decoupling.
  • Moved carousel-opening logic (response scanning, fallback) from the action handler into ImageAttachmentWidget.openInCarousel, simplifying the command to accept either a pre-built collection or single image args.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
imageCarouselTypes.ts Added ICarouselSection interface, caption to ICarouselImage, replaced images with sections on IImageCarouselCollection.
imageCarouselEditor.ts Adapted editor to flatten sections for navigation, render section thumbnails with titles, and display captions.
imageCarousel.contribution.ts Removed service registration, added typed arg interfaces and type guards, simplified action to accept collection or single image args.
imageCarouselService.ts Deleted — service replaced by standalone extraction function.
chatImageExtraction.ts New file: pure extraction functions with URI generation, caption from tool messages, and collection title from user request.
chatAttachmentWidgets.ts Moved carousel-opening logic here; scans responses, matches by URI or data, builds collection with single section.
imageCarousel.css Restructured bottom bar: added section containers, section titles, caption styling; removed counter.
AGENTS.md Updated design documentation to reflect new DOM structure, sections, and keyboard handling.

@rebornix rebornix merged commit f78ba93 into main Mar 13, 2026
20 checks passed
@rebornix rebornix deleted the rebornix/boiling-locust branch March 13, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants