fix(v3.2.0): 取消安装后自动弹终端 + wt.exe 参数修复
- 安装完毕不再自动启动终端窗口 (避免 wt.exe 参数拼接错误) - 用户通过桌面快捷方式启动 Bookworm - 受限模式也改为提示而非自动启动 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7a9a5b8dfa
commit
697b58ef15
Binary file not shown.
@ -2791,14 +2791,8 @@ if ($allOK -and $env:ANTHROPIC_API_KEY) {
|
|||||||
# 最后回退: 让 pwsh 的 Get-Command 找 claude (可能仍走 .cmd)
|
# 最后回退: 让 pwsh 的 Get-Command 找 claude (可能仍走 .cmd)
|
||||||
"claude --dangerously-skip-permissions"
|
"claude --dangerously-skip-permissions"
|
||||||
}
|
}
|
||||||
# 默认模型双保险
|
# v3.2.0: 安装完毕不自动启动终端 (用户通过桌面快捷方式启动)
|
||||||
$launchCmd = "`$env:ANTHROPIC_MODEL='claude-opus-4-7'; $launchCmd"
|
Bw-Log "INFO" "安装完毕, 用户可通过桌面快捷方式启动 Bookworm"
|
||||||
$shellExe = if ($PwshPath -and (Test-Path $PwshPath)) { $PwshPath } else { "powershell" }
|
|
||||||
if (Get-Command wt.exe -ErrorAction SilentlyContinue) {
|
|
||||||
Start-Process wt.exe -ArgumentList "new-tab", "-d", $BootDir, "--title", "Bookworm v$BWVersion", $shellExe, "-NoLogo", "-NoExit", "-Command", $launchCmd
|
|
||||||
} else {
|
|
||||||
Start-Process $shellExe -ArgumentList "-NoLogo", "-NoExit", "-Command", "cd '$BootDir'; $launchCmd" -WorkingDirectory $BootDir
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -2809,15 +2803,5 @@ if ($allOK -and $env:ANTHROPIC_API_KEY) {
|
|||||||
if (-not $env:ANTHROPIC_API_KEY) { $issues += "- API 凭证未解密" }
|
if (-not $env:ANTHROPIC_API_KEY) { $issues += "- API 凭证未解密" }
|
||||||
$issueText = $issues -join "`n"
|
$issueText = $issues -join "`n"
|
||||||
|
|
||||||
$launchResult = Show-MsgBox "安装完成, 但存在以下问题:`n$issueText`n`n是否仍然启动 Claude Code?`n(将以受限模式运行)`n`n日志: $BWLogFile" "安装警告" "YesNo" "Warning"
|
Show-MsgBox "安装完成, 但存在以下问题:`n$issueText`n`n请通过桌面快捷方式启动 Bookworm。`n`n日志: $BWLogFile" "安装警告" "OK" "Warning"
|
||||||
if ($launchResult -eq "Yes" -and -not $SkipLaunch) {
|
|
||||||
$claudeCmd = "claude --dangerously-skip-permissions"
|
|
||||||
# v3.0.1: 统一用 pwsh (PS7) 启动, 不再用 cmd.exe
|
|
||||||
$shellExe = if ($PwshPath -and (Test-Path $PwshPath)) { $PwshPath } else { "powershell" }
|
|
||||||
if (Get-Command wt.exe -ErrorAction SilentlyContinue) {
|
|
||||||
Start-Process wt.exe -ArgumentList "new-tab", "--title", "Bookworm", $shellExe, "-NoExit", "-Command", $claudeCmd
|
|
||||||
} else {
|
|
||||||
Start-Process $shellExe -ArgumentList "-NoExit", "-Command", $claudeCmd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user