From bb88ab912979fc958836b0730ac43c5ae34c4b94 Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Fri, 1 May 2026 09:28:28 -0500 Subject: [PATCH] fix(cli): make missing-companion-binary error actually helpful (#258) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @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) --- crates/cli/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 43cd70df..8b4da41d 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1111,7 +1111,17 @@ fn locate_sibling_tui_binary() -> Result { // 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-` AND \ +`deepseek-tui-` 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() ); }