aboutsummaryrefslogtreecommitdiff
path: root/src/app/input/mouse.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-17 16:08:43 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-17 16:08:43 +0300
commit54490254f70469cd154ee630bc4bec84da178f0c (patch)
tree450bf0397398b28932f636d33e37f73c011dd19d /src/app/input/mouse.rs
parentd998753efe506a04c80306795efc72bff60bb0ec (diff)
feat: sort agent panel by priority
refs #318
Diffstat (limited to 'src/app/input/mouse.rs')
-rw-r--r--src/app/input/mouse.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app/input/mouse.rs b/src/app/input/mouse.rs
index 2e2a94aa..41bb5267 100644
--- a/src/app/input/mouse.rs
+++ b/src/app/input/mouse.rs
@@ -5,7 +5,7 @@ use tracing::warn;
use crate::{
app::state::{
- AgentPanelScope, AppState, ContextMenuKind, ContextMenuState, DragState, DragTarget,
+ AgentPanelSort, AppState, ContextMenuKind, ContextMenuState, DragState, DragTarget,
MenuListState, Mode, RightClickPassthroughGesture, TabPressState, ViewLayout,
WorkspacePressState,
},
@@ -540,10 +540,10 @@ impl AppState {
return None;
}
- if self.on_agent_panel_scope_toggle(mouse.column, mouse.row) {
- self.agent_panel_scope = match self.agent_panel_scope {
- AgentPanelScope::CurrentWorkspace => AgentPanelScope::AllWorkspaces,
- AgentPanelScope::AllWorkspaces => AgentPanelScope::CurrentWorkspace,
+ if self.on_agent_panel_sort_toggle(mouse.column, mouse.row) {
+ self.agent_panel_sort = match self.agent_panel_sort {
+ AgentPanelSort::Spaces => AgentPanelSort::Priority,
+ AgentPanelSort::Priority => AgentPanelSort::Spaces,
};
self.agent_panel_scroll = 0;
self.mark_session_dirty();