mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
fix: show history table directly when no active servers found in spawn list (#2451)
Instead of telling users to pipe through `spawn list | cat` to view their spawn history, render the history table inline when no active connections exist. The | cat workaround was needed because non-interactive mode skips the picker; now interactive mode falls through to renderListTable directly, consistent with what `spawn list | cat` was already doing. Agent: ux-engineer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c77ca106d2
commit
5db9cc2a80
2 changed files with 4 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.15.39",
|
||||
"version": "0.15.40",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -499,15 +499,9 @@ export async function cmdList(agentFilter?: string, cloudFilter?: string): Promi
|
|||
if (filtered.length === 0) {
|
||||
const historyRecords = filterHistory(agentFilter, cloudFilter);
|
||||
if (historyRecords.length > 0) {
|
||||
p.log.info("No active servers found.");
|
||||
p.log.info(
|
||||
pc.dim(
|
||||
`${historyRecords.length} spawn${historyRecords.length !== 1 ? "s" : ""} in history but without active connections.`,
|
||||
),
|
||||
);
|
||||
p.log.info(
|
||||
`Re-launch with ${pc.cyan("spawn <agent> <cloud>")} or view full history with ${pc.cyan("spawn list | cat")}`,
|
||||
);
|
||||
p.log.info("No active servers found. Showing spawn history:");
|
||||
renderListTable(historyRecords, manifest);
|
||||
showListFooter(historyRecords, agentFilter, cloudFilter);
|
||||
} else {
|
||||
await showEmptyListMessage(agentFilter, cloudFilter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue