Browse Source

feat: add VSCode terminal environment inheritance setting (#2862)

Co-authored-by: Eric Wheeler <[email protected]>
KJ7LNW 9 months ago
parent
commit
904f71cb19

+ 31 - 0
src/core/webview/webviewMessageHandler.ts

@@ -592,6 +592,37 @@ export const webviewMessageHandler = async (provider: ClineProvider, message: We
 			await updateGlobalState("fuzzyMatchThreshold", message.value)
 			await provider.postStateToWebview()
 			break
+		case "updateVSCodeSetting": {
+			// Allowlist of VSCode settings that can be updated
+			// Add new settings here when needed for future expansion
+			const ALLOWED_VSCODE_SETTINGS = ["terminal.integrated.inheritEnv"] as const
+
+			if (message.setting && message.value !== undefined) {
+				if (!ALLOWED_VSCODE_SETTINGS.includes(message.setting as (typeof ALLOWED_VSCODE_SETTINGS)[number])) {
+					provider.log(`Attempted to update restricted VSCode setting: ${message.setting}`)
+					vscode.window.showErrorMessage(`Cannot update restricted VSCode setting: ${message.setting}`)
+					break
+				}
+				await vscode.workspace.getConfiguration().update(message.setting, message.value, true)
+			}
+			break
+		}
+		case "getVSCodeSetting":
+			if (message.setting) {
+				try {
+					const value = vscode.workspace.getConfiguration().get(message.setting)
+					await provider.postMessageToWebview({ type: "vsCodeSetting", setting: message.setting, value })
+				} catch (error) {
+					console.error(`Failed to get VSCode setting ${message.setting}:`, error)
+					await provider.postMessageToWebview({
+						type: "vsCodeSetting",
+						setting: message.setting,
+						error: `Failed to get setting: ${error.message}`,
+						value: undefined,
+					})
+				}
+			}
+			break
 		case "alwaysApproveResubmit":
 			await updateGlobalState("alwaysApproveResubmit", message.bool ?? false)
 			await provider.postStateToWebview()

+ 4 - 0
src/shared/ExtensionMessage.ts

@@ -68,6 +68,7 @@ export interface ExtensionMessage {
 		| "acceptInput"
 		| "setHistoryPreviewCollapsed"
 		| "commandExecutionStatus"
+		| "vsCodeSetting"
 	text?: string
 	action?:
 		| "chatButtonClicked"
@@ -104,6 +105,9 @@ export interface ExtensionMessage {
 	promptText?: string
 	results?: { path: string; type: "file" | "folder"; label?: string }[]
 	error?: string
+	setting?: string
+	value?: any
+	vscodeSettingValue?: unknown
 }
 
 export type ExtensionState = Pick<

+ 5 - 0
src/shared/WebviewMessage.ts

@@ -51,6 +51,9 @@ export interface WebviewMessage {
 		| "openFile"
 		| "openMention"
 		| "cancelTask"
+		| "updateVSCodeSetting"
+		| "getVSCodeSetting"
+		| "vsCodeSetting"
 		| "alwaysAllowBrowser"
 		| "alwaysAllowMcp"
 		| "alwaysAllowModeSwitch"
@@ -134,6 +137,7 @@ export interface WebviewMessage {
 	images?: string[]
 	bool?: boolean
 	value?: number
+	vscodeSettingValue?: unknown
 	commands?: string[]
 	audioType?: AudioType
 	serverName?: string
@@ -145,6 +149,7 @@ export interface WebviewMessage {
 	dataUrls?: string[]
 	values?: Record<string, any>
 	query?: string
+	setting?: string
 	slug?: string
 	modeConfig?: ModeConfig
 	timeout?: number

+ 218 - 133
webview-ui/src/components/settings/TerminalSettings.tsx

@@ -1,5 +1,6 @@
-import { HTMLAttributes } from "react"
+import { HTMLAttributes, useState, useEffect } from "react"
 import { useAppTranslation } from "@/i18n/TranslationContext"
+import { vscode } from "@/utils/vscode"
 import { SquareTerminal } from "lucide-react"
 import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
 
@@ -50,10 +51,31 @@ export const TerminalSettings = ({
 	className,
 	...props
 }: TerminalSettingsProps) => {
+	const [inheritEnv, setInheritEnv] = useState<boolean>(true)
+
+	useEffect(() => {
+		// Get initial value from VSCode configuration
+		vscode.postMessage({ type: "getVSCodeSetting", setting: "terminal.integrated.inheritEnv" })
+	}, [])
+	useEffect(() => {
+		const handler = (event: MessageEvent<{ type: string; setting?: string; value?: boolean; error?: string }>) => {
+			const message = event.data
+			if (message.type === "vsCodeSetting" && message.setting === "terminal.integrated.inheritEnv") {
+				if (message.error) {
+					console.error("Failed to get terminal setting:", message.error)
+				} else {
+					setInheritEnv(message.value ?? true)
+				}
+			}
+		}
+		window.addEventListener("message", handler)
+		return () => window.removeEventListener("message", handler)
+	}, [])
+
 	const { t } = useAppTranslation()
 
 	return (
-		<div className={cn("flex flex-col gap-2", className)} {...props}>
+		<div className={cn("flex flex-col gap-0", className)} {...props}>
 			<SectionHeader>
 				<div className="flex items-center gap-2">
 					<SquareTerminal className="w-4" />
@@ -62,149 +84,212 @@ export const TerminalSettings = ({
 			</SectionHeader>
 
 			<Section>
-				<div>
-					<label className="block font-medium mb-1">{t("settings:terminal.outputLineLimit.label")}</label>
-					<div className="flex items-center gap-2">
-						<Slider
-							min={100}
-							max={5000}
-							step={100}
-							value={[terminalOutputLineLimit ?? 500]}
-							onValueChange={([value]) => setCachedStateField("terminalOutputLineLimit", value)}
-							data-testid="terminal-output-limit-slider"
-						/>
-						<span className="w-10">{terminalOutputLineLimit ?? 500}</span>
-					</div>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.outputLineLimit.description")}
+				{/* Basic Settings */}
+				<div className="flex flex-col gap-3">
+					<div className="flex items-center gap-4 font-bold">
+						<span className="codicon codicon-settings-gear" />
+						<div>{t("settings:terminal.basic.label")}</div>
 					</div>
-				</div>
-
-				<div>
-					<VSCodeCheckbox
-						checked={terminalCompressProgressBar ?? true}
-						onChange={(e: any) => setCachedStateField("terminalCompressProgressBar", e.target.checked)}
-						data-testid="terminal-compress-progress-bar-checkbox">
-						<span className="font-medium">{t("settings:terminal.compressProgressBar.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.compressProgressBar.description")}
+					<div className="pl-3 border-vscode-button-background">
+						<div>
+							<label className="block font-medium mb-1">
+								{t("settings:terminal.outputLineLimit.label")}
+							</label>
+							<div className="flex items-center gap-2">
+								<Slider
+									min={100}
+									max={5000}
+									step={100}
+									value={[terminalOutputLineLimit ?? 500]}
+									onValueChange={([value]) => setCachedStateField("terminalOutputLineLimit", value)}
+									data-testid="terminal-output-limit-slider"
+								/>
+								<span className="w-10">{terminalOutputLineLimit ?? 500}</span>
+							</div>
+							<div className="text-vscode-descriptionForeground text-sm mt-1">
+								{t("settings:terminal.outputLineLimit.description")}
+							</div>
+						</div>
+						<div>
+							<VSCodeCheckbox
+								checked={terminalCompressProgressBar ?? true}
+								onChange={(e: any) =>
+									setCachedStateField("terminalCompressProgressBar", e.target.checked)
+								}
+								data-testid="terminal-compress-progress-bar-checkbox">
+								<span className="font-medium">{t("settings:terminal.compressProgressBar.label")}</span>
+							</VSCodeCheckbox>
+							<div className="text-vscode-descriptionForeground text-sm mt-1">
+								{t("settings:terminal.compressProgressBar.description")}
+							</div>
+						</div>
 					</div>
 				</div>
 
-				<div>
-					<label className="block font-medium mb-1">
-						{t("settings:terminal.shellIntegrationTimeout.label")}
-					</label>
-					<div className="flex items-center gap-2">
-						<Slider
-							min={5_000}
-							max={60_000}
-							step={1_000}
-							value={[terminalShellIntegrationTimeout ?? 5_000]}
-							onValueChange={([value]) =>
-								setCachedStateField(
-									"terminalShellIntegrationTimeout",
-									Math.min(60_000, Math.max(5_000, value)),
-								)
-							}
-						/>
-						<span className="w-10">{(terminalShellIntegrationTimeout ?? 5000) / 1000}s</span>
+				{/* Advanced Settings */}
+				<div className="flex flex-col gap-3 mt-6">
+					<div className="flex items-center gap-4 font-bold">
+						<span className="codicon codicon-tools" />
+						<div>{t("settings:terminal.advanced.label")}</div>
 					</div>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.shellIntegrationTimeout.description")}
-					</div>
-				</div>
+					<p className="text-vscode-descriptionForeground text-sm mt-0">
+						{t("settings:terminal.advanced.description")}
+					</p>
+					<div className="pl-3 border-vscode-button-background">
+						<div>
+							<VSCodeCheckbox
+								checked={inheritEnv}
+								onChange={(e: any) => {
+									setInheritEnv(e.target.checked)
+									vscode.postMessage({
+										type: "updateVSCodeSetting",
+										setting: "terminal.integrated.inheritEnv",
+										value: e.target.checked,
+									})
+								}}
+								data-testid="terminal-inherit-env-checkbox">
+								<span className="font-medium">{t("settings:terminal.inheritEnv.label")}</span>
+							</VSCodeCheckbox>
+							<div className="text-vscode-descriptionForeground text-sm mt-1">
+								{t("settings:terminal.inheritEnv.description")}
+							</div>
+						</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalShellIntegrationDisabled ?? false}
-						onChange={(e: any) =>
-							setCachedStateField("terminalShellIntegrationDisabled", e.target.checked)
-						}>
-						<span className="font-medium">{t("settings:terminal.shellIntegrationDisabled.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.shellIntegrationDisabled.description")}
-					</div>
-				</div>
+						<div>
+							<VSCodeCheckbox
+								checked={terminalShellIntegrationDisabled ?? false}
+								onChange={(e: any) =>
+									setCachedStateField("terminalShellIntegrationDisabled", e.target.checked)
+								}>
+								<span className="font-medium">
+									{t("settings:terminal.shellIntegrationDisabled.label")}
+								</span>
+							</VSCodeCheckbox>
+							<div className="text-vscode-descriptionForeground text-sm mt-1">
+								{t("settings:terminal.shellIntegrationDisabled.description")}
+							</div>
+						</div>
+						{!terminalShellIntegrationDisabled && (
+							<>
+								<div>
+									<label className="block font-medium mb-1">
+										{t("settings:terminal.shellIntegrationTimeout.label")}
+									</label>
+									<div className="flex items-center gap-2">
+										<Slider
+											min={1000}
+											max={60000}
+											step={1000}
+											value={[terminalShellIntegrationTimeout ?? 5000]}
+											onValueChange={([value]) =>
+												setCachedStateField(
+													"terminalShellIntegrationTimeout",
+													Math.min(60000, Math.max(1000, value)),
+												)
+											}
+										/>
+										<span className="w-10">
+											{(terminalShellIntegrationTimeout ?? 5000) / 1000}s
+										</span>
+									</div>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.shellIntegrationTimeout.description")}
+									</div>
+								</div>
 
-				<div>
-					<label className="block font-medium mb-1">{t("settings:terminal.commandDelay.label")}</label>
-					<div className="flex items-center gap-2">
-						<Slider
-							min={0}
-							max={1000}
-							step={10}
-							value={[terminalCommandDelay ?? 0]}
-							onValueChange={([value]) =>
-								setCachedStateField("terminalCommandDelay", Math.min(1000, Math.max(0, value)))
-							}
-						/>
-						<span className="w-10">{terminalCommandDelay ?? 50}ms</span>
-					</div>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.commandDelay.description")}
-					</div>
-				</div>
+								<div>
+									<label className="block font-medium mb-1">
+										{t("settings:terminal.commandDelay.label")}
+									</label>
+									<div className="flex items-center gap-2">
+										<Slider
+											min={0}
+											max={1000}
+											step={10}
+											value={[terminalCommandDelay ?? 0]}
+											onValueChange={([value]) =>
+												setCachedStateField(
+													"terminalCommandDelay",
+													Math.min(1000, Math.max(0, value)),
+												)
+											}
+										/>
+										<span className="w-10">{terminalCommandDelay ?? 50}ms</span>
+									</div>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.commandDelay.description")}
+									</div>
+								</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalPowershellCounter ?? false}
-						onChange={(e: any) => setCachedStateField("terminalPowershellCounter", e.target.checked)}
-						data-testid="terminal-powershell-counter-checkbox">
-						<span className="font-medium">{t("settings:terminal.powershellCounter.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.powershellCounter.description")}
-					</div>
-				</div>
+								<div>
+									<VSCodeCheckbox
+										checked={terminalPowershellCounter ?? false}
+										onChange={(e: any) =>
+											setCachedStateField("terminalPowershellCounter", e.target.checked)
+										}
+										data-testid="terminal-powershell-counter-checkbox">
+										<span className="font-medium">
+											{t("settings:terminal.powershellCounter.label")}
+										</span>
+									</VSCodeCheckbox>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.powershellCounter.description")}
+									</div>
+								</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalZshClearEolMark ?? true}
-						onChange={(e: any) => setCachedStateField("terminalZshClearEolMark", e.target.checked)}
-						data-testid="terminal-zsh-clear-eol-mark-checkbox">
-						<span className="font-medium">{t("settings:terminal.zshClearEolMark.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.zshClearEolMark.description")}
-					</div>
-				</div>
+								<div>
+									<VSCodeCheckbox
+										checked={terminalZshClearEolMark ?? true}
+										onChange={(e: any) =>
+											setCachedStateField("terminalZshClearEolMark", e.target.checked)
+										}
+										data-testid="terminal-zsh-clear-eol-mark-checkbox">
+										<span className="font-medium">
+											{t("settings:terminal.zshClearEolMark.label")}
+										</span>
+									</VSCodeCheckbox>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.zshClearEolMark.description")}
+									</div>
+								</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalZshOhMy ?? false}
-						onChange={(e: any) => setCachedStateField("terminalZshOhMy", e.target.checked)}
-						data-testid="terminal-zsh-oh-my-checkbox">
-						<span className="font-medium">{t("settings:terminal.zshOhMy.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.zshOhMy.description")}
-					</div>
-				</div>
+								<div>
+									<VSCodeCheckbox
+										checked={terminalZshOhMy ?? false}
+										onChange={(e: any) => setCachedStateField("terminalZshOhMy", e.target.checked)}
+										data-testid="terminal-zsh-oh-my-checkbox">
+										<span className="font-medium">{t("settings:terminal.zshOhMy.label")}</span>
+									</VSCodeCheckbox>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.zshOhMy.description")}
+									</div>
+								</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalZshP10k ?? false}
-						onChange={(e: any) => setCachedStateField("terminalZshP10k", e.target.checked)}
-						data-testid="terminal-zsh-p10k-checkbox">
-						<span className="font-medium">{t("settings:terminal.zshP10k.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.zshP10k.description")}
-					</div>
-				</div>
+								<div>
+									<VSCodeCheckbox
+										checked={terminalZshP10k ?? false}
+										onChange={(e: any) => setCachedStateField("terminalZshP10k", e.target.checked)}
+										data-testid="terminal-zsh-p10k-checkbox">
+										<span className="font-medium">{t("settings:terminal.zshP10k.label")}</span>
+									</VSCodeCheckbox>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.zshP10k.description")}
+									</div>
+								</div>
 
-				<div>
-					<VSCodeCheckbox
-						checked={terminalZdotdir ?? false}
-						onChange={(e: any) => setCachedStateField("terminalZdotdir", e.target.checked)}
-						data-testid="terminal-zdotdir-checkbox">
-						<span className="font-medium">{t("settings:terminal.zdotdir.label")}</span>
-					</VSCodeCheckbox>
-					<div className="text-vscode-descriptionForeground text-sm mt-1">
-						{t("settings:terminal.zdotdir.description")}
+								<div>
+									<VSCodeCheckbox
+										checked={terminalZdotdir ?? false}
+										onChange={(e: any) => setCachedStateField("terminalZdotdir", e.target.checked)}
+										data-testid="terminal-zdotdir-checkbox">
+										<span className="font-medium">{t("settings:terminal.zdotdir.label")}</span>
+									</VSCodeCheckbox>
+									<div className="text-vscode-descriptionForeground text-sm mt-1">
+										{t("settings:terminal.zdotdir.description")}
+									</div>
+								</div>
+							</>
+						)}
 					</div>
 				</div>
 			</Section>

+ 12 - 0
webview-ui/src/i18n/locales/ca/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Configuració del terminal: Bàsica",
+			"description": "Configuració bàsica del terminal"
+		},
+		"advanced": {
+			"label": "Configuració del terminal: Avançada",
+			"description": "Les següents opcions poden requerir reiniciar el terminal per aplicar la configuració"
+		},
 		"outputLineLimit": {
 			"label": "Límit de sortida de terminal",
 			"description": "Nombre màxim de línies a incloure a la sortida del terminal en executar comandes. Quan s'excedeix, s'eliminaran línies del mig, estalviant token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Habilita la integració Powerlevel10k",
 			"description": "Quan està habilitat, estableix POWERLEVEL9K_TERM_SHELL_INTEGRATION=true per habilitar les característiques d'integració del shell Powerlevel10k. (experimental)"
+		},
+		"inheritEnv": {
+			"label": "Hereta variables d'entorn",
+			"description": "Quan està habilitat, el terminal hereta les variables d'entorn del procés pare de VSCode, com ara la configuració d'integració del shell definida al perfil d'usuari. Això commuta directament la configuració global de VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/de/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Terminal-Einstellungen: Grundlegend",
+			"description": "Grundlegende Terminal-Einstellungen"
+		},
+		"advanced": {
+			"label": "Terminal-Einstellungen: Erweitert",
+			"description": "Die folgenden Optionen erfordern möglicherweise einen Terminal-Neustart, um die Einstellung zu übernehmen"
+		},
 		"outputLineLimit": {
 			"label": "Terminal-Ausgabelimit",
 			"description": "Maximale Anzahl von Zeilen, die in der Terminal-Ausgabe bei der Ausführung von Befehlen enthalten sein sollen. Bei Überschreitung werden Zeilen aus der Mitte entfernt, wodurch Token gespart werden."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Powerlevel10k-Integration aktivieren",
 			"description": "Wenn aktiviert, wird POWERLEVEL9K_TERM_SHELL_INTEGRATION=true gesetzt, um die Shell-Integrationsfunktionen von Powerlevel10k zu aktivieren. (experimentell)"
+		},
+		"inheritEnv": {
+			"label": "Umgebungsvariablen übernehmen",
+			"description": "Wenn aktiviert, übernimmt das Terminal Umgebungsvariablen vom übergeordneten VSCode-Prozess, wie z.B. in Benutzerprofilen definierte Shell-Integrationseinstellungen. Dies schaltet direkt die globale VSCode-Einstellung `terminal.integrated.inheritEnv` um"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/en/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Terminal Settings: Basic",
+			"description": "Basic terminal settings"
+		},
+		"advanced": {
+			"label": "Terminal Settings: Advanced",
+			"description": "The following options may require a terminal restart to apply the setting"
+		},
 		"outputLineLimit": {
 			"label": "Terminal output limit",
 			"description": "Maximum number of lines to include in terminal output when executing commands. When exceeded lines will be removed from the middle, saving tokens."
@@ -349,6 +357,10 @@
 		"zdotdir": {
 			"label": "Enable ZDOTDIR handling",
 			"description": "When enabled, creates a temporary directory for ZDOTDIR to handle zsh shell integration properly. This ensures VSCode shell integration works correctly with zsh while preserving your zsh configuration. (experimental)"
+		},
+		"inheritEnv": {
+			"label": "Inherit environment variables",
+			"description": "When enabled, the terminal will inherit environment variables from VSCode's parent process, such as user-profile-defined shell integration settings. This directly toggles VSCode global setting `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/es/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Configuración del terminal: Básica",
+			"description": "Configuración básica del terminal"
+		},
+		"advanced": {
+			"label": "Configuración del terminal: Avanzada",
+			"description": "Las siguientes opciones pueden requerir reiniciar el terminal para aplicar la configuración"
+		},
 		"outputLineLimit": {
 			"label": "Límite de salida de terminal",
 			"description": "Número máximo de líneas a incluir en la salida del terminal al ejecutar comandos. Cuando se excede, se eliminarán líneas del medio, ahorrando token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Habilitar integración Powerlevel10k",
 			"description": "Cuando está habilitado, establece POWERLEVEL9K_TERM_SHELL_INTEGRATION=true para habilitar las características de integración del shell Powerlevel10k. (experimental)"
+		},
+		"inheritEnv": {
+			"label": "Heredar variables de entorno",
+			"description": "Cuando está habilitado, el terminal hereda las variables de entorno del proceso padre de VSCode, como la configuración de integración del shell definida en el perfil del usuario. Esto alterna directamente la configuración global de VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/fr/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Paramètres du terminal : Base",
+			"description": "Paramètres de base du terminal"
+		},
+		"advanced": {
+			"label": "Paramètres du terminal : Avancé",
+			"description": "Les options suivantes peuvent nécessiter un redémarrage du terminal pour appliquer le paramètre"
+		},
 		"outputLineLimit": {
 			"label": "Limite de sortie du terminal",
 			"description": "Nombre maximum de lignes à inclure dans la sortie du terminal lors de l'exécution de commandes. Lorsque ce nombre est dépassé, les lignes seront supprimées du milieu, économisant des token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Activer l'intégration Powerlevel10k",
 			"description": "Lorsqu'activé, définit POWERLEVEL9K_TERM_SHELL_INTEGRATION=true pour activer les fonctionnalités d'intégration du shell Powerlevel10k. (expérimental)"
+		},
+		"inheritEnv": {
+			"label": "Hériter des variables d'environnement",
+			"description": "Lorsqu'activé, le terminal hérite des variables d'environnement du processus parent VSCode, comme les paramètres d'intégration du shell définis dans le profil utilisateur. Cela bascule directement le paramètre global VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/hi/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "टर्मिनल सेटिंग्स: मूल",
+			"description": "मूल टर्मिनल सेटिंग्स"
+		},
+		"advanced": {
+			"label": "टर्मिनल सेटिंग्स: उन्नत",
+			"description": "निम्नलिखित विकल्पों को लागू करने के लिए टर्मिनल को पुनरारंभ करने की आवश्यकता हो सकती है"
+		},
 		"outputLineLimit": {
 			"label": "टर्मिनल आउटपुट सीमा",
 			"description": "कमांड निष्पादित करते समय टर्मिनल आउटपुट में शामिल करने के लिए पंक्तियों की अधिकतम संख्या। पार होने पर पंक्तियाँ मध्य से हटा दी जाएंगी, token बचाते हुए।"
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Powerlevel10k एकीकरण सक्षम करें",
 			"description": "सक्षम होने पर, Powerlevel10k शेल एकीकरण सुविधाओं को सक्षम करने के लिए POWERLEVEL9K_TERM_SHELL_INTEGRATION=true सेट करता है। (प्रयोगात्मक)"
+		},
+		"inheritEnv": {
+			"label": "पर्यावरण चर विरासत में लें",
+			"description": "सक्षम होने पर, टर्मिनल VSCode के मूल प्रक्रिया से पर्यावरण चर विरासत में लेता है, जैसे उपयोगकर्ता प्रोफ़ाइल में परिभाषित शेल एकीकरण सेटिंग्स। यह VSCode की वैश्विक सेटिंग `terminal.integrated.inheritEnv` को सीधे टॉगल करता है"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/it/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Impostazioni terminale: Base",
+			"description": "Impostazioni base del terminale"
+		},
+		"advanced": {
+			"label": "Impostazioni terminale: Avanzate",
+			"description": "Le seguenti opzioni potrebbero richiedere il riavvio del terminale per applicare l'impostazione"
+		},
 		"outputLineLimit": {
 			"label": "Limite output terminale",
 			"description": "Numero massimo di righe da includere nell'output del terminale durante l'esecuzione dei comandi. Quando superato, le righe verranno rimosse dal centro, risparmiando token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Abilita integrazione Powerlevel10k",
 			"description": "Quando abilitato, imposta POWERLEVEL9K_TERM_SHELL_INTEGRATION=true per abilitare le funzionalità di integrazione della shell Powerlevel10k. (sperimentale)"
+		},
+		"inheritEnv": {
+			"label": "Eredita variabili d'ambiente",
+			"description": "Quando abilitato, il terminale eredita le variabili d'ambiente dal processo padre di VSCode, come le impostazioni di integrazione della shell definite nel profilo utente. Questo attiva direttamente l'impostazione globale di VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/ja/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "ターミナル設定:基本",
+			"description": "基本的なターミナル設定"
+		},
+		"advanced": {
+			"label": "ターミナル設定:詳細",
+			"description": "以下のオプションは設定を適用するためにターミナルの再起動が必要な場合があります"
+		},
 		"outputLineLimit": {
 			"label": "ターミナル出力制限",
 			"description": "コマンド実行時にターミナル出力に含める最大行数。超過すると中央から行が削除され、tokenを節約します。"
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Powerlevel10k 統合を有効化",
 			"description": "有効にすると、POWERLEVEL9K_TERM_SHELL_INTEGRATION=true を設定して Powerlevel10k シェル統合機能を有効にします。(実験的)"
+		},
+		"inheritEnv": {
+			"label": "環境変数を継承",
+			"description": "有効にすると、ターミナルは VSCode の親プロセスから環境変数を継承します。ユーザープロファイルで定義されたシェル統合設定などが含まれます。これは VSCode のグローバル設定 `terminal.integrated.inheritEnv` を直接切り替えます"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/ko/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "터미널 설정: 기본",
+			"description": "기본 터미널 설정"
+		},
+		"advanced": {
+			"label": "터미널 설정: 고급",
+			"description": "다음 옵션들은 설정을 적용하기 위해 터미널 재시작이 필요할 수 있습니다"
+		},
 		"outputLineLimit": {
 			"label": "터미널 출력 제한",
 			"description": "명령 실행 시 터미널 출력에 포함할 최대 라인 수. 초과 시 중간에서 라인이 제거되어 token이 절약됩니다."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Powerlevel10k 통합 활성화",
 			"description": "활성화하면 POWERLEVEL9K_TERM_SHELL_INTEGRATION=true를 설정하여 Powerlevel10k 셸 통합 기능을 활성화합니다. (실험적)"
+		},
+		"inheritEnv": {
+			"label": "환경 변수 상속",
+			"description": "활성화하면 터미널이 VSCode 부모 프로세스로부터 환경 변수를 상속받습니다. 사용자 프로필에 정의된 셸 통합 설정 등이 포함됩니다. 이는 VSCode 전역 설정 `terminal.integrated.inheritEnv`를 직접 전환합니다"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/pl/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Ustawienia terminala: Podstawowe",
+			"description": "Podstawowe ustawienia terminala"
+		},
+		"advanced": {
+			"label": "Ustawienia terminala: Zaawansowane",
+			"description": "Poniższe opcje mogą wymagać ponownego uruchomienia terminala, aby zastosować ustawienie"
+		},
 		"outputLineLimit": {
 			"label": "Limit wyjścia terminala",
 			"description": "Maksymalna liczba linii do uwzględnienia w wyjściu terminala podczas wykonywania poleceń. Po przekroczeniu linie będą usuwane ze środka, oszczędzając token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Włącz integrację Powerlevel10k",
 			"description": "Po włączeniu ustawia POWERLEVEL9K_TERM_SHELL_INTEGRATION=true, aby włączyć funkcje integracji powłoki Powerlevel10k. (eksperymentalne)"
+		},
+		"inheritEnv": {
+			"label": "Dziedzicz zmienne środowiskowe",
+			"description": "Po włączeniu terminal dziedziczy zmienne środowiskowe z procesu nadrzędnego VSCode, takie jak ustawienia integracji powłoki zdefiniowane w profilu użytkownika. Przełącza to bezpośrednio globalne ustawienie VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/pt-BR/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Configurações do terminal: Básicas",
+			"description": "Configurações básicas do terminal"
+		},
+		"advanced": {
+			"label": "Configurações do terminal: Avançadas",
+			"description": "As seguintes opções podem exigir reiniciar o terminal para aplicar a configuração"
+		},
 		"outputLineLimit": {
 			"label": "Limite de saída do terminal",
 			"description": "Número máximo de linhas a incluir na saída do terminal ao executar comandos. Quando excedido, as linhas serão removidas do meio, economizando token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Ativar integração Powerlevel10k",
 			"description": "Quando ativado, define POWERLEVEL9K_TERM_SHELL_INTEGRATION=true para habilitar os recursos de integração do shell Powerlevel10k. (experimental)"
+		},
+		"inheritEnv": {
+			"label": "Herdar variáveis de ambiente",
+			"description": "Quando ativado, o terminal herda variáveis de ambiente do processo pai do VSCode, como configurações de integração do shell definidas no perfil do usuário. Isso alterna diretamente a configuração global do VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/ru/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Настройки терминала: Основные",
+			"description": "Основные настройки терминала"
+		},
+		"advanced": {
+			"label": "Настройки терминала: Расширенные",
+			"description": "Следующие параметры могут потребовать перезапуск терминала для применения настроек"
+		},
 		"outputLineLimit": {
 			"label": "Лимит вывода терминала",
 			"description": "Максимальное количество строк, включаемых в вывод терминала при выполнении команд. При превышении строки из середины будут удаляться для экономии токенов."
@@ -349,6 +357,10 @@
 		"zdotdir": {
 			"label": "Включить обработку ZDOTDIR",
 			"description": "Если включено, создаёт временную директорию для ZDOTDIR для корректной интеграции zsh. Это обеспечивает корректную работу интеграции VSCode с zsh, сохраняя вашу конфигурацию. (экспериментально)"
+		},
+		"inheritEnv": {
+			"label": "Наследовать переменные среды",
+			"description": "Если включено, терминал будет наследовать переменные среды от родительского процесса VSCode, такие как настройки интеграции оболочки, определённые в профиле пользователя. Напрямую переключает глобальную настройку VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/tr/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Terminal Ayarları: Temel",
+			"description": "Temel terminal ayarları"
+		},
+		"advanced": {
+			"label": "Terminal Ayarları: Gelişmiş",
+			"description": "Aşağıdaki seçeneklerin uygulanması için terminalin yeniden başlatılması gerekebilir"
+		},
 		"outputLineLimit": {
 			"label": "Terminal çıktısı sınırı",
 			"description": "Komutları yürütürken terminal çıktısına dahil edilecek maksimum satır sayısı. Aşıldığında, token tasarrufu sağlayarak satırlar ortadan kaldırılacaktır."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Powerlevel10k entegrasyonunu etkinleştir",
 			"description": "Etkinleştirildiğinde, Powerlevel10k kabuk entegrasyon özelliklerini etkinleştirmek için POWERLEVEL9K_TERM_SHELL_INTEGRATION=true ayarlar. (deneysel)"
+		},
+		"inheritEnv": {
+			"label": "Ortam değişkenlerini devral",
+			"description": "Etkinleştirildiğinde, terminal VSCode üst işleminden ortam değişkenlerini devralır, örneğin kullanıcı profilinde tanımlanan kabuk entegrasyon ayarları gibi. Bu, VSCode'un global ayarı olan `terminal.integrated.inheritEnv` değerini doğrudan değiştirir"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/vi/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "Cài đặt Terminal: Cơ bản",
+			"description": "Cài đặt cơ bản cho terminal"
+		},
+		"advanced": {
+			"label": "Cài đặt Terminal: Nâng cao",
+			"description": "Các tùy chọn sau có thể yêu cầu khởi động lại terminal để áp dụng cài đặt"
+		},
 		"outputLineLimit": {
 			"label": "Giới hạn đầu ra terminal",
 			"description": "Số dòng tối đa để đưa vào đầu ra terminal khi thực hiện lệnh. Khi vượt quá, các dòng sẽ bị xóa khỏi phần giữa, tiết kiệm token."
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "Bật tích hợp Powerlevel10k",
 			"description": "Khi được bật, đặt POWERLEVEL9K_TERM_SHELL_INTEGRATION=true để kích hoạt các tính năng tích hợp shell của Powerlevel10k. (thử nghiệm)"
+		},
+		"inheritEnv": {
+			"label": "Kế thừa biến môi trường",
+			"description": "Khi được bật, terminal sẽ kế thừa các biến môi trường từ tiến trình cha của VSCode, như các cài đặt tích hợp shell được định nghĩa trong hồ sơ người dùng. Điều này trực tiếp chuyển đổi cài đặt toàn cục của VSCode `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/zh-CN/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "终端设置:基础",
+			"description": "基础终端设置"
+		},
+		"advanced": {
+			"label": "终端设置:高级",
+			"description": "以下选项可能需要重启终端才能应用设置"
+		},
 		"outputLineLimit": {
 			"label": "终端输出限制",
 			"description": "执行命令时在终端输出中包含的最大行数。超过时将从中间删除行,节省 token。"
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "启用 Powerlevel10k 集成",
 			"description": "启用后,设置 POWERLEVEL9K_TERM_SHELL_INTEGRATION=true 以启用 Powerlevel10k shell 集成功能。(实验性)"
+		},
+		"inheritEnv": {
+			"label": "继承环境变量",
+			"description": "启用后,终端将从 VSCode 父进程继承环境变量,如用户配置文件中定义的 shell 集成设置。这直接切换 VSCode 全局设置 `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {

+ 12 - 0
webview-ui/src/i18n/locales/zh-TW/settings.json

@@ -310,6 +310,14 @@
 		}
 	},
 	"terminal": {
+		"basic": {
+			"label": "終端機設定:基本",
+			"description": "基本終端機設定"
+		},
+		"advanced": {
+			"label": "終端機設定:進階",
+			"description": "以下選項可能需要重新啟動終端機才能套用設定"
+		},
 		"outputLineLimit": {
 			"label": "終端機輸出行數限制",
 			"description": "執行命令時終端機輸出的最大行數。超過此限制時,會從中間移除多餘的行數,以節省 token 用量。"
@@ -349,6 +357,10 @@
 		"zshP10k": {
 			"label": "啟用 Powerlevel10k 整合",
 			"description": "啟用後,設定 POWERLEVEL9K_TERM_SHELL_INTEGRATION=true 以啟用 Powerlevel10k shell 整合功能。(實驗性)"
+		},
+		"inheritEnv": {
+			"label": "繼承環境變數",
+			"description": "啟用後,終端機將從 VSCode 父程序繼承環境變數,如使用者設定檔中定義的 shell 整合設定。這直接切換 VSCode 全域設定 `terminal.integrated.inheritEnv`"
 		}
 	},
 	"advanced": {