推进 INI 面板 shell handoff readonly status workflow helper

This commit is contained in:
2026-06-15 13:48:36 +08:00
parent c3d9b90de1
commit 859d01356b
9 changed files with 228 additions and 4 deletions

View File

@@ -90,6 +90,7 @@ TOOL_TABLE = browser-shell-tool.tbl
!launchApi?.renderShellSessionHandoffMountState ||
!launchApi?.mountShellSessionHandoff ||
!launchApi?.mountShellSessionHandoffFromControlPage ||
!launchApi?.readShellSessionHandoffStatusFromControlPage ||
!launchApi?.isSupportedShellSessionHandoffPackage
) {
throw new Error("launch API namespace did not expose shell integration helpers");
@@ -353,11 +354,26 @@ TOOL_TABLE = browser-shell-tool.tbl
);
const readonlyStatus = controlPageApi[handoffSummary.handoffMethods.readStatus]();
const readonlyStatusResult = launchApi.readShellSessionHandoffStatusFromControlPage({
controlPageApi,
});
assertEqual(readonlyStatusResult.phase, "ready", "shell handoff readonly status result phase");
assertEqual(readonlyStatusResult.ready, true, "shell handoff readonly status result readiness");
assertEqual(
readonlyStatusResult.missingStatusFields.join(","),
"",
"shell handoff readonly status missing fields",
);
assertEqual(
readonlyStatus.workflowStatus.lastAction,
"load-session",
"shell integration readonly workflow last action",
);
assertEqual(
readonlyStatusResult.readonlyStatus.workflowStatus.lastAction,
readonlyStatus.workflowStatus.lastAction,
"shell handoff readonly status result workflow last action",
);
assertEqual(
readonlyStatus.session.parameterFile,
"browser-shell-linuxcnc.var",