推进 INI 面板运行快照上下文日志
This commit is contained in:
@@ -341,6 +341,15 @@ function sessionMetadataLogLines(metadata = {}) {
|
||||
];
|
||||
}
|
||||
|
||||
function runSessionContextLogLines(program, snapshot = restoredSessionSnapshot) {
|
||||
return [
|
||||
`Program: ${program.opfsPath} -> ${program.wasmPath}`,
|
||||
`Program source: ${program.source}`,
|
||||
`Snapshot: ${snapshot ? sessionSnapshotLabel(snapshot.sessionId) : "-"}`,
|
||||
...sessionMetadataLogLines(snapshot?.metadata),
|
||||
];
|
||||
}
|
||||
|
||||
async function loadSelectedGcodeProgram() {
|
||||
const opfsPath = restoredSessionSnapshot?.payload?.files?.gcode;
|
||||
let filename = UI_SESSION.defaultGcodeFilename;
|
||||
@@ -628,8 +637,7 @@ document.getElementById("run-gcode").addEventListener("click", async () => {
|
||||
setLog(
|
||||
[
|
||||
"Ran G-code through LinuxCNC interpreter WASM.",
|
||||
`Program: ${program.opfsPath} -> ${program.wasmPath}`,
|
||||
`Program source: ${program.source}`,
|
||||
...runSessionContextLogLines(program),
|
||||
`INI: ${loadedSession.ini.wasmPath}`,
|
||||
result.trim(),
|
||||
].join("\n"),
|
||||
|
||||
Reference in New Issue
Block a user