Skip to content

Commit 85ebd33

Browse files
authored
Fix issue on dev with agent history menu not working. (#9656)
## Description <!-- Please remember to add your design buddy onto the PR for review, if it contains any UI changes! --> Fixes https://warpdev.slack.com/archives/C08KTPNQN65/p1777573039998779. The issue was that there were two views subscribing the up arrow event and both would handle it. Both the normal history menu and the cloud mode-only history menu would emit events in rapid succession. We now make sure that only one of the views ever fires off events, since only one history menu should be active at a time. ## Testing <!-- How did you test this change? What automated tests did you add? If you didn't add any new tests, what's your justification for not adding any? --> Before, hitting the up arrow in the agent conversation view would cause the buggy behavior Roland described: the first query would get inserted into the buffer and the history menu would appear to never open. Now, it WAI. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
1 parent f61ef1d commit 85ebd33

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎app/src/terminal/input.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,9 @@ impl Input {
26312631
});
26322632
if FeatureFlag::InlineHistoryMenu.is_enabled() {
26332633
ctx.subscribe_to_view(&inline_history_menu_view, |me, _, event, ctx| {
2634+
if me.is_cloud_mode_input_v2_composing(ctx) {
2635+
return;
2636+
}
26342637
me.handle_inline_history_menu_event(event, ctx);
26352638
});
26362639
}
@@ -2655,6 +2658,9 @@ impl Input {
26552658
});
26562659
if FeatureFlag::InlineHistoryMenu.is_enabled() {
26572660
ctx.subscribe_to_view(&view, |me, _, event, ctx| {
2661+
if !me.is_cloud_mode_input_v2_composing(ctx) {
2662+
return;
2663+
}
26582664
me.handle_inline_history_menu_event(event, ctx);
26592665
});
26602666
}

0 commit comments

Comments
 (0)