前端 SDK 导出:DiamondIcon – ExtensionAppPageEntry
本页由当前 SDK 声明自动生成。 导入入口:@woohaa3/frontend/extension-api。
DiamondIcon · DownloadIcon · DropdownMenu · DropdownMenuContent · DropdownMenuItem · DropdownMenuProps · DropdownMenuRoot · DropdownMenuTrigger · ElevationIcon · EllipseMarqueeIcon · EllipsisIcon · EraserIcon · ExecutionPanel · ExecutionPanelData · ExecutionPanelModelConfig · ExecutionPanelParameterField · ExecutionPanelProps · ExecutionPanelRunSnapshot · ExecutionPanelShell · ExecutionPanelStatus · ExecutionPanelSurface · ExecutionPanelTaskKind · ExpandIcon · ExtensionAppPageEntry
DiamondIcon
export const DiamondIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
DownloadIcon
下载。
export const DownloadIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
DropdownMenu
普通 trigger 下拉菜单(受控可选)。
export function DropdownMenu(props: DropdownMenuProps): React.JSX.Element;关联类型:DropdownMenuProps
DropdownMenuContent
export const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;DropdownMenuItem
普通菜单项(自定义内容):供 DropdownMenu children 模式使用。
export function DropdownMenuItem(props: { onSelect?: (event: Event) => void; disabled?: boolean; className?: string; children: ReactNode; }): React.JSX.Element;DropdownMenuProps
export type DropdownMenuProps = { trigger: ReactNode; items?: readonly MenuItem[]; children?: ReactNode; open?: boolean; onOpenChange?: (open: boolean) => void; side?: "top" | "right" | "bottom" | "left"; align?: "start" | "center" | "end"; sideOffset?: number; className?: string; label?: string; radioValue?: string; onRadioValueChange?: (value: string) => void;};关联类型:MenuItem
成员说明:
className:content 追加 class。label:content 可访问名。radioValue:子项为MenuRadioItem时传入当前值,content 会包一层 RadioGroup。
DropdownMenuRoot
受控下拉菜单的高级组合(供需要自定义 item 组合的消费者,例如含 label/hint 的模型选项)。
消费者仍从本模块导入,不直接依赖 @radix-ui/react-dropdown-menu。
export const DropdownMenuRoot: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;关联类型:DropdownMenuProps
DropdownMenuTrigger
export const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;ElevationIcon
export const ElevationIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
EllipseMarqueeIcon
export const EllipseMarqueeIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
EllipsisIcon
更多操作(省略号)。
export const EllipsisIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
EraserIcon
export const EraserIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
ExecutionPanel
export function ExecutionPanel({ taskKind, modelConfig, data, surface, runLabel, pendingLabel, showExpand, showModelSelector, modelSelectorSlot, showRun, showPolish, showFormatToolbar, onFormatCommand, presentation, width, skills, referencesSlot, statusSlot, promptEditorSlot, onRemoveVideoEditIntent, onOpenVideoEdit, onOpenVideoFrameCapture, videoEditDisabledReason, onOpenVideoEditIntent, videoEditEntryBlockedReason, onPromptSkill, blockingReasons, readOnly, allowEmptySubmit, onChange, onRun, onViewTask, agentDetailAction, onViewAgentDetail, onExpand, onCollapse, onClose, className, }: ExecutionPanelProps): React.JSX.Element;关联类型:ExecutionPanelProps
ExecutionPanelData
节点数据(面板读写的最小集合)。
export interface ExecutionPanelData { title?: string; panelPrompt?: string; taskStatus?: ExecutionPanelStatus; progress?: number; errorMessage?: string; parameters?: Record<string, unknown>; videoEditIntents?: ReadonlyArray<ExecutionPanelVideoEditIntent>;}关联类型:ExecutionPanelStatus · ExecutionPanelVideoEditIntent
成员说明:
videoEditIntents:video-edit 标签;仅 video-generation + parameters.generationMode === “edit_video” 时展示。
ExecutionPanelModelConfig
模型选项与参数模式。
export interface ExecutionPanelModelConfig { modelOptions: ReadonlyArray<{ value: string; label: string; detail?: string; provider?: string; sourceIdentity?: string; modelId?: string; }>; defaultModel: string; parameterSchemaByModel?: Record<string, ReadonlyArray<ExecutionPanelParameterField>>; defaultsByModel?: Record<string, Record<string, unknown>>;}关联类型:ExecutionPanelParameterField
ExecutionPanelParameterField
单个生成参数。
export interface ExecutionPanelParameterField extends GenerationParameterField {}成员说明:
schema:Original property schema, used for constraints beyond the basic control.
ExecutionPanelProps
export interface ExecutionPanelProps { modelSelectorSlot?: React.ReactNode; taskKind: ExecutionPanelTaskKind; modelConfig: ExecutionPanelModelConfig; data?: ExecutionPanelData; surface?: ExecutionPanelSurface; runLabel?: string; pendingLabel?: string; onViewTask?: () => void; agentDetailAction?: AgentDetailAction | null; onViewAgentDetail?: () => void; showExpand?: boolean; showModelSelector?: boolean; showRun?: boolean; showPolish?: boolean; showFormatToolbar?: boolean; onFormatCommand?: (command: ExecutionPanelFormatCommand) => void; presentation?: ExecutionPanelPresentation; width?: number; skills?: ReadonlyArray<ExecutionPanelSkill>; onPromptSkill?: (input: { id: string; label: string; prompt: string; }) => void | Promise<void>; referencesSlot?: React.ReactNode; statusSlot?: React.ReactNode; promptEditorSlot?: (args: { value: string; onChange: (next: string) => void; disabled: boolean; placeholder: string; onSubmit?: () => void; }) => React.ReactNode; onRemoveVideoEditIntent?: (id: string) => void; onOpenVideoEdit?: (intentId?: string) => void; onOpenVideoFrameCapture?: () => void; videoEditDisabledReason?: string; onOpenVideoEditIntent?: (id: string) => void; videoEditEntryBlockedReason?: string; blockingReasons?: ReadonlyArray<string>; readOnly?: boolean; allowEmptySubmit?: boolean; onChange?: (patch: Partial<ExecutionPanelData>) => void; onRun?: (snapshot: ExecutionPanelRunSnapshot) => void; onExpand?: () => void; onCollapse?: () => void; onClose?: () => void; className?: string;}关联类型:ExecutionPanelTaskKind · ExecutionPanelModelConfig · ExecutionPanelData · ExecutionPanelSurface · AgentDetailAction · ExecutionPanelFormatCommand · ExecutionPanelPresentation · ExecutionPanelSkill · ExecutionPanelRunSnapshot
成员说明:
taskKind:任务类型;决定可用技能与默认文案。modelConfig:模型与参数配置。data:受控数据。surface:所在面,默认canvas(节点内联编辑器)。runLabel:主操作文案;缺省按任务类型显示「生成图片」等。pendingLabel:主操作进行中文案,默认「生成中」。onViewTask:查看当前节点的任务;由宿主提供导航能力。agentDetailAction:Agent 对话详情的按状态入口。 由宿主根据权威回合状态派生(见agent-detail-action.ts);缺省不渲染。点击只打开详情, 不触发重试/生成/取消。首次无会话时传null,不制造空记录。onViewAgentDetail:点击 Agent 详情入口;由宿主切换到详情 route(只读打开)。showExpand:是否展示展开按钮。showModelSelector:是否展示面板内联的生成模型选择器;默认true。 Dock 面若由宿主提供独立的模型导航(ExecutionPanelModelNav),应关掉内联选择器, 避免与宿主重复。showRun:是否展示面板内联主操作(发送/执行);默认true。宿主把执行放到自有 action 区时关掉。showPolish:是否展示快捷改写入口。showFormatToolbar:展开态是否展示富文本格式工具栏。onFormatCommand:格式工具栏命令(展开态)。宿主可接到富文本编辑器;不传则为展示态。presentation:受控 presentation。compact为常规底部面板,expanded为大编辑态。组件不再持有本地 expanded 权威状态; expanded 的 fullscreen 宿主由调用方提供。width:面板宽度(canvas 面无固有宽度,查看页用它模拟节点盒)。skills:可用快捷改写技能;不传则用内置默认。onPromptSkill:快捷改写被选中时的回调。 生产站点由提示词工具插件承载改写;未装配工具插件时缺省显示「未接入」提示。 提供本回调后,面板把「所选 action + 当前草稿」交给宿主,不再显示缺省提示。 返回 Promise 时面板保持「改写中」直到 settle:成功关闭菜单,失败显示就地错误。referencesSlot:顶部参考区插槽(画布参考素材 chips)。statusSlot:内联状态槽:渲染在面板头部与提示词之间,由宿主持有运行状态(生成阶段/时长/取消)。 与内部taskStatus失败 chip 相互独立;提供时原样插入面板网格/分区布局。promptEditorSlot:结构化 prompt editor 插槽。 提供时替换缺省 textarea;契约与 textarea 相同(value/onChange/disabled/placeholder), 并接收面板的onSubmit以保持 Enter 生成、Shift+Enter 换行。onRemoveVideoEditIntent:删除视频编辑意图。onOpenVideoEdit:重开视频编辑 dialog。intentId提供时预选该编辑点,否则打开完整草稿。onOpenVideoFrameCapture:从edit_video面板打开视频截帧 dialog(任务 2.1)。videoEditDisabledReason:edit_video 编辑入口不可用的原因(缺视频/失效/只读/pending)。 非空时「编辑」入口禁用并展示该原因(design D9)。onOpenVideoEditIntent:打开视频编辑入口(edit_video模式的「打开编辑点」动作)。 传入回调才启用;videoEditEntryBlockedReason非空时入口禁用并显示该原因 (例如缺少 ready 的输入视频)。完整视频编辑 dialog 由canvas-video-workflow提供。videoEditEntryBlockedReason:edit_video入口被阻止的原因;非空时入口禁用并作为 title 解释。blockingReasons:阻止执行的原因(对齐源工程 identityBlockingReasons)。 非空时在主操作上方以网格整行展示,用role="status"宣告,并真正禁用主操作。readOnly:会话级只读(断线只读等)。 只读状态属于会话,不通过blockingReasons在面板里重复枚举(由左下角同步状态控件 的常驻 tooltip 承载);但仍必须真正禁用主操作与回车提交。allowEmptySubmit:提示词为空时仍允许回车提交。图片节点用它改走上游文字节点的内容。onChange:任意字段变更。onRun:主操作(执行生成)。回调本次提交的完整快照(prompt / model / parameters)。 BREAKING(仓库内部):由() => void改为携带快照 —— 宿主要求提交“用户当下看到的输入”, 而不是自己去 guess 面板内部状态。onExpand:展开为大编辑(受控;提交 expand intent)。onCollapse:收起回 compact(受控;提交 collapse intent)。onClose:关闭面板(受控;提交匹配 identity 的 close intent)。
ExecutionPanelRunSnapshot
主操作提交时回调的完整输入快照。
面板是纯 UI,不持有任务状态;宿主据此把「用户当下看到并确认的输入」提交给任务网关。
prompt 取自面板本地状态(不经过父组件回流),因此即使父组件尚未重渲染,
提交的也是用户当前输入的内容。
export interface ExecutionPanelRunSnapshot { prompt: string; model: string; parameters: Record<string, unknown>;}成员说明:
prompt:用户当前输入的提示词(原样,不 trim)。model:本次提交的模型 id(已解析过默认值)。parameters:本次提交的完整参数(一定包含model键)。
ExecutionPanelShell
与任务执行面板共享同一套 dock 宿主、边框、背景和阴影的自定义内容壳。
export function ExecutionPanelShell({ children, ariaLabel, className }: ExecutionPanelShellProps): React.JSX.Element;ExecutionPanelStatus
任务执行状态。
export type ExecutionPanelStatus = "idle" | "pending" | "processing" | "materializing" | "successed" | "failed";ExecutionPanelSurface
面板所在的面(对齐原工程 editor surface)。
export type ExecutionPanelSurface = "canvas" | "sidebar" | "dock";ExecutionPanelTaskKind
生成任务类型。
export type ExecutionPanelTaskKind = "text-generation" | "image-generation" | "video-generation" | "audio-generation" | "motion-generation";ExpandIcon
export const ExpandIcon: { ({ size, strokeWidth, absoluteStrokeWidth, ...rest }: UiIconProps): React.JSX.Element; displayName: string; };关联类型:UiIconProps
ExtensionAppPageEntry
一个扩展 app/page 前端贡献(可信入口/测试 fixture 的内存形状) 。
宿主 Router/page-scope 只认识 canvas 与通用 extension page:不在核心硬编码 业务扩展页面 分支。每个页面自带 page-scope plugin 工厂与纯查询编解码。
createPlugin 是无副作用工厂:宿主在目标 page scope 装配并拥有其 fiber 生命周期;
页面渲染由该 plugin 注册的 app.route contribution 承担。运行时 registry 也可由发布目录
纯 metadata(ExtensionAppPageMetadata + owner)构造,此时 createPlugin 缺省并由 descriptor
在挂载时补齐。
export type ExtensionAppPageEntry = ExtensionAppPageMetadata & { extensionId: string; decodeQuery?: (search: URLSearchParams) => ExtensionAppPageQuery; encodeQuery?: (query: ExtensionAppPageQuery) => URLSearchParams; createPlugin?: () => Plugin;};关联类型:ExtensionAppPageMetadata · ExtensionAppPageQuery · Plugin
成员说明:
pageId:稳定 pageId(宿主据此建立独立 page scope identity)。path:静态可信路径(必须/开头)。legacyRedirectPaths:可选旧路径受保护 redirect(如/task-history);宿主只 replace 到path。requiresAuth:所需认证等级下限。requiredActions:所需站点 action(如tasks.inspect);服务端仍独立重查。title:页面标题(诊断/导航展示)。extensionId:owner extensionId(可信静态清单)。decodeQuery:纯查询编解码:URLSearchParams → 规范化参数;未知/无效字段规范化,不读取资源。encodeQuery:纯查询编解码:规范化参数 → URLSearchParams。createPlugin:无副作用构造 page-scope plugin;缺省由 descriptor 在挂载时补齐。