前端 SDK 导出:resolveAgentDetailAction – useThemeService
本页由当前 SDK 声明自动生成。 导入入口:@woohaa3/frontend/extension-api。
resolveAgentDetailAction · resolvePublicUrl · scriptModelPreparation · setEditorFromTokenString · shadow · space · theme · toLogicalAppPath · uploadedNodeType · useAppTheme · useDialogSurfaceContext · useOptionalAppTheme · useOptionalUiContext · usePortalContainer · usePortalContainerFor · useThemeService
resolveAgentDetailAction
由权威状态派生详情入口。
hasConversation 为 false(首次、尚无任何既往会话)时返回 null:不制造空记录,
用户仍可从提示词/模型/生成主操作启动。
export function resolveAgentDetailAction(input: { status: AgentDetailStatus; hasConversation: boolean; }): AgentDetailAction | null;关联类型:AgentDetailStatus · AgentDetailAction
resolvePublicUrl
逻辑路径 → 公开 URL 路径(加一次挂载前缀)。
export function resolvePublicUrl(logicalPath: string): string;scriptModelPreparation
export const scriptModelPreparation: NodeModelPreparation;关联类型:NodeModelPreparation
成员说明:
reportsStatus:Whether the outcome becomes canonical model-script status (modelScriptStatus). Presentation-only resources — such as a group’s own appearance — passfalse: they are never model tasks and must not write task state into nodeData.
setEditorFromTokenString
export function setEditorFromTokenString(editor: LexicalEditor, value: string): void;shadow
export const shadow: { readonly panel: "0 6px 22px var(--app-web-shadow)"; readonly card: "0 3px 10px var(--app-web-shadow)"; };space
export const space: { readonly xs: "6px"; readonly sm: "10px"; readonly md: "16px"; readonly lg: "26px"; };theme
export const theme: { readonly color: { readonly panel: "var(--app-web-panel)"; readonly surface: "var(--app-web-surface)"; readonly surfaceHover: "var(--app-web-elevated)"; readonly chip: "var(--app-web-panel)"; readonly accent: "var(--app-interaction-accent)"; readonly accentWarm: "var(--app-status-danger)"; readonly text: "var(--app-web-text-primary)"; readonly textMuted: "var(--app-web-text-muted)"; readonly textFaint: "var(--app-web-text-muted)"; readonly border: "var(--app-web-border)"; readonly borderStrong: "var(--app-web-border-strong)"; readonly backdrop: "var(--app-web-backdrop)"; }; readonly radius: { readonly panel: "22px"; readonly page: "26px"; readonly card: "14px"; readonly chip: "22px"; }; readonly shadow: { readonly panel: "0 6px 22px var(--app-web-shadow)"; readonly card: "0 3px 10px var(--app-web-shadow)"; }; readonly space: { readonly xs: "6px"; readonly sm: "10px"; readonly md: "16px"; readonly lg: "26px"; }; readonly font: { readonly family: "\"Noto Sans SC\", \"Noto Sans\", system-ui, -apple-system, \"Segoe UI\", sans-serif"; readonly sizeSm: "13px"; readonly sizeBase: "16px"; readonly sizeLg: "18px"; readonly sizeTitle: "22px"; }; };toLogicalAppPath
公开 pathname → 应用逻辑 pathname;不在挂载内返回参数原样(路由只处理挂载内请求)。
export function toLogicalAppPath(pathname: string): string;uploadedNodeType
文件 → 规范节点类型;不支持的类型返回 null。
image/video/audio/text 与节点类型同名;.glb 上传映射为普通 model3d
。
export function uploadedNodeType(file: UploadFile): string | null;关联类型:UploadFile
useAppTheme
读取当前主题 snapshot(必须位于 ThemeProvider 内)。
export function useAppTheme(): AppThemeSnapshot;关联类型:AppThemeSnapshot
useDialogSurfaceContext
从 Host context 读取模态策略(standalone 时返回 null)。
export function useDialogSurfaceContext(): DialogSurfaceContextValue | null;关联类型:DialogSurfaceContextValue
useOptionalAppTheme
可选读取:不在 Provider 内时返回 null(组件可脱离主题独立渲染)。
export function useOptionalAppTheme(): AppThemeSnapshot | null;关联类型:AppThemeSnapshot
useOptionalUiContext
读取 UiProvider context(可选:未挂载时返回 null,primitive 回退到 document.body)。
export function useOptionalUiContext(): UiContextValue | null;关联类型:UiContextValue
usePortalContainer
读取 portal container(不强制要求 Provider;缺失时返回 null)。
export function usePortalContainer(): HTMLElement | null;usePortalContainerFor
派生某层级的 portal container(当前实现共享同一 root,保留扩展点)。
export function usePortalContainerFor(_layer: PortalLayer): HTMLElement | null;关联类型:PortalLayer
useThemeService
读取主题 Service(showcase / 主题切换 UI 用)。
export function useThemeService<T extends ThemeSource = ThemeSource>(): T;关联类型:ThemeSource