Skip to content

Pseudoterminal guard#1509

Open
edvilme wants to merge 4 commits intomainfrom
pseudoterminal-guard
Open

Pseudoterminal guard#1509
edvilme wants to merge 4 commits intomainfrom
pseudoterminal-guard

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented May 7, 2026

This pull request introduces a new utility function to consistently determine when terminal activation should be skipped, and refactors related logic throughout the codebase to use this function. The main goal is to improve reliability and maintainability by centralizing the logic for skipping activation of certain terminals (such as hidden or PTY-based extension terminals).

Terminal activation skip logic improvements:

  • Added a new function shouldSkipTerminalActivation in src/features/terminal/utils.ts to centralize the logic for skipping activation for terminals that are hidden from the user or are PTY-based extension terminals.
  • Refactored TerminalManagerImpl in src/features/terminal/terminalManager.ts to use shouldSkipTerminalActivation instead of directly checking terminal options in multiple places, ensuring consistent behavior when opening or activating terminals. [1] [2] [3] [4]
  • Updated TerminalActivationImpl in src/features/terminal/terminalActivationState.ts to use the new skip logic, preventing activation for terminals that meet the skip criteria. [1] [2]

Other changes:

  • Cleaned up imports in src/features/terminal/terminalManager.ts and src/features/terminal/utils.ts to remove unused TerminalOptions and add ExtensionTerminalOptions where needed. [1] [2]

Fixes #1482

edvilme and others added 4 commits May 7, 2026 10:09
Currently the extension gets activated on pseudoterminals as the current check for not user-facing terminals does not catch this case. These terminals should be skipped during activation as to avoid unexpected commands and behavior.
@edvilme edvilme force-pushed the pseudoterminal-guard branch from 7bb767c to 064ed26 Compare May 7, 2026 18:55
@edvilme edvilme added the bug Issue identified by VS Code Team member as probable bug label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activation commands sent to Pseudoterminals owned by other extensions

1 participant