Skip to content

feat: add image carousel#300983

Merged
rebornix merged 14 commits intomainfrom
rebornix/hollow-tarantula-image
Mar 12, 2026
Merged

feat: add image carousel#300983
rebornix merged 14 commits intomainfrom
rebornix/hollow-tarantula-image

Conversation

@rebornix
Copy link
Member

Adds a modal editor pane (imageCarousel) that displays images from MCP tool results in a carousel view with navigation controls.

Screen.Recording.2026-03-11.at.6.36.38.PM.mov

Copilot AI and others added 13 commits January 2, 2026 03:01
Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
Co-authored-by: rebornix <876920+rebornix@users.noreply.github.com>
- Rename chatImageSlideshow -> imageCarousel as a generic workbench contrib
- Remove editor resolver and collection store (direct EditorInput creation)
- Remove F1 command (single entry point via internal command)
- Fix response matching: only open collection containing clicked image
- Add registerOpenEditorListeners for keyboard/accessibility parity
- Localize all user-facing strings
- Add chat.imageCarousel.enabled preview setting (default: false)
- Rename command to workbench.action.chat.openImageInCarousel
- Use h() helper for declarative DOM, getMediaMime() for MIME types
- Editor not restorable (canSerialize returns false)
Copilot AI review requested due to automatic review settings March 12, 2026 02:25
@rebornix rebornix enabled auto-merge (squash) March 12, 2026 02:25
@rebornix rebornix self-assigned this Mar 12, 2026
@rebornix rebornix added this to the 1.112.0 milestone Mar 12, 2026
@rebornix rebornix disabled auto-merge March 12, 2026 02:25
@rebornix rebornix enabled auto-merge March 12, 2026 02:26
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

Adds a new workbench contribution that can open a modal “Image Carousel” editor to display image outputs from chat tool (MCP) results, gated behind a chat.imageCarousel.enabled preview setting and wired from the chat image attachment widget.

Changes:

  • Introduces imageCarousel workbench contribution: editor pane + editor input + image extraction service + CSS.
  • Adds chat.imageCarousel.enabled setting and routes image-attachment clicks to a new workbench.action.chat.openImageInCarousel command when enabled.
  • Adds a new vscode-image-carousel URI scheme and i18n resources registration for the new contrib.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/vs/workbench/workbench.common.main.ts Loads the new imageCarousel contribution.
src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css Styles for the carousel UI (main image, arrows, thumbnails).
src/vs/workbench/contrib/imageCarousel/browser/imageCarouselTypes.ts Defines the image/collection data model used by the editor/service.
src/vs/workbench/contrib/imageCarousel/browser/imageCarouselService.ts Extracts images from chat tool invocations to build collections.
src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditorInput.ts Editor input + resource identity for the carousel.
src/vs/workbench/contrib/imageCarousel/browser/imageCarouselEditor.ts Editor pane implementation (DOM, navigation, thumbnails).
src/vs/workbench/contrib/imageCarousel/browser/imageCarousel.contribution.ts Registers editor pane, service, serializer, and the open-in-carousel action.
src/vs/workbench/contrib/imageCarousel/AGENTS.md Documentation for the new contribution and usage patterns.
src/vs/workbench/contrib/chat/common/constants.ts Adds ChatConfiguration.ImageCarouselEnabled.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Registers the new preview setting.
src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.ts Wires image-attachment click/keyboard activation to open carousel when enabled.
src/vs/base/common/network.ts Adds Schemas.vscodeImageCarousel.
build/lib/i18n.resources.json Adds i18n project mapping for the new contribution folder.
Comments suppressed due to low confidence (2)

src/vs/workbench/contrib/imageCarousel/browser/media/imageCarousel.css:135

  • This thumbnail transition should be disabled under .monaco-workbench.monaco-reduce-motion to respect the reduced-motion accessibility setting (set transition: none in that scope).
	transition: border-color 0.15s ease, opacity 0.15s ease;
	flex-shrink: 0;

src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.ts:445

  • registerOpenEditorListeners invokes the callback with editor open options (e.g. openToSide), but the callback here doesn’t accept/forward those options. Consider using addResourceOpenHandlers(...) for the resource path and using registerOpenEditorListeners only for the carousel path, or update the handler signature to forward options appropriately.
		const canOpenCarousel = attachment.value instanceof Uint8Array && configurationService.getValue<boolean>(ChatConfiguration.ImageCarouselEnabled);
		if (canOpenCarousel || resource) {
			this.element.style.cursor = 'pointer';
			this._register(registerOpenEditorListeners(this.element, async () => {
				await clickHandler();

@daburazbu
Copy link

Dobree je

@daburazbu
Copy link

rebornix/hollow-tarantula-image

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rebornix rebornix merged commit b79bcf7 into main Mar 12, 2026
30 of 31 checks passed
@rebornix rebornix deleted the rebornix/hollow-tarantula-image branch March 12, 2026 03:39
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.

5 participants