bash-git-prompt
bash-git-prompt copied to clipboard
Breaks VSCode GitHub Copilot Agent when running commands in the terminal
When using VSCode GitHub Copilot Agent and allowing it to run commands in the terminal (Ubuntu in WSL2), it keeps the agent hanging and does not continue after a command it executed.
Seems when I deactivate bash-git-prompt it solves the issue.
See https://github.com/microsoft/vscode/issues/254447
I can find no way to distinguish the normal vscode terminal from the copilot terminal. Therefore a workaround is to check if the terminal has been opened by vscode in your .bashrc:
if [ -z "$VSCODE_INJECTION" ]; then
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
fi
But that will affect all terminals opened from vscode.