mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 08:01:17 +00:00
fix: improve UX with version hints, clearer non-TTY message, and retry bug fix (#417)
- Add "spawn update" hint to version output so users know how to update - Simplify non-interactive TTY message (less alarming, more actionable) - Fix _api_handle_transient_http_error passing wrong first arg to _api_should_retry_on_error (was "http_429" instead of attempt number) - Sync README matrix count (444 -> 445) Agent: ux-engineer Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
343042cd90
commit
fa11fed516
4 changed files with 6 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Launch any AI agent on any cloud with a single command. Coding agents, research agents, self-hosted AI tools — Spawn deploys them all. All models powered by [OpenRouter](https://openrouter.ai). (ALPHA software, use at your own risk!)
|
||||
|
||||
**15 agents. 32 clouds. 444 combinations. Zero config.**
|
||||
**15 agents. 32 clouds. 445 combinations. Zero config.**
|
||||
|
||||
## Install
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.2.31",
|
||||
"version": "0.2.32",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -244,8 +244,8 @@ async function main(): Promise<void> {
|
|||
if (isInteractiveTTY()) {
|
||||
await cmdInteractive();
|
||||
} else {
|
||||
console.error(pc.yellow("Non-interactive terminal detected (no TTY). Showing help instead of interactive picker."));
|
||||
console.error(pc.dim("To launch directly, use: spawn <agent> <cloud>\n"));
|
||||
console.error(pc.yellow("No interactive terminal detected."));
|
||||
console.error(pc.dim(`To launch directly: ${pc.cyan("spawn <agent> <cloud>")}\n`));
|
||||
cmdHelp();
|
||||
}
|
||||
return;
|
||||
|
|
@ -255,6 +255,7 @@ async function main(): Promise<void> {
|
|||
const showVersion = () => {
|
||||
console.log(`spawn v${VERSION}`);
|
||||
console.log(pc.dim(` ${process.argv[1] ?? "unknown path"}`));
|
||||
console.log(pc.dim(` Run ${pc.cyan("spawn update")} to check for updates.`));
|
||||
};
|
||||
const immediateCommands: Record<string, () => void> = {
|
||||
"help": cmdHelp, "--help": cmdHelp, "-h": cmdHelp,
|
||||
|
|
|
|||
|
|
@ -1023,7 +1023,7 @@ _api_handle_transient_http_error() {
|
|||
error_msg="service unavailable"
|
||||
fi
|
||||
|
||||
if ! _api_should_retry_on_error "http_${http_code}" "${attempt}" "${max_retries}" "${interval}" "${max_interval}" "Cloud API returned ${error_msg} (HTTP ${http_code})"; then
|
||||
if ! _api_should_retry_on_error "${attempt}" "${max_retries}" "${interval}" "${max_interval}" "Cloud API returned ${error_msg} (HTTP ${http_code})"; then
|
||||
log_error "Cloud API returned HTTP ${http_code} after ${max_retries} attempts"
|
||||
return 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue