Skip to content

Commit 7439081

Browse files
committed
chore: made the conversation list items dynamic
1 parent 61c3363 commit 7439081

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

AgentCrew/modules/console/conversation_browser/browser_ui.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ def __init__(
4141
self.conversations: List[Dict[str, Any]] = []
4242
self.selected_index = 0
4343
self.scroll_offset = 0
44-
self.max_list_items = 50
4544
self._get_conversation_history = get_conversation_history
4645
self._preview_cache: Dict[str, Tuple[List[Dict[str, Any]], int]] = {}
4746
self.selected_items: set[int] = set()
4847
self._live: Optional[Live] = None
4948
self._layout: Optional[Layout] = None
5049

50+
@property
51+
def max_list_items(self) -> int:
52+
return self.console.height - 9
53+
5154
def set_conversations(self, conversations: List[Dict[str, Any]]):
5255
"""Set the conversations list to browse."""
5356
self.conversations = conversations

0 commit comments

Comments
 (0)