From c080d3d60de9efb3e8b1b0ab488df9f26eb751a3 Mon Sep 17 00:00:00 2001 From: Thomas Mickley-Doyle Date: Mon, 21 Apr 2025 22:57:44 -0500 Subject: [PATCH] Add example for negative comment --- crates/eval/examples/negative_feedback_comments/base.toml | 4 ++++ .../eval/examples/negative_feedback_comments/diff_criteria.md | 3 +++ crates/eval/examples/negative_feedback_comments/prompt.md | 1 + .../examples/negative_feedback_comments/thread_criteria.md | 3 +++ 4 files changed, 11 insertions(+) create mode 100644 crates/eval/examples/negative_feedback_comments/base.toml create mode 100644 crates/eval/examples/negative_feedback_comments/diff_criteria.md create mode 100644 crates/eval/examples/negative_feedback_comments/prompt.md create mode 100644 crates/eval/examples/negative_feedback_comments/thread_criteria.md diff --git a/crates/eval/examples/negative_feedback_comments/base.toml b/crates/eval/examples/negative_feedback_comments/base.toml new file mode 100644 index 00000000000000..ecce15076a5f9f --- /dev/null +++ b/crates/eval/examples/negative_feedback_comments/base.toml @@ -0,0 +1,4 @@ +# Pull Request: https://github.com/zed-industries/zed/pull/27934 +url = "https://github.com/zed-industries/zed.git" +revision = "889bc13b7dd61c67d894cee8a6cdd87f56c6c45b" +language_extension = "rs" diff --git a/crates/eval/examples/negative_feedback_comments/diff_criteria.md b/crates/eval/examples/negative_feedback_comments/diff_criteria.md new file mode 100644 index 00000000000000..d19da4c2596b4d --- /dev/null +++ b/crates/eval/examples/negative_feedback_comments/diff_criteria.md @@ -0,0 +1,3 @@ +1. The changes must add internal state to track whether the user is providing feedback comments and to store the comment editor instance. This includes adding new fields to the ActiveThread struct and initializing them appropriately when the thread is created. +2. When a user selects negative feedback, the application should show a UI for submitting additional comments. This includes rendering a short prompt, a multi-line text editor, and submit/cancel buttons. The editor should only be created when first needed, and the UI should be dismissed and cleaned up after submission or cancellation. +3. On submit, the system must report the negative feedback as before, and if the comment field is not empty, it must also log the comment as a separate telemetry event. Positive feedback handling should remain unchanged and bypass the comment UI entirely. diff --git a/crates/eval/examples/negative_feedback_comments/prompt.md b/crates/eval/examples/negative_feedback_comments/prompt.md new file mode 100644 index 00000000000000..057fb32bf1d2f4 --- /dev/null +++ b/crates/eval/examples/negative_feedback_comments/prompt.md @@ -0,0 +1 @@ +Add support for optional user comments when the thumbs down is given on a thread. Comments should be submitted along with the reaction and logged if provided. Make sure the UI highlights the ui icon when the user clicks it. diff --git a/crates/eval/examples/negative_feedback_comments/thread_criteria.md b/crates/eval/examples/negative_feedback_comments/thread_criteria.md new file mode 100644 index 00000000000000..9757c6b22cbde4 --- /dev/null +++ b/crates/eval/examples/negative_feedback_comments/thread_criteria.md @@ -0,0 +1,3 @@ +1. The first tool call should perform a regex search for terms related to "negative feedback." Since no specific file path or code snippet was provided, regex is necessary to locate relevant content. Once the matching files are found, their contents should be read. +2. Only the `zed/crates/agent/src/active_thread.rs` file needs to be edited. All logic related to reactions and negative comments should be contained within this file. +3. A comment box should appear only when the negative reaction is clicked. The positive reaction behavior should remain unchanged.