fix(desktop): fix broken install links, wrong adapter package, and hermit env leak

Replace window.open() with <a target="_blank"> for "View instructions"
links — Tauri blocks window.open but handles anchor tags correctly.

Fix Claude Code adapter install command: the package is
@agentclientprotocol/claude-agent-acp (not @anthropic-ai/claude-agent-acp
which doesn't exist on npm).

Strip NPM_CONFIG_PREFIX, NPM_CONFIG_CACHE, and COREPACK_HOME from the
install subprocess environment so npm uses the user's normal registry
rather than inheriting hermit's project-local Artifactory proxy config.
This commit is contained in:
Will Pfleger
2026-05-22 17:24:57 -04:00
parent 39a7aa9015
commit f1821bce8e
3 changed files with 13 additions and 6 deletions

View File

@@ -105,6 +105,12 @@ fn run_install_command(step: &str, command: &str) -> InstallStepResult {
let mut cmd = std::process::Command::new(shell);
cmd.args(["-l", "-c", command]);
// Strip hermit env vars so npm/node use the user's normal registry and
// global prefix rather than the project-local hermit-managed paths.
cmd.env_remove("NPM_CONFIG_PREFIX");
cmd.env_remove("NPM_CONFIG_CACHE");
cmd.env_remove("COREPACK_HOME");
if let Some(ref path) = shell_path {
cmd.env("PATH", path);
}

View File

@@ -82,8 +82,8 @@ const KNOWN_ACP_PROVIDERS: &[KnownAcpProvider] = &[
mcp_hooks: false,
underlying_cli: Some("claude"),
cli_install_commands: &["npm install -g @anthropic-ai/claude-code"],
adapter_install_commands: &["npm install -g @anthropic-ai/claude-agent-acp"],
install_instructions_url: "https://www.npmjs.com/package/@anthropic-ai/claude-agent-acp",
adapter_install_commands: &["npm install -g @agentclientprotocol/claude-agent-acp"],
install_instructions_url: "https://github.com/agentclientprotocol/claude-agent-acp",
install_hint: "Install the Claude Code ACP adapter via npm.",
},
KnownAcpProvider {

View File

@@ -60,14 +60,15 @@ function InstallActions({
{isInstalling ? "Installing..." : "Install"}
</Button>
) : null}
<button
<a
className="inline-flex items-center gap-1 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
onClick={() => window.open(provider.installInstructionsUrl, "_blank")}
type="button"
href={provider.installInstructionsUrl}
rel="noopener noreferrer"
target="_blank"
>
<ExternalLink className="h-3 w-3" />
View instructions
</button>
</a>
</div>
);
}