Skip to content

refactor: remove obsolete support and fix response#1382

Merged
zerob13 merged 3 commits intodevfrom
codex/drop-mcpui
Mar 23, 2026
Merged

refactor: remove obsolete support and fix response#1382
zerob13 merged 3 commits intodevfrom
codex/drop-mcpui

Conversation

@zerob13
Copy link
Copy Markdown
Collaborator

@zerob13 zerob13 commented Mar 23, 2026

fix #1381
drop mcp-ui

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated specifications to clarify feature support status and scope adjustments
  • Chores

    • Updated OpenAI library to the latest version
    • Removed unused development dependencies

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Removes MCP UI resource support throughout the application by deleting the associated component, removing type definitions, updating exporters, cleaning up translations, removing imports, and upgrading the OpenAI client library. Also enhances assistant message content handling in the LLM provider.

Changes

Cohort / File(s) Summary
Documentation & Specifications
docs/specs/new-agent/v2-spec.md, docs/specs/tool-output-guardrails/spec.md
Updated specs to clarify that MCP UI resource exploration is no longer supported; narrowed scope of non-goals statements to remove MCP UI references.
Type Definitions
src/shared/chat.d.ts, src/shared/types/core/chat.ts, src/renderer/src/components/chat/messageListItems.ts
Removed 'mcp_ui_resource' block type and associated mcp_ui_resource property from AssistantMessageBlock type definitions across multiple definition files.
Components & Templates
src/renderer/src/components/message/MessageBlockMcpUi.vue, src/renderer/src/components/message/MessageItemAssistant.vue
Deleted entire MCP UI resource renderer component; removed conditional rendering branch and import from parent message component.
Export Formatters
src/main/presenter/exporter/formats/conversationExporter.ts, src/main/presenter/exporter/formats/nowledgeMemExporter.ts
Removed handling for mcp_ui_resource blocks in markdown, HTML, and text export paths; blocks are now ignored during serialization.
LLM Provider
src/main/presenter/llmProviderPresenter/providers/openAIResponsesProvider.ts
Added flattenAssistantContent() helper method to flatten assistant message content into single text strings for API requests; updated formatMessages to handle assistant messages differently.
Internationalization
src/renderer/src/i18n/*/chat.json (12 languages: da-DK, en-US, fa-IR, fr-FR, he-IL, ja-JP, ko-KR, pt-BR, ru-RU, zh-CN, zh-HK, zh-TW)
Removed mcpUi translation namespace (including title, badge, expand, collapse keys) from all language locale files.
Module Imports
src/renderer/src/main.ts
Removed side-effect import of @mcp-ui/client/ui-resource-renderer.wc.js custom element registration.
Test Suites
test/renderer/components/message/MessageBlockMedia.test.ts, test/renderer/components/message/MessageItemAssistant.test.ts
Removed MCP UI test cases and mocks; updated component stubs configuration by removing MessageBlockMcpUi.
Test Coverage
test/main/presenter/llmProviderPresenter/openAIResponsesProvider.test.ts
Added two new test cases verifying assistant message content flattening into plain text strings and omission of unsupported content parts in API payloads.
Dependencies
package.json
Upgraded openai from ^5.23.2 to ^6.32.0; removed dev dependency @mcp-ui/client (^5.13.3).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • feat: add support for mcp ui #1120: Directly reverses MCP UI support introduction—this PR removes the same types, component, exporter handling, i18n strings, and ui-resource-renderer import that were added there.
  • fix: align responses ids and text handling #1310: Both modify openAIResponsesProvider.ts message formatting logic, specifically how assistant message content is serialized into API request payloads.
  • refactor: remove legacy code #1351: Both affect the MCP UI message-block surface—this PR removes MessageBlockMcpUi component and mcp_ui_resource type support that were introduced there.

Poem

🐰 Hop away, dear MCP UI!
We've tidied types, removed the sky,
Components gone, translations freed,
Simplicity is what we need.
Fresh OpenAI, messages flat—
A cleaner code, and that is that!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title is vague and incomplete. It mentions 'remove obsolete support' and 'fix response' but lacks specifics about what is being removed or what response fix is being made. Clarify the title by specifying what is being removed (e.g., 'refactor: remove MCP-UI support and fix OpenAI response serialization') to make it immediately clear to reviewers.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR addresses issue #1381 by fixing the OpenAI response serialization for assistant messages and removing MCP-UI support. The changes include serialization fixes in openAIResponsesProvider.ts and removal of MCP-UI-related code throughout the codebase, which aligns with the bug report about malformed response payloads.
Out of Scope Changes check ✅ Passed The PR includes comprehensive removal of MCP-UI support (components, types, translations, imports) and updates the OpenAI dependency from ^5.23.2 to ^6.32.0. The MCP-UI removals are scoped to deprecating that feature, and the OpenAI update supports the response serialization fix, both aligning with issue #1381's requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/drop-mcpui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6554a4db32

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@zerob13 zerob13 merged commit 5ff0cb0 into dev Mar 23, 2026
2 of 3 checks passed
@zerob13 zerob13 deleted the codex/drop-mcpui branch March 29, 2026 05:41
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.

[BUG] 配置本地模型responses格式报错

1 participant