feat: copilot cli + shells that actually source .zshrc#2
Open
megamanics wants to merge 2 commits intoAwalTerminal:mainfrom
Open
feat: copilot cli + shells that actually source .zshrc#2megamanics wants to merge 2 commits intoAwalTerminal:mainfrom
megamanics wants to merge 2 commits intoAwalTerminal:mainfrom
Conversation
we were spawning AI sessions as zsh -l -c. login but not interactive. zsh skips .zshrc for that. fnm and nvm live in .zshrc. so node and npm were invisible. the auto-installer for claude/gemini/codex then ran 'npm install' against a missing npm. the shell exited. the ui showed 'session has ended' before the user even sat down. now we spawn -i -l -c. .zshrc runs. npm exists. installs work. binaryPath also stopped pretending the world is two directories. it now checks ~/.local/bin, ~/.bun/bin, ~/bin, ~/.cargo/bin, and falls back to asking the user's own login shell where the binary is. cached, with a 3 second leash. resume entries finally show up for people who don't keep their tools in /usr/local/bin like it's 2014.
claude. gemini. codex. and now copilot. the menu reads like a streaming service. ModelCatalog gets a new entry. command 'copilot'. installs via npm install -g @github/copilot. danger flag is --allow-all because that's the one that actually means it. resume via copilot --resume. config at ~/.copilot/config.json. AIComponentInjector routes copilot through the same AGENTS.md path gemini and codex use. SessionManager surfaces an interactive resume entry when the binary is around. TerminalView+Menu gets three new loading messages because spinning up the octocat deserves billing. the model menu, status bar, llm tab bar, and resume picker all read from ModelCatalog.all. so they pick this up without being told.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
two things, both small, both delivered with the kind of confidence
that only comes from finally understanding why nothing was working.
claude, gemini, and codex. menu reads like a streaming service.
-i -l -cinstead of-l -c— so.zshrcactually runs and
node/npmare visible to the auto-installer.plus
binaryPathlearned about directories that aren't/usr/local/bin.why
before this, on a machine where claude/gemini/codex weren't already
installed, picking one from the menu would:
zsh -l -c "command -v claude || npm install -g … && claude".zshrcbecause it's not interactivenpmis not onPATHnpm installexits withcommand not found&&short-circuits, the shell exits, the pty closesit looked like the app was broken. it was just a missing flag.
what changed
core/src/io/pty.rs-i -l -cinstead of-l -cso.zshrcrunsapp/.../SessionManager.swiftbinaryPathchecks~/.local/bin,~/.bun/bin,~/bin,~/.cargo/bin, with a cached fallback to the user's own login shell (3s timeout)app/.../ModelCatalog.swiftCopilotentry — commandcopilot, installnpm install -g @github/copilot, danger--allow-all, resumecopilot --resume, config~/.copilot/config.jsonapp/.../AIComponentInjector.swiftapp/.../SessionManager.swiftapp/.../TerminalView+Menu.swiftapp/.../WindowStateStore.swifttests
cargo fmt— cleanmachine where copilot lives in
~/.local/bin/copilot. resumed fromthe menu. did not see "session has ended" once.
(the
-ionly applies when a command is passed)notes
--allow-all, not--allow-all-tools.the latter only suppresses tool prompts; awal's danger mode contract
is "skip everything", which is what
--allow-alldoes (it's thealias for
--allow-all-tools --allow-all-paths --allow-all-urls).binaryPathchange is a quiet bonus fix that unblocks codex/geminiresume entries on the same npm-managed setups, not just copilot.