mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): ignore empty entries in --models
A trailing comma in --models produced an empty pattern, which matched every model by substring and added an extra model to the model cycle. fixes #10334
This commit is contained in:
parent
b271b0a524
commit
9b3c19da5c
3 changed files with 11 additions and 1 deletions
|
|
@ -139,7 +139,10 @@ export function parseArgs(args: string[]): Args {
|
|||
} else if (arg === "--session-dir" && i + 1 < args.length) {
|
||||
result.sessionDir = args[++i];
|
||||
} else if (arg === "--models" && i + 1 < args.length) {
|
||||
result.models = args[++i].split(",").map((s) => s.trim());
|
||||
result.models = args[++i]
|
||||
.split(",")
|
||||
.map((s) => s.trim())
|
||||
.filter((pattern) => pattern.length > 0);
|
||||
} else if (arg === "--no-tools" || arg === "-nt") {
|
||||
result.noTools = true;
|
||||
} else if (arg === "--no-builtin-tools" || arg === "-nbt") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue