From a8cfb037a92d8b071d7db277453e3b17b17384a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 23:10:32 +0000 Subject: [PATCH] This build was committed by a bot. --- .../{index-B_jJyKld.js => index-B2V8L6xx.js} | 47 ++++++++++++------- dist/index.html | 2 +- dist/sw.js | 2 +- 3 files changed, 32 insertions(+), 19 deletions(-) rename dist/assets/{index-B_jJyKld.js => index-B2V8L6xx.js} (98%) diff --git a/dist/assets/index-B_jJyKld.js b/dist/assets/index-B2V8L6xx.js similarity index 98% rename from dist/assets/index-B_jJyKld.js rename to dist/assets/index-B2V8L6xx.js index 5fd6e46..f1e7771 100644 --- a/dist/assets/index-B_jJyKld.js +++ b/dist/assets/index-B2V8L6xx.js @@ -1403,6 +1403,28 @@ el.htmlTab_index.textContent = "index.html"; el.htmlTab_extension.textContent = "extension.html"; el.htmlTab_index.onclick = () => showHtmlTab("index"); el.htmlTab_extension.onclick = () => showHtmlTab("extension"); +const pullThreads = async () => { + const u = el.threadRepoInput.value.trim(); + if (!u.startsWith("gh://")) return; + const info = parseGhUrl(u); + try { + const items = await ghApi(`${info.apiPath}?ref=${info.branch}`); + if (!items) { + THREAD.list = []; + await THREAD.save(); + } else { + THREAD.list = items.map((i) => { + if (i.type === "dir") return { id: i.name, title: i.name, type: "folder", updatedAt: 0 }; + const d = deserializeThreadName(i.name); + return d ? { ...d, status: "synced" } : null; + }).filter(Boolean); + await THREAD.save(); + } + await renderThreads(); + } catch (e) { + console.error("Auto-pull failed:", e); + } +}; $(el.threadRepoInput).on("change", async () => { const u = el.threadRepoInput.value.trim(); localStorage.setItem("thread_repo_url", u); @@ -1412,8 +1434,11 @@ $(el.threadRepoInput).on("change", async () => { } el.threadFolderBtn.classList.toggle("hidden", !u.startsWith("gh://")); el.threadBackBtn.classList.toggle("hidden", !u.startsWith("gh://") || u.split("/").length <= 3); - await THREAD.load(); - await renderThreads(); + if (u.startsWith("gh://")) await pullThreads(); + else { + await THREAD.load(); + await renderThreads(); + } }); $(el.threadBackBtn).on("click", () => { const u = el.threadRepoInput.value.trim(); @@ -1469,20 +1494,8 @@ $(el.threadSyncBtn).on("click", async () => { await THREAD.save(); alert("Pushed to GitHub."); } else { - const items = await ghApi(`${info.apiPath}?ref=${info.branch}`); - if (!items) { - THREAD.list = []; - await THREAD.save(); - alert("Remote is empty."); - } else { - THREAD.list = items.map((i) => { - if (i.type === "dir") return { id: i.name, title: i.name, type: "folder", updatedAt: 0 }; - const d = deserializeThreadName(i.name); - return d ? { ...d, status: "synced" } : null; - }).filter(Boolean); - await THREAD.save(); - alert("Pulled from GitHub."); - } + await pullThreads(); + alert("Pulled from GitHub."); } await renderThreads(); } catch (e) { @@ -1733,4 +1746,4 @@ $(el.pasteHTML).on("click", async () => { } catch { } }); -Object.assign(window, { icons, haptic, clamp, num, int, gid, esc, positionPopover, sid, fmtSize, asDataURL, b64, makeSune, getModelShort, resolveSuneSrc, processSuneIncludes, renderSuneHTML, reflectActiveSune, suneRow, enhanceCodeBlocks, getSuneLabel, _createMessageRow, msgRow, partsToText, addSuneBubbleStreaming, clearChat, payloadWithSampling, setBtnStop, setBtnSend, localDemoReply, titleFrom, serializeThreadName, deserializeThreadName, ensureThreadOnFirstUser, generateTitleWithAI, threadRow, renderThreads, hideThreadPopover, showThreadPopover, hideSunePopover, showSunePopover, updateAttachBadge, toAttach, ensureJars, openSettings, closeSettings, showTab, dl, ts, kbUpdate, kbBind, activeMeta, init, showHtmlTab, showAccountTab, openAccountSettings, closeAccountSettings, getBubbleById, syncActiveThread, syncWhileBusy, onForeground, getActiveHtmlParts, imgToWebp, cacheStore, ghApi, parseGhUrl }); +Object.assign(window, { icons, haptic, clamp, num, int, gid, esc, positionPopover, sid, fmtSize, asDataURL, b64, makeSune, getModelShort, resolveSuneSrc, processSuneIncludes, renderSuneHTML, reflectActiveSune, suneRow, enhanceCodeBlocks, getSuneLabel, _createMessageRow, msgRow, partsToText, addSuneBubbleStreaming, clearChat, payloadWithSampling, setBtnStop, setBtnSend, localDemoReply, titleFrom, serializeThreadName, deserializeThreadName, ensureThreadOnFirstUser, generateTitleWithAI, threadRow, renderThreads, hideThreadPopover, showThreadPopover, hideSunePopover, showSunePopover, updateAttachBadge, toAttach, ensureJars, openSettings, closeSettings, showTab, dl, ts, kbUpdate, kbBind, activeMeta, init, showHtmlTab, showAccountTab, openAccountSettings, closeAccountSettings, getBubbleById, syncActiveThread, syncWhileBusy, onForeground, getActiveHtmlParts, imgToWebp, cacheStore, ghApi, parseGhUrl, pullThreads }); diff --git a/dist/index.html b/dist/index.html index bae0352..6a7aecb 100644 --- a/dist/index.html +++ b/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/sw.js b/dist/sw.js index 03f1813..6f6c0b0 100644 --- a/dist/sw.js +++ b/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),c={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map(e=>c[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"e62fb0c404f4d8ff32418b5610c8fd66"},{url:"assets/index-JLEDB1oP.css",revision:null},{url:"assets/index-B_jJyKld.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const d=e=>i(e,t),l={module:{uri:t},exports:o,require:d};s[t]=Promise.all(n.map(e=>l[e]||d(e))).then(e=>(r(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"15e44f2964c10d1a44ad0d0391de6213"},{url:"assets/index-JLEDB1oP.css",revision:null},{url:"assets/index-B2V8L6xx.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});