MCPcopy
hub / github.com/openai/codex-plugin-cc / handleReviewCommand

Function handleReviewCommand

plugins/codex/scripts/codex-companion.mjs:712–753  ·  view source on GitHub ↗
(argv, config)

Source from the content-addressed store, hash-verified

710}
711
712async 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
755async function handleReview(argv) {
756 return handleReviewCommand(argv, {

Callers 2

handleReviewFunction · 0.85
mainFunction · 0.85

Calls 8

resolveReviewTargetFunction · 0.90
parseCommandInputFunction · 0.85
resolveCommandCwdFunction · 0.85
resolveCommandWorkspaceFunction · 0.85
buildReviewJobMetadataFunction · 0.85
createCompanionJobFunction · 0.85
runForegroundCommandFunction · 0.85
executeReviewRunFunction · 0.85

Tested by

no test coverage detected