-
Notifications
You must be signed in to change notification settings - Fork 739
Python: DevUI Fix Serialization, Timestamp and Other Issues #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d workflows - Replace custom workflow events with OpenAI Responses API standard lifecycle events - Add AgentStartedEvent, AgentCompletedEvent, AgentFailedEvent for clean separation - Implement ExecutorActionItem for workflow executor tracking - Convert informational events to trace events to reduce noise - Update README mapper table with comprehensive event mappings - Maintain full backward compatibility with legacy events
…rrors - Fix tool call timestamps being overwritten on each render (microsoft#1483) - Add recursive Content serialization to handle ChatMessage and nested objects (microsoft#1548) - Implement proper MCP tool cleanup on server shutdown - Add timestamp field to function_result.complete events - Enhance credential and client resource cleanup Fixes microsoft#1483, microsoft#1548 Partial improvements for microsoft#1476
There was a problem hiding this 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 PR resolves several critical issues in the Python DevUI package related to event serialization, timestamp handling, and resource cleanup. The changes improve the reliability and correctness of the DevUI by fixing how tool call timestamps are displayed, handling nested Content objects from MCP tools, and ensuring proper cleanup of resources on server shutdown.
Key changes:
- Fixed timestamp handling to prevent overwriting on each render cycle
- Added recursive Content serialization for MCP tool results
- Implemented comprehensive resource cleanup for credentials and MCP tools
- Enhanced OpenAI event format support with proper lifecycle events
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/devui/tests/test_server.py |
Added comprehensive tests for credential and MCP tool cleanup functionality |
python/packages/devui/tests/test_mapper.py |
Added tests for Content serialization, lifecycle events, and proper OpenAI event hierarchy |
python/packages/devui/frontend/src/utils/workflow-utils.ts |
Updated to handle new standard OpenAI events alongside legacy workflow events |
python/packages/devui/frontend/src/types/openai.ts |
Added standard OpenAI lifecycle event types and flexible WorkflowItem interfaces |
python/packages/devui/frontend/src/types/index.ts |
Re-exported new event types and interfaces |
python/packages/devui/frontend/src/types/agent-framework.ts |
Updated input field type and removed deprecated input_data |
python/packages/devui/frontend/src/services/api.ts |
Simplified workflow request handling to use input field directly |
python/packages/devui/frontend/src/components/ui/markdown-renderer.tsx |
Simplified React imports |
python/packages/devui/frontend/src/components/layout/debug-panel.tsx |
Added stable timestamp extraction logic to prevent timestamp overwriting |
python/packages/devui/frontend/src/components/features/workflow/workflow-view.tsx |
Updated to handle standard OpenAI events for workflow tracking |
python/packages/devui/frontend/src/App.tsx |
Fixed backend URL display to show current value |
python/packages/devui/agent_framework_devui/ui/index.html |
Updated build artifact reference |
python/packages/devui/agent_framework_devui/models/_openai_custom.py |
Added agent lifecycle events and ExecutorActionItem types |
python/packages/devui/agent_framework_devui/models/__init__.py |
Exported new custom event types |
python/packages/devui/agent_framework_devui/_server.py |
Enhanced cleanup to handle credentials and MCP tools |
python/packages/devui/agent_framework_devui/_mapper.py |
Added recursive Content serialization and agent lifecycle event handling |
python/packages/devui/agent_framework_devui/_executor.py |
Added agent lifecycle event emission and simplified workflow input handling |
python/packages/devui/agent_framework_devui/_discovery.py |
Removed emoji from log messages |
python/packages/devui/README.md |
Updated documentation with MCP tools usage and improved event mapping table |
…t#1584) * refactor(devui): adopt standard OpenAI lifecycle events for agents and workflows - Replace custom workflow events with OpenAI Responses API standard lifecycle events - Add AgentStartedEvent, AgentCompletedEvent, AgentFailedEvent for clean separation - Implement ExecutorActionItem for workflow executor tracking - Convert informational events to trace events to reduce noise - Update README mapper table with comprehensive event mappings - Maintain full backward compatibility with legacy events * fix(devui): resolve timestamp overwriting and Content serialization errors - Fix tool call timestamps being overwritten on each render (microsoft#1483) - Add recursive Content serialization to handle ChatMessage and nested objects (microsoft#1548) - Implement proper MCP tool cleanup on server shutdown - Add timestamp field to function_result.complete events - Enhance credential and client resource cleanup Fixes microsoft#1483, microsoft#1548 Partial improvements for microsoft#1476
Motivation and Context
Resolve timestamp overwriting and Content serialization errors
Fixes #1483,
Fixes #1548
Partial improvements for #1476
Description
Contribution Checklist