Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Screen Share Chat GuardNew to Visual Studio Code? Get it now.
Screen Share Chat Guard

Screen Share Chat Guard

Edoardo Polito

|
6 installs
| (0) | Free
Automatically clears or opens a new Copilot chat when screen sharing is detected
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Screen Share Chat Guard

A VS Code extension that automatically protects your Copilot chat history when screen sharing is detected. When you start sharing your screen, the extension can open a new chat or clear the current one to prevent sensitive conversation history from being visible.

Features

  • Automatic Detection: Monitors for screen sharing on macOS via common video conferencing apps (Zoom, Teams, Slack, Discord, etc.)
  • Configurable Action: Choose to open a new chat or clear the current one
  • Status Bar Indicator: Visual feedback showing protection status
  • Manual Check: Command to manually check for screen sharing
  • Toggle Protection: Quickly enable/disable via status bar click

Requirements

  • macOS (detection relies on macOS-specific APIs)
  • VS Code 1.85.0 or later
  • GitHub Copilot Chat extension

Permissions

macOS will only expose window titles and menu items to apps that have Accessibility and Automation privileges. After installing the extension:

  1. Open System Settings → Privacy & Security → Accessibility and allow Visual Studio Code (or the host you run the extension from).
  2. Open System Settings → Privacy & Security → Automation and permit VS Code to control System Events.

Without these permissions the detector cannot observe cùonferencing apps and will silently skip protection.

Configuration

Setting Default Description
screenShareChatGuard.enabled true Enable/disable protection
screenShareChatGuard.pollingIntervalMs 2000 Check interval (ms)
screenShareChatGuard.action "newChat" "newChat" or "clearChat"
screenShareChatGuard.showNotification true Show notification on trigger

Commands

  • Screen Share Chat Guard: Toggle Protection - Enable/disable protection
  • Screen Share Chat Guard: Check Screen Sharing Now - Manual check

Status Bar

Click the status bar item to toggle protection:

  • $(shield) Guard On - Protection active, monitoring
  • $(broadcast) Screen Sharing - Screen sharing detected (warning color)
  • $(eye-closed) Guard Off - Protection disabled

How It Works

The extension polls for screen sharing indicators by:

  1. Querying macOS' session dictionary to see if any app is currently capturing the screen (ScreenCaptureKit flag). This catches Chrome/Meet tab share and any other tool that starts a capture session.
  2. Asking macOS System Events for the list of foreground applications
  3. Reading each target app's window titles for sharing/presenting keywords
  4. Running app-specific heuristics (for example, Zoom's Stop Share menu item)

When screen sharing is detected, the extension executes the configured action (new chat or clear chat) to protect your conversation history.

Supported Apps

Detection works with common video conferencing applications:

  • Zoom
  • Microsoft Teams
  • Slack
  • Discord
  • Google Meet
  • Webex
  • GoToMeeting
  • Around
  • Loom
  • OBS
  • QuickTime Player
  • Screenflow

Limitations

  • Currently only supports macOS
  • Detection is heuristic-based and may not catch all screen sharing scenarios
  • Some apps may not be detected if they use non-standard window titles
  • Requires Accessibility + Automation consent; macOS blocks detection until those toggles are enabled

Privacy

This extension runs entirely locally. No data is sent to external servers. The extension only reads process and window information to detect screen sharing status.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft