From 85dbd30b7472b98a8fd5cc39b84ce986b9bf3ff8 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Thu, 31 Jul 2025 14:32:35 -0700 Subject: [PATCH] Use login shell to start aish in sidecar pane to inherit proper PATH --- shell/AIShell.Integration/InitAndCleanup.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/AIShell.Integration/InitAndCleanup.cs b/shell/AIShell.Integration/InitAndCleanup.cs index b5d5e945..52cf7290 100644 --- a/shell/AIShell.Integration/InitAndCleanup.cs +++ b/shell/AIShell.Integration/InitAndCleanup.cs @@ -7,7 +7,7 @@ namespace AIShell.Integration; public class InitAndCleanup : IModuleAssemblyInitializer, IModuleAssemblyCleanup { - private const int ScriptVersion = 1; + private const int ScriptVersion = 2; private const string ScriptFileTemplate = "aish_split_pane_v{0}.py"; private const string SplitPanePythonCode = """ import iterm2 @@ -31,7 +31,8 @@ await app.async_activate() change = iterm2.LocalWriteOnlyProfile() change.set_use_custom_command('Yes') - change.set_command(f'{app_path} --channel {channel}') + # Use login shell to inherit proper PATH and environment + change.set_command(f'/bin/zsh -l -c "{app_path} --channel {channel}"') # Split pane vertically split_pane = await current_pane.async_split_pane(vertical=True, profile_customizations=change)