fixed tea pr list

This commit is contained in:
2026-05-13 20:31:44 +02:00
parent 3a34883ec7
commit 7f4319821f

View File

@@ -9,11 +9,12 @@ export const prList = tool({
.enum(["open", "closed", "all"]) .enum(["open", "closed", "all"])
.default("open") .default("open")
.describe("Filter by state"), .describe("Filter by state"),
limit: tool.schema.number().default(30).describe("Number of PRs to return"), limit: tool.schema.number().optional().describe("Number of PRs to return"),
}, },
async execute(args, context) { async execute(args, context) {
try { try {
const cmd = $`tea pr list --output json --state ${args.state} --limit ${args.limit ?? 30}`; const limit = args.limit || 30;
const cmd = $`tea pr list --output json --state ${args.state} --limit ${limit}`;
const result = await cmd.text(); const result = await cmd.text();
return result; return result;