Skip to content

Commit 9c754fb

Browse files
committed
fix(feedback): check for a review before treating a reply as plain feedback
1 parent 3329427 commit 9c754fb

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

‎packages/cli/src/agent/feedback-invite.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ and only then, put this to the user exactly once, in these words:
1111
1212
Then act on the reply:
1313

14-
- **They gave feedback.** Fetch `%(TASKLESS_CLI)s agent feedback` and follow it.
15-
It takes their words as they are and asks you, not them, for the rest.
1614
- **They said `review`**, alone or alongside their own words. Fetch
1715
`%(TASKLESS_CLI)s agent feedback` and follow it in review mode: the
1816
words they wrote besides `review`, if any, are `verbatim`, and you
1917
show them every answer in the chat, and take their corrections,
20-
before anything is sent.
18+
before anything is sent. Check for this first: a reply that asks for
19+
a review and also gives feedback is a review, not plain feedback.
20+
- **They gave feedback** without asking for a review. Fetch
21+
`%(TASKLESS_CLI)s agent feedback` and follow it. It takes their words as
22+
they are and asks you, not them, for the rest.
2123
- **They said `skip`, said nothing, or replied about something else.**
2224
Fetch `%(TASKLESS_CLI)s agent feedback` all the same and follow it with
2325
no `verbatim`. The rest of the survey is your account of the session,

‎packages/cli/test/feedback-recipes.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ describe("the feedback invite", () => {
123123
expect(reviewDoor).not.toContain("feedback dismiss");
124124
});
125125

126+
it("checks for a review before treating a reply as plain feedback", () => {
127+
const fragment =
128+
getRecipe("feedback-invite", { invocation, header: false }) ?? "";
129+
// A reply carrying both words and `review` must reach the review door,
130+
// so it is listed, and named as the first check, ahead of plain feedback.
131+
expect(fragment.indexOf("They said `review`")).toBeLessThan(
132+
fragment.indexOf("They gave feedback")
133+
);
134+
expect(fragment).toContain("Check for this first");
135+
});
136+
126137
it("sends the agent's account on skip, silence, or an unrelated reply", () => {
127138
const fragment =
128139
getRecipe("feedback-invite", { invocation, header: false }) ?? "";

0 commit comments

Comments
 (0)