Skip to content

Commit 446e733

Browse files
committed
add remote values
1 parent 85aa6ae commit 446e733

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/features/terminal/shells/common/shellUtils.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,22 @@ export function isWsl(): boolean {
135135

136136
export async function getShellIntegrationEnabledCache(): Promise<boolean> {
137137
const persistentState = await getGlobalPersistentState();
138-
// Check VS Code setting for shell integration using inspect (all scopes)
139138
const shellIntegrationInspect =
140139
getConfiguration('terminal.integrated').inspect<boolean>('shellIntegration.enabled');
141140

142141
let shellIntegrationEnabled = true;
143142
if (shellIntegrationInspect) {
144-
// Priority: workspaceFolder > workspace > global > default
143+
// Priority: workspaceFolder > workspace > globalRemoteValue > globalLocalValue > global > default
144+
const inspectValue = shellIntegrationInspect as Record<string, unknown>;
145+
145146
if (shellIntegrationInspect.workspaceFolderValue !== undefined) {
146147
shellIntegrationEnabled = shellIntegrationInspect.workspaceFolderValue;
147148
} else if (shellIntegrationInspect.workspaceValue !== undefined) {
148149
shellIntegrationEnabled = shellIntegrationInspect.workspaceValue;
150+
} else if ('globalRemoteValue' in shellIntegrationInspect && inspectValue.globalRemoteValue !== undefined) {
151+
shellIntegrationEnabled = inspectValue.globalRemoteValue as boolean;
152+
} else if ('globalLocalValue' in shellIntegrationInspect && inspectValue.globalLocalValue !== undefined) {
153+
shellIntegrationEnabled = inspectValue.globalLocalValue as boolean;
149154
} else if (shellIntegrationInspect.globalValue !== undefined) {
150155
shellIntegrationEnabled = shellIntegrationInspect.globalValue;
151156
} else if (shellIntegrationInspect.defaultValue !== undefined) {

0 commit comments

Comments
 (0)