推进 INI 面板 workflow overview embedding display view-model

This commit is contained in:
2026-06-15 18:06:33 +08:00
parent 7095690869
commit 4fdbadd60c
12 changed files with 189 additions and 10 deletions

View File

@@ -160,6 +160,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
"getWorkflowOverviewReadiness",
"mountWorkflowOverviewEmbedding",
"getWorkflowOverviewEmbeddingReport",
"getWorkflowOverviewEmbeddingDisplayViewModel",
"isSupportedShellSessionHandoffPackage",
"getLauncherLinks",
"getControlPageApiMethods",
@@ -1888,6 +1889,26 @@ export function createIniPanelShellWorkflowOverviewEmbeddingReport(
};
}
export function createIniPanelShellWorkflowOverviewEmbeddingDisplayViewModel(
report = createIniPanelShellWorkflowOverviewEmbeddingReport(),
) {
const blockingReasons = Array.isArray(report?.blockingReasons) ? report.blockingReasons : [];
const rows = Array.isArray(report?.rows)
? report.rows.map(({ id, label, value }) => ({
id,
label,
value: value == null ? "" : String(value),
}))
: [];
return {
phase: report?.phase === "ready" ? "ready" : "blocked",
title: "Workflow overview embedding",
statusText: report?.ready ? "Ready" : "Blocked",
detailText: blockingReasons.length === 0 ? "No blocking reasons" : blockingReasons.join(", "),
rows,
};
}
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries);
const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest);
@@ -2047,6 +2068,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
createWorkflowOverviewReadiness: createIniPanelShellWorkflowOverviewReadiness,
mountWorkflowOverviewEmbedding: mountIniPanelShellWorkflowOverviewEmbedding,
createWorkflowOverviewEmbeddingReport: createIniPanelShellWorkflowOverviewEmbeddingReport,
createWorkflowOverviewEmbeddingDisplayViewModel: createIniPanelShellWorkflowOverviewEmbeddingDisplayViewModel,
isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage,
controlPage: {
browserApiSchema: createControlPageBrowserApiSchema(),