Skip to content

Commit 02b1906

Browse files
committed
chore: cleaner solution for re-render console ui
1 parent 69dfefa commit 02b1906

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

AgentCrew/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.7.5"
1+
__version__ = "0.7.6"

AgentCrew/modules/console/console_ui.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,19 +289,13 @@ def _handle_terminal_resize(self, signum, frame):
289289
This function is called when the terminal window is resized.
290290
"""
291291
import os
292-
import sys
293292
import time
294293

295294
if self.input_handler.is_message_processing and self._is_resizing:
296295
return # Ignore resize during message processing
297296
self._is_resizing = True
298297
time.sleep(0.3) # brief pause to allow resize to complete
299-
300-
term_size = os.get_terminal_size()
301-
302-
for _ in range(term_size.lines + 20):
303-
sys.stdout.write("\x1b[1A") # cursor up one line
304-
sys.stdout.write("\x1b[2K") # delete the last line
298+
os.system("cls" if os.name == "nt" else "printf '\033c'")
305299
self.display_handlers.display_loaded_conversation(
306300
self.message_handler.streamline_messages, self.message_handler
307301
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentcrew-ai"
3-
version = "0.7.5"
3+
version = "0.7.6"
44
requires-python = ">=3.12"
55
classifiers = [
66
"Programming Language :: Python :: 3",

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)