You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]](diffhunk://#diff-1abe443a8980fdf92f537c69abb866fdb65ca6a00be94942edc99eca49d60d75R37)
[[2]](diffhunk://#diff-1abe443a8980fdf92f537c69abb866fdb65ca6a00be94942edc99eca49d60d75L97-R98)
[[3]](diffhunk://#diff-1abe443a8980fdf92f537c69abb866fdb65ca6a00be94942edc99eca49d60d75L422-R427)
[[4]](diffhunk://#diff-1abe443a8980fdf92f537c69abb866fdb65ca6a00be94942edc99eca49d60d75L434-R441)
* Updated `TerminalActivationImpl` in
`src/features/terminal/terminalActivationState.ts` to use the new skip
logic, preventing activation for terminals that meet the skip criteria.
[[1]](diffhunk://#diff-4c638af1ef4f02d8c8038fcc38ca4a135ca30aaa3f2f51d840a2f5f372ffabbdL14-R14)
[[2]](diffhunk://#diff-4c638af1ef4f02d8c8038fcc38ca4a135ca30aaa3f2f51d840a2f5f372ffabbdR89-R93)
**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]](diffhunk://#diff-1abe443a8980fdf92f537c69abb866fdb65ca6a00be94942edc99eca49d60d75L3-R3)
[[2]](diffhunk://#diff-da71e7d6ace45ba8e09cc2f84096dcd5149997f178e5c0dafd84bbcd4627c822L2-R2)
Fixes#1482
0 commit comments