diff --git a/cli/package.json b/cli/package.json index 7af8ee54..ef27f656 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/spawn", - "version": "0.2.44", + "version": "0.2.45", "type": "module", "bin": { "spawn": "cli.js" diff --git a/cli/src/commands.ts b/cli/src/commands.ts index 49f29212..4fe02cc2 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -770,6 +770,11 @@ export async function cmdList(agentFilter?: string, cloudFilter?: string): Promi } console.log(); + + // Show rerun hint for the most recent spawn (first record since list is newest-first) + const latest = records[0]; + console.log(`Rerun last: ${pc.cyan(`spawn ${latest.agent} ${latest.cloud}`)}`); + console.log(pc.dim(`${records.length} spawn${records.length !== 1 ? "s" : ""} recorded`)); console.log(pc.dim(`Filter: ${pc.cyan("spawn list -a ")} or ${pc.cyan("spawn list -c ")}`)); console.log(); diff --git a/cli/src/history.ts b/cli/src/history.ts index 119eab96..8cadb035 100644 --- a/cli/src/history.ts +++ b/cli/src/history.ts @@ -52,5 +52,7 @@ export function filterHistory( const lower = cloudFilter.toLowerCase(); records = records.filter((r) => r.cloud.toLowerCase() === lower); } + // Show newest first (reverse chronological order) + records.reverse(); return records; }