Spaces:
Running
Running
v0.9.1: 'Works better on its own page' screen in the Space embed
Browse filesFiles changed (5)
- css/app.css+10
- index.html+10
- js/config.js+1-1
- js/main.js+8-1
- sw.js+1-1
717 unmodified lines718719720717 unmodified lines.hf-quick-actions { grid-column: 1 / -1; align-items: stretch; }.hf-quick-actions .hf-btn { width: 100%; }}717 unmodified lines718719720721722723724725726727728729730717 unmodified lines.hf-quick-actions { grid-column: 1 / -1; align-items: stretch; }.hf-quick-actions .hf-btn { width: 100%; }}/* shown instead of the app inside the Space page on huggingface.co */.embed-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); overflow-y: auto; }.embed-gate[hidden] { display: none; }.embed-gate-inner { max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }.embed-gate-inner img { border-radius: 16px; }.embed-gate-inner h1 { margin: 6px 0 0; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }.embed-gate-inner p { margin: 0; color: var(--text-2); line-height: 1.55; }.embed-gate-btn { height: 44px; padding: 0 22px; font-size: 14px; border-radius: 12px; text-decoration: none; margin-top: 6px; }.embed-gate-note { font-size: 12.5px; color: var(--text-3) !important; }
134 unmodified lines135136137138139140134 unmodified lines</section></main><div class="setup" id="setup" hidden><div class="setup-inner"><div class="setup-brand"><img src="icon.svg" alt="" width="22" height="22"><span>LocalWebAgent</span></div>134 unmodified lines135136137138139140141142143144145146147148149150134 unmodified lines</section></main><div class="embed-gate" id="embed-gate" hidden><div class="embed-gate-inner"><img src="icon.svg" alt="" width="64" height="64"><h1>Works better on its own page</h1><p>LocalWebAgent runs a whole Linux machine and keeps your models and files in your browser. Inside the Hugging Face page it can't save them properly or sign you in, so open it on its own page.</p><a class="btn primary embed-gate-btn" id="embed-gate-link" href="./" target="_blank" rel="noopener">Open LocalWebAgent</a><p class="embed-gate-note">Opens in a new tab. Bookmark it for next time.</p></div></div><div class="setup" id="setup" hidden><div class="setup-inner"><div class="setup-brand"><img src="icon.svg" alt="" width="22" height="22"><span>LocalWebAgent</span></div>
12345// Central configuration. Everything that pins a version or a location lives here.export const APP_VERSION = "0.9.0";// --- Local language models (loaded from the Hugging Face Hub, cached in Cache Storage) ---// Each runs on WebGPU through transformers.js. `chunks` is how many external weight files12345// Central configuration. Everything that pins a version or a location lives here.export const APP_VERSION = "0.9.1";// --- Local language models (loaded from the Hugging Face Hub, cached in Cache Storage) ---// Each runs on WebGPU through transformers.js. `chunks` is how many external weight files
2 unmodified lines3456789110 unmodified lines1201211221231241252 unmodified linesimport { LLM } from "./llm.js";import { RemoteLLM, findPreset, loadApiKey, migrateLegacyKey } from "./remote-llm.js";import { createModelManager, avatarTile } from "./model-manager.js";import { freshAccessToken } from "./hf-auth.js";import { VM } from "./vm.js";import { Agent } from "./agent.js";import { renderMarkdown } from "./markdown.js";110 unmodified lines// ---------- boot ----------async function init() {$("#version").textContent = "v" + APP_VERSION;setBackendLabels();syncToggles();2 unmodified lines3456789110 unmodified lines1201211221231241251261271281291301311322 unmodified linesimport { LLM } from "./llm.js";import { RemoteLLM, findPreset, loadApiKey, migrateLegacyKey } from "./remote-llm.js";import { createModelManager, avatarTile } from "./model-manager.js";import { freshAccessToken, embedded, standaloneUrl } from "./hf-auth.js";import { VM } from "./vm.js";import { Agent } from "./agent.js";import { renderMarkdown } from "./markdown.js";110 unmodified lines// ---------- boot ----------async function init() {// Inside the Space page on huggingface.co (an iframe) the app gets separate, partitioned// storage and sign-in can't work, so send people to its own page instead of starting.if (embedded()) {$("#embed-gate-link").href = standaloneUrl();$("#embed-gate").hidden = false;return;}$("#version").textContent = "v" + APP_VERSION;setBackendLabels();syncToggles();
5 unmodified lines67891011125 unmodified lines// (__vm__/disk.ext2), backed by the chunks the setup screen stored in Cache Storage.// 4. Adds the cross-origin isolation headers (COOP/COEP) that SharedArrayBuffer,// CheerpX and multi-threaded WASM need, even when a host forgets to send them.const SHELL_VERSION = "lwa-shell-0.9.0";const CX_ORIGIN = "https://cxrtnc.leaningtech.com";const CX_CACHE_PREFIX = "lwa-cheerpx-";const DISK_CACHE = "lwa-disk";5 unmodified lines67891011125 unmodified lines// (__vm__/disk.ext2), backed by the chunks the setup screen stored in Cache Storage.// 4. Adds the cross-origin isolation headers (COOP/COEP) that SharedArrayBuffer,// CheerpX and multi-threaded WASM need, even when a host forgets to send them.const SHELL_VERSION = "lwa-shell-0.9.1";const CX_ORIGIN = "https://cxrtnc.leaningtech.com";const CX_CACHE_PREFIX = "lwa-cheerpx-";const DISK_CACHE = "lwa-disk";
css/app.css+10
index.html+10
js/config.js+1-1
js/main.js+8-1
sw.js+1-1