mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-12 07:09:59 +00:00
feat(feedback): adopt 0–10 recommendation scale (#2438)
* feat(feedback): adopt 10-point recommendation scale * docs(feedback): keep OSS scale contract self-contained
This commit is contained in:
@@ -4,6 +4,7 @@ import { shouldTrack } from "./client.js";
|
||||
import { trackRenderFeedback } from "./events.js";
|
||||
import { detectAgentRuntime } from "./agent_runtime.js";
|
||||
import { c } from "../ui/colors.js";
|
||||
import { parseFeedbackRating } from "../utils/feedbackRating.js";
|
||||
|
||||
const DEFAULT_FEEDBACK_INTERVAL = 15;
|
||||
|
||||
@@ -50,7 +51,7 @@ export async function maybePromptRenderFeedback(opts: {
|
||||
console.log(
|
||||
c.dim(" [hyperframes] ") +
|
||||
c.dim("Agent feedback: ") +
|
||||
c.accent('hyperframes feedback --rating <1-5> --comment "..."'),
|
||||
c.accent('hyperframes feedback --rating <0-10> --comment "..."'),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -66,11 +67,11 @@ export async function maybePromptRenderFeedback(opts: {
|
||||
writeConfig(config);
|
||||
|
||||
const answer = await askQuestion(
|
||||
` ${c.dim("How was this render?")} ${c.accent("[1=poor 5=great, enter to skip]")} `,
|
||||
` ${c.dim("How likely are you to recommend HyperFrames?")} ${c.accent("[0=not likely 10=extremely likely, enter to skip]")} `,
|
||||
);
|
||||
|
||||
const rating = parseInt(answer.trim(), 10);
|
||||
if (rating >= 1 && rating <= 5) {
|
||||
const rating = parseFeedbackRating(answer);
|
||||
if (rating !== null) {
|
||||
// Ask for optional text feedback
|
||||
const details = await askQuestion(` ${c.dim("Any details?")} ${c.accent("(enter to skip)")} `);
|
||||
const trimmedDetails = details.trim();
|
||||
|
||||
Reference in New Issue
Block a user