Release v0.22.4

- Add --list-models CLI flag for listing/finding models with fuzzy search

fixes #203
This commit is contained in:
Mario Zechner 2025-12-17 00:39:14 +01:00
parent e1ce9c1f49
commit 03b061773c
14 changed files with 171 additions and 41 deletions

View file

@ -6,6 +6,7 @@ import { Agent, type Attachment, ProviderTransport, type ThinkingLevel } from "@
import chalk from "chalk";
import { type Args, parseArgs, printHelp } from "./cli/args.js";
import { processFileArguments } from "./cli/file-processor.js";
import { listModels } from "./cli/list-models.js";
import { selectSession } from "./cli/session-picker.js";
import { getModelsPath, VERSION } from "./config.js";
import { AgentSession } from "./core/agent-session.js";
@ -149,6 +150,13 @@ export async function main(args: string[]) {
return;
}
// Handle --list-models flag: list available models and exit
if (parsed.listModels !== undefined) {
const searchPattern = typeof parsed.listModels === "string" ? parsed.listModels : undefined;
await listModels(searchPattern);
return;
}
// Handle --export flag: convert session file to HTML and exit
if (parsed.export) {
try {