Skip to content

Commit 9230218

Browse files
committed
fix desc
1 parent b01c3b9 commit 9230218

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • 36-vanilla-agent-dashboard-widgets/vanilla_agent_dashboard_widgets

36-vanilla-agent-dashboard-widgets/vanilla_agent_dashboard_widgets/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ def format_widget(w):
5858
msg += "| Field | Value |\n"
5959
msg += "|-------|-------|\n"
6060
msg += f"| Name | {w.name or 'N/A'} |\n"
61-
msg += f"| Description | {w.description or 'N/A'} |\n"
61+
# Clean up description - replace newlines with spaces
62+
description = str(w.description or 'N/A')
63+
description = description.replace('\n', ' ').replace(' ', ' ').strip()
64+
if len(description) > 150:
65+
description = description[:147] + '...'
66+
msg += f"| Description | {description} |\n"
6267
msg += f"| ID | {w.widget_id or 'N/A'} |\n"
6368
msg += f"| Category | {getattr(w, 'category', 'N/A') or 'N/A'} |\n"
6469
msg += f"| UUID | {getattr(w, 'uuid', 'N/A') or 'N/A'} |\n\n"

0 commit comments

Comments
 (0)