(argv, config)
| 710 | } |
| 711 | |
| 712 | async function handleReviewCommand(argv, config) { |
| 713 | const { options, positionals } = parseCommandInput(argv, { |
| 714 | valueOptions: ["base", "scope", "model", "cwd"], |
| 715 | booleanOptions: ["json", "background", "wait"], |
| 716 | aliasMap: { |
| 717 | m: "model" |
| 718 | } |
| 719 | }); |
| 720 | |
| 721 | const cwd = resolveCommandCwd(options); |
| 722 | const workspaceRoot = resolveCommandWorkspace(options); |
| 723 | const focusText = positionals.join(" ").trim(); |
| 724 | const target = resolveReviewTarget(cwd, { |
| 725 | base: options.base, |
| 726 | scope: options.scope |
| 727 | }); |
| 728 | |
| 729 | config.validateRequest?.(target, focusText); |
| 730 | const metadata = buildReviewJobMetadata(config.reviewName, target); |
| 731 | const job = createCompanionJob({ |
| 732 | prefix: "review", |
| 733 | kind: metadata.kind, |
| 734 | title: metadata.title, |
| 735 | workspaceRoot, |
| 736 | jobClass: "review", |
| 737 | summary: metadata.summary |
| 738 | }); |
| 739 | await runForegroundCommand( |
| 740 | job, |
| 741 | (progress) => |
| 742 | executeReviewRun({ |
| 743 | cwd, |
| 744 | base: options.base, |
| 745 | scope: options.scope, |
| 746 | model: options.model, |
| 747 | focusText, |
| 748 | reviewName: config.reviewName, |
| 749 | onProgress: progress |
| 750 | }), |
| 751 | { json: options.json } |
| 752 | ); |
| 753 | } |
| 754 | |
| 755 | async function handleReview(argv) { |
| 756 | return handleReviewCommand(argv, { |
no test coverage detected