agent: Allow clicking on the whole edit file row to trigger review (#34041)
Just a small quality-of-life type of PR that makes clicking anywhere until the "Review" button trigger the action that that button triggers (i.e., opens the review multibuffer). <img src="https://github.com/user-attachments/assets/8936ed75-50fd-49f9-89ef-b6c4301a8eba" width="600" /> Release Notes: - agent: Added the ability to click the whole file row in the edits bar to trigger the review multibuffer.
This commit is contained in:
parent
211d6205b9
commit
02d0e725a8
1 changed files with 11 additions and 4 deletions
|
@ -1160,7 +1160,7 @@ impl MessageEditor {
|
||||||
})
|
})
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.id("file-name")
|
.id(("file-name", index))
|
||||||
.pr_8()
|
.pr_8()
|
||||||
.gap_1p5()
|
.gap_1p5()
|
||||||
.max_w_full()
|
.max_w_full()
|
||||||
|
@ -1171,9 +1171,16 @@ impl MessageEditor {
|
||||||
.gap_0p5()
|
.gap_0p5()
|
||||||
.children(file_name)
|
.children(file_name)
|
||||||
.children(file_path),
|
.children(file_path),
|
||||||
), // TODO: Implement line diff
|
)
|
||||||
// .child(Label::new("+").color(Color::Created))
|
.on_click({
|
||||||
// .child(Label::new("-").color(Color::Deleted)),
|
let buffer = buffer.clone();
|
||||||
|
cx.listener(move |this, _, window, cx| {
|
||||||
|
this.handle_file_click(buffer.clone(), window, cx);
|
||||||
|
})
|
||||||
|
}), // TODO: Implement line diff
|
||||||
|
// .child(Label::new("+").color(Color::Created))
|
||||||
|
// .child(Label::new("-").color(Color::Deleted)),
|
||||||
|
//
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue