Update Python tools

This commit is contained in:
ajp_anton
2026-08-09 18:26:25 +00:00
parent 9c0ce2098f
commit 58b4f69d63
3 changed files with 19 additions and 7 deletions
+11 -3
View File
@@ -1,21 +1,29 @@
const output = document.querySelector("#run-output");
if (output) {
let refreshTimer;
const refresh = async () => {
const response = await fetch(output.dataset.outputUrl, { cache: "no-store" });
if (response.ok) {
output.textContent = (await response.json()).output;
const nextOutput = (await response.json()).output;
if (nextOutput !== output.textContent) {
output.textContent = nextOutput;
}
}
const status = document.querySelector("#run-status");
if (status) {
const stateResponse = await fetch(status.dataset.stateUrl, { cache: "no-store" });
if (stateResponse.ok) {
status.textContent = (await stateResponse.json()).status;
const state = await stateResponse.json();
status.textContent = state.status;
if (state.status !== "queued" && state.status !== "running") {
window.clearInterval(refreshTimer);
}
}
}
};
refresh();
window.setInterval(refresh, 2000);
refreshTimer = window.setInterval(refresh, 2000);
}
const refreshArtifacts = async (container) => {