跳过主要内容
以下是常见修复列表,按适用性排序
  • 切换到 bash(解决大多数情况)
    1. 在 Cline 中,左键单击聊天窗口右上角的 Settings 按钮
    2. 进入 Settings 窗口后,左键单击左侧列中的 “Terminal Settings” 选项卡
    3. 导航到 “Default Terminal Profile”,然后从下拉菜单中选择 “bash”
  • 增加超时时间
    1. 在 Cline 中,左键单击聊天窗口右上角的 Settings 按钮
    2. 进入 Settings 窗口后,左键单击左侧列中的 “Terminal Settings” 选项卡
    3. 导航到“Shell integration timeout (seconds)”,并在文本字段中输入 “10”
  • 禁用终端重用
    1. 在 Cline 中,左键单击聊天窗口右上角的 Settings 按钮
    2. 进入 Settings 窗口后,左键单击左侧列中的 “Terminal Settings” 选项卡
    3. 查找 “Enable aggressive terminal reuse”,并取消勾选此选项

特定平台修复

macOS + Oh-My-Zsh

# Create minimal config for VSCode
echo 'export TERM=xterm-256color' > ~/.zshrc-vscode
echo 'export PAGER=cat' >> ~/.zshrc-vscode

Windows PowerShell

# Run as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

WSL

  • 从 WSL 打开文件夹:code .
  • 在 Cline 设置中的 “Terminal Settings” 下选择 “WSL Bash”
  • “Shell integration timeout (seconds)” 增加到 15

完整指南

有关详细故障排除,请参阅完整的终端故障排除指南