Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion herdr-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ id = "martinro.next-agent"
name = "Next Agent"
version = "0.1.0"
min_herdr_version = "0.7.0"
platforms = ["linux"]
platforms = ["linux", "macos"]

[[actions]]
id = "jump"
Expand Down
4 changes: 2 additions & 2 deletions next_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def main():

ranked = sorted(
(a for a in agents if a.get("agent_status") in priority),
key=lambda a: (priority.index(a["agent_status"]), a.get("terminal_id", "")),
key=lambda a: (priority.index(a["agent_status"]), a.get("pane_id", "")),
)
if not ranked:
# Best-effort toast so an empty queue is distinguishable from a broken keybinding.
Expand All @@ -100,7 +100,7 @@ def main():
target = ranked[(i + 1) % len(ranked)]
break

run_herdr("agent", "focus", target["terminal_id"])
run_herdr("agent", "focus", target["pane_id"])


if __name__ == "__main__":
Expand Down