INNER CODE UNIT · JavaScript

setMessage

Dsadd4/AgentFigureGallery · frontend/reference_gallery/app.js:34

function setMessage(text) {
  el.message.textContent = text || "";
}

async function api(path, options = {}) {
  const response = await fetch(path, {
    headers: { "Content-Type": "application/json" },
    ...options,
  });
  const payload = await response.json();
  if (!response.ok || payload.error) {
    throw new Error(payload.error || `Request failed: ${response.status}`);
  }
  return payload;
}

function activeSessionValue() {
  return el.sessionSelect.value || (state.session && state.session.session_json) || "";

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…