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 <noreply@anthropic.com> Co-authored-by: Olivier Chafik <ochafik@anthropic.com>
This commit is contained in:
parent
a9b96cd365
commit
9d8b705598
2 changed files with 2 additions and 2 deletions
|
|
@ -399,7 +399,7 @@ interface HostContext {
|
||||||
tool: Tool,
|
tool: Tool,
|
||||||
};
|
};
|
||||||
/** Current color theme preference */
|
/** Current color theme preference */
|
||||||
theme?: "light" | "dark" | "system";
|
theme?: "light" | "dark";
|
||||||
/** How the UI is currently displayed */
|
/** How the UI is currently displayed */
|
||||||
displayMode?: "inline" | "fullscreen" | "pip";
|
displayMode?: "inline" | "fullscreen" | "pip";
|
||||||
/** Display modes the host supports */
|
/** Display modes the host supports */
|
||||||
|
|
|
||||||
|
|
@ -501,7 +501,7 @@ export const McpUiHostContextSchema: z.ZodType<McpUiHostContext> = z.object({
|
||||||
tool: ToolSchema,
|
tool: ToolSchema,
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
theme: z.enum(["light", "dark", "system"]).optional(),
|
theme: z.enum(["light", "dark"]).optional(),
|
||||||
displayMode: z.enum(["inline", "fullscreen", "pip"]).optional(),
|
displayMode: z.enum(["inline", "fullscreen", "pip"]).optional(),
|
||||||
availableDisplayModes: z.array(z.string()).optional(),
|
availableDisplayModes: z.array(z.string()).optional(),
|
||||||
viewport: z
|
viewport: z
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue