Skip to content

Implement formatter#4

Merged
ArtyomVancyan merged 6 commits intomainfrom
implement-formatter
Feb 21, 2026
Merged

Implement formatter#4
ArtyomVancyan merged 6 commits intomainfrom
implement-formatter

Conversation

@ArtyomVancyan
Copy link
Member

  • Introduced a new Formatter class in langgraphics/formatter.py to provide standardized serialization and normalization of node inputs and outputs, replacing the previous ad-hoc message preview logic. This ensures consistent formatting and easier downstream consumption.
  • Updated langgraphics/streamer.py to use the new Formatter for serializing node inputs and outputs, removing the old preview and parse_message functions, and simplifying error handling.
  • Parse and display system, input, and output messages as structured objects, including rendering a message content as markdown using the new react-markdown dependency.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a new Formatter class to standardize serialization and normalization of node inputs and outputs in the langgraphics visualization tool. The PR replaces ad-hoc message preview logic with a more structured approach and adds markdown rendering capabilities for better UI presentation.

Changes:

  • Introduced Formatter class in langgraphics/formatter.py with methods for serializing and normalizing Run objects
  • Updated langgraphics/streamer.py to use the new Formatter instead of old preview and parse_message functions
  • Enhanced the web UI to parse and display messages as structured objects with markdown rendering using react-markdown

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
pyproject.toml Version bump from 0.1.0-beta.1 to 0.1.0-beta.2
langgraphics/formatter.py New file implementing Formatter class with serialization and normalization logic for different run types
langgraphics/streamer.py Refactored to use Formatter.inputs() and Formatter.outputs() methods, removing old helper functions
langgraphics-web/src/index.css Added new CSS variables and styling for tags, borders, and role-specific coloring; moved margin/padding rules
langgraphics-web/src/components/InspectPanel.tsx Added ReactMarkdown integration and structured parsing of system/input/output messages with role-based rendering
langgraphics-web/package.json Added react-markdown@^10.1.0 dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ArtyomVancyan ArtyomVancyan merged commit 4c628a1 into main Feb 21, 2026
20 checks passed
@ArtyomVancyan ArtyomVancyan deleted the implement-formatter branch February 21, 2026 22:56
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.

2 participants