ag-ui-protocol / ag-ui-protocol/ag-ui

[Feature]: Allow MCP Apps to inherit or override the host application theme

オープン
#2,030 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
15.9k
フォーク
1.4k
平均マージ
1日 17時間
マージ済み PR(30日)
163

説明

### Pre-flight Checklist

- [x] I have searched existing issues and this hasn't been requested yet.

### Problem or Motivation

[MCPAppsActivityRenderer](https://github.com/CopilotKit/CopilotKit/blob/c45f3ce63a3bf1b74321991b911112c3a9096b31/packages/react-core/src/v2/components/MCPAppsActivityRenderer.tsx#L519) appears to send a `ui/initialize` message to sandboxed MCP App iframes with the theme hardcoded to "light".

Because of this, MCP Apps do not seem to have a way to inherit the active theme from the host application or from CopilotKit's provider/context. Applications that support dark mode end up rendering MCP Apps with a light theme, resulting in a visually inconsistent experience.

If there is already a supported mechanism for this, I may have missed it and would appreciate clarification.

### Proposed Solution

Allow MCP Apps to receive the host application's active theme instead of always receiving "light".

Possible implementations:

- Read the current theme from CopilotKit context/provider state and include that value in the `ui/initialize` message.
- Add a `theme` prop to `MCPAppsActivityRenderer`.
- Add a configuration option that allows overriding the theme sent during initialization.
- Maintain backwards compatibility by defaulting to "light" when no theme is provided.

This would allow MCP Apps to match the rest of the application's appearance while preserving existing behavior for current users.

### Alternatives Considered

_No response_

### Additional Context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。