SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix(inspector-cli): Get scrolling to work
Kilian Lieret58e1bb828cde
diff --git a/sweagent/run/inspector_cli.py b/sweagent/run/inspector_cli.pyindex 078296ee..b1534b4c 100644--- a/sweagent/run/inspector_cli.py+++ b/sweagent/run/inspector_cli.py@@ -5,8 +5,7 @@ import yamlfrom rich.syntax import Syntaxfrom textual.app import App, ComposeResultfrom textual.binding import Binding-from textual.containers import Container-from textual.scroll_view import ScrollView+from textual.containers import Container, VerticalScrollfrom textual.widgets import Footer, Header, Static@@ -18,7 +17,7 @@ class TrajectoryViewer(Static):self.show_full = False # Toggle for view modedef compose(self) -> ComposeResult:- with ScrollView():+ with VerticalScroll():yield Static(id="content")def on_mount(self) -> None:@@ -60,14 +59,6 @@ class TrajectoryViewer(Static):self.current_index -= 1self.update_content()- def scroll_down(self) -> None:- scroll_view = self.query_one(ScrollView)- scroll_view.scroll_down(animate=False)-- def scroll_up(self) -> None:- scroll_view = self.query_one(ScrollView)- scroll_view.scroll_up(animate=False)-class TrajectoryInspectorApp(App):CSS = """@@ -93,8 +84,6 @@ class TrajectoryInspectorApp(App):Binding("right,l", "next_item", "Next item"),Binding("left,h", "previous_item", "Previous item"),Binding("v", "toggle_view", "Toggle view"),- Binding("j,down", "scroll_d", "Scroll down"),- Binding("k,up", "scroll_u", "Scroll up"),]def __init__(self, trajectory_path: str):@@ -122,14 +111,6 @@ class TrajectoryInspectorApp(App):def action_toggle_view(self) -> None:self.query_one(TrajectoryViewer).toggle_view()- def action_scroll_d(self) -> None:- viewer = self.query_one(TrajectoryViewer)- viewer.scroll_down()-- def action_scroll_u(self) -> None:- viewer = self.query_one(TrajectoryViewer)- viewer.scroll_up()-def main(args: list[str] | None = None):parser = argparse.ArgumentParser(description="Inspect trajectory JSON files")