Skip to content

Commit 50b2579

Browse files
authored
fix: make Review action list issues without auto-fixing (#167)
## Summary - Updated the Review agent action prompt to instruct the agent to identify and list issues rather than immediately fixing them - The agent now presents findings as a clear list and asks the user which ones (if any) to address ## Test plan - [ ] Click the Review action button in a workspace with changes - [ ] Verify the agent lists issues without auto-fixing them - [ ] Verify the agent asks the user for input before proceeding
1 parent 7eedcdc commit 50b2579

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

internal/graph/agent_helpers.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ var agentActions = []agentActionDef{
199199
Label: "Review",
200200
Description: "Ask for a code review",
201201
PromptFunc: func(_ actionContext) string {
202-
return "Ask a subagent for a thorough code review."
202+
return `Review the changes in this branch. Identify any issues, concerns, or suggestions, and present them as a clear list.
203+
204+
IMPORTANT: Do NOT fix anything automatically. Only identify and list the issues, then ask the user which ones (if any) they'd like you to address.`
203205
},
204206
},
205207
{

internal/graph/schema.resolvers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2989,8 +2989,8 @@ func TestExecuteAgentAction(t *testing.T) {
29892989
t.Fatal("expected session to exist")
29902990
}
29912991
lastMsg := session.Messages[len(session.Messages)-1]
2992-
if lastMsg.Content != "Ask a subagent for a thorough code review." {
2993-
t.Fatalf("expected review prompt, got: %s", lastMsg.Content)
2992+
if !strings.Contains(lastMsg.Content, "Do NOT fix anything automatically") {
2993+
t.Fatalf("expected review prompt with no-auto-fix instruction, got: %s", lastMsg.Content)
29942994
}
29952995
})
29962996

0 commit comments

Comments
 (0)