Skip to content

Comments

Fix /help output centered instead of left-aligned#187

Open
StephaneDelcroix wants to merge 1 commit intomainfrom
fix/help-output-it-vertically-centered-not-l-20260223-0901
Open

Fix /help output centered instead of left-aligned#187
StephaneDelcroix wants to merge 1 commit intomainfrom
fix/help-output-it-vertically-centered-not-l-20260223-0901

Conversation

@StephaneDelcroix
Copy link
Collaborator

Problem

The /help command output was vertically centered (text-align: center, justify-content: center) because it renders as a system message. This made the list of commands hard to read.

Fix

Added a system-multiline CSS class that is conditionally applied when a system message contains markdown list items (\n-). This class overrides the centering with text-align: left and justify-content: flex-start, so structured list content like /help output is left-aligned while short one-liner system messages remain centered.

Changes

  • ChatMessageItem.razor: Conditionally add system-multiline class to system messages with list content
  • ChatMessageList.razor.css: Add CSS rules for .system-multiline in both default and minimal styles
  • ChatMessageTests.cs: Add tests verifying multiline detection for help vs short messages

System messages with list content (like /help output) were rendered with
text-align:center and justify-content:center, making the command list
hard to read. Added a 'system-multiline' CSS class that is conditionally
applied when the message content contains markdown list items (\n-),
which overrides to left-aligned text and flex-start justification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant