fix(cli): make missing-companion-binary error actually helpful (#258)
@whereiszebra (issue #258) downloaded just \`deepseek-macos-arm64\` from the GitHub Release, ran it, hit: error: deepseek-tui binary not found at /path/to/deepseek-tui. Build workspace default members to install it, or set DEEPSEEK_TUI_BIN to its absolute path. …spent 11 minutes figuring out they also needed \`deepseek-tui-macos-arm64\` sitting next to it, and self-closed with: "Release page does not document that both deepseek-macos-arm64 and deepseek-tui-macos-arm64 must be downloaded together." The dispatcher's error was the wrong message for the population that hits it most often — direct GitHub Release downloaders. "Build workspace default members" is meaningless if you didn't clone the repo. \`DEEPSEEK_TUI_BIN\` is also not what they need. New message lists the three concrete install paths that actually work for a fresh user — npm, cargo, or grab BOTH binaries from the same release page — and keeps the env var override as a final fallback for power users. No logic change; just better text. Existing \`locate_sibling_tui_binary_honours_env_override\` test still passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -1111,7 +1111,17 @@ fn locate_sibling_tui_binary() -> Result<PathBuf> {
|
||||
// expected name, not "deepseek-tui" on Windows.
|
||||
let expected = current.with_file_name(format!("deepseek-tui{}", std::env::consts::EXE_SUFFIX));
|
||||
bail!(
|
||||
"deepseek-tui binary not found at {}. Build workspace default members to install it, or set DEEPSEEK_TUI_BIN to its absolute path.",
|
||||
"Companion `deepseek-tui` binary not found at {}.\n\
|
||||
\n\
|
||||
The `deepseek` dispatcher delegates interactive sessions to a sibling \
|
||||
`deepseek-tui` binary. To fix this, install one of:\n\
|
||||
• npm: npm install -g deepseek-tui (downloads both binaries)\n\
|
||||
• cargo: cargo install deepseek-tui-cli deepseek-tui --locked\n\
|
||||
• GitHub Releases: download BOTH `deepseek-<platform>` AND \
|
||||
`deepseek-tui-<platform>` from https://github.com/Hmbown/DeepSeek-TUI/releases/latest \
|
||||
and place them in the same directory.\n\
|
||||
\n\
|
||||
Or set DEEPSEEK_TUI_BIN to the absolute path of an existing `deepseek-tui` binary.",
|
||||
expected.display()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user