Skip to content

Commit 984a829

Browse files
committed
refactor(console_ui.py): simplify file display logic by using join method for better readability and performance
1 parent 2fb2b36 commit 984a829

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

AgentCrew/modules/chat/console_ui.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,16 +1197,9 @@ def _display_added_files(self):
11971197
return
11981198

11991199
file_display = Text("📎 Added files: ", style=RICH_STYLE_FILE_ACCENT_BOLD)
1200-
for i, file_path in enumerate(self._added_files):
1201-
if i > 0:
1202-
file_display.append(", ", style=RICH_STYLE_FILE_PATH)
1203-
if ' ' in file_path:
1204-
file_display.append(f'"{file_path}"', style=RICH_STYLE_FILE_PATH)
1205-
else:
1206-
file_display.append(file_path, style=RICH_STYLE_FILE_PATH)
1200+
file_display.append(f"{', '.join(self._added_files)}", style=RICH_STYLE_FILE_PATH)
12071201

12081202
self.console.print(file_display)
1209-
print()
12101203

12111204
def print_welcome_message(self):
12121205
"""Print the welcome message for the chat."""

0 commit comments

Comments
 (0)