Skip to content

Commit 9d8b705

Browse files
antonpk1claudeochafik
authored
fix: remove "system" from theme options (#40)
The host should resolve "system" to either "light" or "dark" before passing the theme to the app. Apps only need to know the actual resolved theme value. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]> Co-authored-by: Olivier Chafik <[email protected]>
1 parent a9b96cd commit 9d8b705

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

specification/draft/apps.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ interface HostContext {
399399
tool: Tool,
400400
};
401401
/** Current color theme preference */
402-
theme?: "light" | "dark" | "system";
402+
theme?: "light" | "dark";
403403
/** How the UI is currently displayed */
404404
displayMode?: "inline" | "fullscreen" | "pip";
405405
/** Display modes the host supports */

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ export const McpUiHostContextSchema: z.ZodType<McpUiHostContext> = z.object({
501501
tool: ToolSchema,
502502
})
503503
.optional(),
504-
theme: z.enum(["light", "dark", "system"]).optional(),
504+
theme: z.enum(["light", "dark"]).optional(),
505505
displayMode: z.enum(["inline", "fullscreen", "pip"]).optional(),
506506
availableDisplayModes: z.array(z.string()).optional(),
507507
viewport: z

0 commit comments

Comments
 (0)