推进 INI 面板 workflow overview embedding mount render state
This commit is contained in:
@@ -167,6 +167,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
|
||||
"renderWorkflowOverviewEmbeddingState",
|
||||
"mountWorkflowOverviewEmbeddingState",
|
||||
"getWorkflowOverviewEmbeddingMountDisplayViewModel",
|
||||
"getWorkflowOverviewEmbeddingMountRenderState",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -2193,6 +2194,38 @@ export function createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewMode
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellWorkflowOverviewEmbeddingMountRenderState(
|
||||
displayViewModel = createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel(),
|
||||
) {
|
||||
const rows = Array.isArray(displayViewModel?.rows)
|
||||
? displayViewModel.rows.map(({ id, label, value }) => ({
|
||||
id,
|
||||
label,
|
||||
value: value == null ? "" : String(value),
|
||||
}))
|
||||
: [];
|
||||
const ready = displayViewModel?.phase === "ready" && displayViewModel?.statusText === "Ready";
|
||||
const statusText = displayViewModel?.statusText ?? (ready ? "Ready" : "Blocked");
|
||||
const detailText = displayViewModel?.detailText ?? "No blocking reasons";
|
||||
|
||||
return {
|
||||
apiName: "ini-panel-shell-workflow-overview-embedding-mount-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
title: displayViewModel?.title ?? "Workflow overview embedding mount",
|
||||
statusText,
|
||||
detailText,
|
||||
statusLine: `${statusText}: ${detailText}`,
|
||||
rows,
|
||||
dataset: {
|
||||
handoffPhase: ready ? "ready" : "blocked",
|
||||
handoffReady: ready ? "true" : "false",
|
||||
handoffScope: "workflow-overview-embedding-mount",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
||||
const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries);
|
||||
const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest);
|
||||
@@ -2360,6 +2393,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
mountWorkflowOverviewEmbeddingState: mountIniPanelShellWorkflowOverviewEmbeddingState,
|
||||
createWorkflowOverviewEmbeddingMountDisplayViewModel:
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
|
||||
createWorkflowOverviewEmbeddingMountRenderState:
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
|
||||
isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage,
|
||||
controlPage: {
|
||||
browserApiSchema: createControlPageBrowserApiSchema(),
|
||||
|
||||
Reference in New Issue
Block a user