Skip to content

Agents welcome: introduce isEmbeddedApp and parentAppName environment properties#314061

Merged
sandy081 merged 1 commit intomainfrom
sandy081/agents-welcome-parentapp-env
May 4, 2026
Merged

Agents welcome: introduce isEmbeddedApp and parentAppName environment properties#314061
sandy081 merged 1 commit intomainfrom
sandy081/agents-welcome-parentapp-env

Conversation

@sandy081
Copy link
Copy Markdown
Member

@sandy081 sandy081 commented May 4, 2026

Introduces proper environment service properties for the embedded (Agents) app to identify its parent VS Code installation by name.

Changes

  • Add isEmbeddedApp?: boolean to IEnvironmentService — set from process.isEmbeddedApp in native environments
  • Add @memoized parentAppNameShort and parentAppNameLong getters to AbstractNativeEnvironmentService, computed from isEmbeddedApp + product quality:
    • stable → "VS Code" / "Visual Studio Code"
    • insider → "VS Code Insiders" / "Visual Studio Code Insiders"
    • exploration → "VS Code Exploration" / "Visual Studio Code Exploration"
  • Thread isEmbeddedApp through INativeWindowConfiguration so the renderer picks it up
  • Use environmentService.parentAppNameShort in the welcome theme step to correctly label the "Use My VS Code Insiders Theme" button (previously showed "Use My Agents - Insiders Theme" because it used productService.embedded?.nameShort)

Follow-up to

- Add isEmbeddedApp property to IEnvironmentService (optional, defaults false)
- Add memoized parentAppNameShort and parentAppNameLong to IEnvironmentService
- Compute parent app display names from isEmbeddedApp flag and product quality
- Set isEmbeddedApp in NativeEnvironmentService from process.isEmbeddedApp
- Thread isEmbeddedApp through INativeWindowConfiguration to renderer
- Use environmentService.parentAppNameShort in welcome theme step button label

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 09:45
@sandy081 sandy081 enabled auto-merge (squash) May 4, 2026 09:46
@sandy081 sandy081 self-assigned this May 4, 2026
@sandy081 sandy081 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label May 4, 2026
Copy link
Copy Markdown
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 introduces environment-service support for the Agents (embedded) app to identify the parent VS Code installation by name, and uses that in the Agents welcome walkthrough to correctly label the “Use My VS Code Theme” option.

Changes:

  • Adds isEmbeddedApp?: boolean to IEnvironmentService, threads it through INativeWindowConfiguration, and wires it from main → renderer in native/Electron.
  • Adds memoized parentAppNameShort / parentAppNameLong getters on AbstractNativeEnvironmentService based on embedded-app status and product quality.
  • Updates the Agents welcome walkthrough to use environmentService.parentAppNameShort instead of productService.embedded?.nameShort for the theme import label.
Show a summary per file
File Description
src/vs/workbench/services/environment/electron-browser/environmentService.ts Passes isEmbeddedApp from window configuration into the native environment service.
src/vs/sessions/contrib/welcome/browser/sessionsWalkthrough.ts Uses environmentService.parentAppNameShort to label the parent-theme import option correctly.
src/vs/platform/windows/electron-main/windowsMainService.ts Adds isEmbeddedApp to the window configuration payload sent to the renderer.
src/vs/platform/window/common/window.ts Extends INativeWindowConfiguration with optional isEmbeddedApp.
src/vs/platform/environment/node/environmentService.ts Populates isEmbeddedApp in native/node environments from process.isEmbeddedApp.
src/vs/platform/environment/common/environment.ts Extends IEnvironmentService with isEmbeddedApp and parentAppNameShort/Long properties.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 1

Comment thread src/vs/platform/environment/common/environmentService.ts
@vs-code-engineering
Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.119 when merged.

@sandy081 sandy081 merged commit 78a468f into main May 4, 2026
43 of 45 checks passed
@sandy081 sandy081 deleted the sandy081/agents-welcome-parentapp-env branch May 4, 2026 10:24
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone May 4, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants