Skip to content

ScenarioUI

场景 UI 配置,定义布局、面板、菜单和状态栏。

typescript
interface ScenarioUI {
  layout: UILayout
  panels: PanelDescriptor[]
  sidebarItems: SidebarItem[]
  statusBarItems: StatusBarItem[]
  defaultSidePanel?: string
  welcomeMessage?: string
  welcomeMessageZh?: string
  showSidebar?: boolean
}

interface PanelDescriptor {
  id: string
  component: string
  region: 'primary' | 'secondary' | 'auxiliary' | 'bottom' | 'overlay'
  defaultVisible: boolean
  resizable: boolean
  minWidth?: number
  maxWidth?: number
  minHeight?: number
  maxHeight?: number
}

interface SidebarItem {
  id: string
  icon: string
  label: string
  labelZh: string
  component: string
  position: number
  /** 宽屏模式:设为 true 时面板占据主内容区,侧边栏自动收起 */
  wideMode?: boolean
}

interface StatusBarItem {
  id: string
  icon: string
  label: string
  labelZh: string
  position: number
}

详见 左侧菜单配置

AweeClaw AI 应用构建平台