pub struct PreviewConfig {
pub mcp_url: String,
pub port: u16,
pub initial_tool: Option<String>,
pub theme: String,
pub locale: String,
pub widgets_dir: Option<PathBuf>,
pub mode: PreviewMode,
pub auth_header: Option<String>,
pub oauth_config: Option<OAuthPreviewConfig>,
}Expand description
Configuration for the preview server
Fields§
§mcp_url: StringURL of the target MCP server
port: u16Port for the preview server
initial_tool: Option<String>Initial tool to select
theme: StringInitial theme (light/dark)
locale: StringInitial locale
widgets_dir: Option<PathBuf>Optional directory containing widget .html files for file-based authoring.
When set, the preview server reads widget HTML directly from disk on each
request (hot-reload without file watchers). Widgets are discovered by
scanning this directory for .html files and mapping each to a
ui://app/{stem} resource URI.
mode: PreviewModePreview mode (standard or chatgpt)
auth_header: Option<String>Optional Authorization header value for authenticated MCP servers.
When set, the proxy attaches this header to every outbound request to the target MCP server.
oauth_config: Option<OAuthPreviewConfig>OAuth configuration for browser-based PKCE flow (None = no browser OAuth).
Trait Implementations§
Source§impl Clone for PreviewConfig
impl Clone for PreviewConfig
Source§fn clone(&self) -> PreviewConfig
fn clone(&self) -> PreviewConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreviewConfig
impl Debug for PreviewConfig
Auto Trait Implementations§
impl Freeze for PreviewConfig
impl RefUnwindSafe for PreviewConfig
impl Send for PreviewConfig
impl Sync for PreviewConfig
impl Unpin for PreviewConfig
impl UnsafeUnpin for PreviewConfig
impl UnwindSafe for PreviewConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more