MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / run

Function run

packages/cli/src/commands/feedback.ts:147–178  ·  view source on GitHub ↗
({ args })

Source from the content-addressed store, hash-verified

145 },
146 },
147 async run({ args }) {
148 const rating = parseRating(args.rating);
149 if (rating === null) {
150 console.error(c.error("Rating must be between 1 and 5"));
151 process.exit(1);
152 }
153
154 if (!shouldTrack()) {
155 console.log(c.dim("Telemetry is disabled. Feedback not sent."));
156 return;
157 }
158
159 const comment = normalizeComment(args.comment);
160 const doctorSummary = await getDoctorSummary();
161
162 // The standalone command runs separately from `render`, so it has no real
163 // elapsed time to report. Omit it rather than recording a fake duration.
164 trackRenderFeedback({ rating, comment, doctorSummary });
165
166 await flush();
167 console.log(c.dim("Thanks for the feedback!"));
168
169 if (args["file-issue"] === true) {
170 await fileGithubIssue({
171 rating,
172 comment,
173 rawDir: args.dir,
174 yes: args.yes === true,
175 doctorSummary,
176 });
177 }
178 },
179});

Callers

nothing calls this directly

Calls 8

flushFunction · 0.90
parseRatingFunction · 0.85
normalizeCommentFunction · 0.85
getDoctorSummaryFunction · 0.85
trackRenderFeedbackFunction · 0.85
fileGithubIssueFunction · 0.85
errorMethod · 0.80
shouldTrackFunction · 0.50

Tested by

no test coverage detected