This build was committed by a bot.

This commit is contained in:
github-actions[bot]
2026-01-27 21:56:34 +00:00
parent 8a1d7e5dc5
commit 8183d02e1c
3 changed files with 15 additions and 13 deletions

View File

@@ -731,7 +731,7 @@ ${sysPrompt}` }], max_tokens: 20, temperature: 0.2 }) });
}; };
const threadRow = (t) => { const threadRow = (t) => {
const icon = t.type === "folder" ? "folder" : t.type === "file" ? "file-text" : ""; const icon = t.type === "folder" ? "folder" : t.type === "file" ? "file-text" : "";
return `<div class="relative flex items-center gap-2 px-3 py-2 ${t.pinned ? "bg-yellow-50" : ""}"><button data-open-thread="${t.id}" data-type="${t.type || "thread"}" class="flex-1 text-left truncate flex items-center gap-2">${icon ? `<i data-lucide="${icon}" class="h-4 w-4"></i>` : ""}${t.pinned ? "📌 " : ""}${esc(t.title || "Untitled")}${t.status === "modified" ? "*" : t.status === "new" ? "+" : ""}</button>${t.type === "file" ? "" : `<button data-thread-menu="${t.id}" class="h-8 w-8 rounded hover:bg-gray-100 flex items-center justify-center" title="More"><i data-lucide="more-horizontal" class="h-4 w-4"></i></button>`}</div>`; return `<div class="relative flex items-center gap-2 px-3 py-2 ${t.pinned ? "bg-yellow-50" : ""}"><button data-open-thread="${t.id}" data-type="${t.type || "thread"}" class="flex-1 text-left truncate flex items-center gap-2">${icon ? `<i data-lucide="${icon}" class="h-4 w-4"></i>` : ""}${t.pinned ? "📌 " : ""}${esc(t.title || "Untitled")}${t.status === "modified" ? "*" : t.status === "new" ? "+" : ""}</button><button data-thread-menu="${t.id}" class="h-8 w-8 rounded hover:bg-gray-100 flex items-center justify-center" title="More"><i data-lucide="more-horizontal" class="h-4 w-4"></i></button></div>`;
}; };
let sortedThreads = [], isAddingThreads = false; let sortedThreads = [], isAddingThreads = false;
const THREAD_PAGE_SIZE = 50; const THREAD_PAGE_SIZE = 50;
@@ -776,14 +776,7 @@ $(el.threadList).on("click", async (e) => {
const u2 = el.threadRepoInput.value.trim(); const u2 = el.threadRepoInput.value.trim();
if (u2.startsWith("gh://")) { if (u2.startsWith("gh://")) {
const info = parseGhUrl(u2); const info = parseGhUrl(u2);
try { window.open(`https://github.com/${info.owner}/${info.repo}/blob/${info.branch}/${id}`, "_blank");
await navigator.clipboard.writeText(`${info.owner}/${info.repo}/${id}`);
const old = openBtn.innerHTML;
openBtn.innerHTML = '<i data-lucide="check" class="h-4 w-4 text-green-500"></i> Copied Path';
icons();
setTimeout(() => (openBtn.innerHTML = old, icons()), 1200);
} catch {
}
} }
return; return;
} }
@@ -906,6 +899,16 @@ $(el.threadPopover).on("click", async (e) => {
} else if (act === "export") { } else if (act === "export") {
const msgs = await localforage.getItem(prefix + th.id) || []; const msgs = await localforage.getItem(prefix + th.id) || [];
dl(`thread-${(th.title || "thread").replace(/\W/g, "_")}-${ts()}.json`, { ...th, messages: msgs }); dl(`thread-${(th.title || "thread").replace(/\W/g, "_")}-${ts()}.json`, { ...th, messages: msgs });
} else if (act === "copy_path") {
const u2 = el.threadRepoInput.value.trim();
if (u2.startsWith("gh://")) {
const info = parseGhUrl(u2);
try {
await navigator.clipboard.writeText(th.type === "file" ? th.id : `${info.owner}/${info.repo}/${th.id}`);
alert("Path copied");
} catch {
}
}
} }
hideThreadPopover(); hideThreadPopover();
await THREAD.save(); await THREAD.save();

5
dist/index.html vendored
View File

@@ -12,7 +12,7 @@
<script defer src="https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js"></script>
<script defer src="//unpkg.com/alpinejs"></script> <script defer src="//unpkg.com/alpinejs"></script>
<script type="module" crossorigin src="/assets/index-zttrb_rF.js"></script> <script type="module" crossorigin src="/assets/index-BNCMHwwm.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-JLEDB1oP.css"> <link rel="stylesheet" crossorigin href="/assets/index-JLEDB1oP.css">
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head> <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
<body class="bg-white text-gray-900 selection:bg-black/10" x-data @click.window="if($event.target.closest('button')) haptic(); if(!document.getElementById('threadPopover').contains($event.target)&&!$event.target.closest('[data-thread-menu]')) hideThreadPopover(); if(!document.getElementById('sunePopover').contains($event.target)&&!$event.target.closest('[data-sune-menu]')) hideSunePopover(); if(!document.getElementById('userMenu').contains($event.target)&&!document.getElementById('userMenuBtn').contains($event.target)) document.getElementById('userMenu').classList.add('hidden')"> <body class="bg-white text-gray-900 selection:bg-black/10" x-data @click.window="if($event.target.closest('button')) haptic(); if(!document.getElementById('threadPopover').contains($event.target)&&!$event.target.closest('[data-thread-menu]')) hideThreadPopover(); if(!document.getElementById('sunePopover').contains($event.target)&&!$event.target.closest('[data-sune-menu]')) hideSunePopover(); if(!document.getElementById('userMenu').contains($event.target)&&!document.getElementById('userMenuBtn').contains($event.target)) document.getElementById('userMenu').classList.add('hidden')">
@@ -75,6 +75,7 @@
<button data-action="pin" class="menu-item"><i data-lucide="pin" class="h-4 w-4"></i><span>Pin to top</span></button> <button data-action="pin" class="menu-item"><i data-lucide="pin" class="h-4 w-4"></i><span>Pin to top</span></button>
<button data-action="rename" class="menu-item"><i data-lucide="edit-3" class="h-4 w-4"></i><span>Rename</span></button> <button data-action="rename" class="menu-item"><i data-lucide="edit-3" class="h-4 w-4"></i><span>Rename</span></button>
<button data-action="duplicate" class="menu-item"><i data-lucide="copy" class="h-4 w-4"></i><span>Duplicate</span></button> <button data-action="duplicate" class="menu-item"><i data-lucide="copy" class="h-4 w-4"></i><span>Duplicate</span></button>
<button data-action="copy_path" class="menu-item"><i data-lucide="copy" class="h-4 w-4"></i><span>Copy Path</span></button>
<button data-action="export" class="menu-item"><i data-lucide="download" class="h-4 w-4"></i><span>Export thread (.json)</span></button> <button data-action="export" class="menu-item"><i data-lucide="download" class="h-4 w-4"></i><span>Export thread (.json)</span></button>
<button data-action="delete" class="menu-item text-red-600"><i data-lucide="trash-2" class="h-4 w-4"></i><span>Delete</span></button> <button data-action="delete" class="menu-item text-red-600"><i data-lucide="trash-2" class="h-4 w-4"></i><span>Delete</span></button>
<button data-action="count_tokens" class="menu-item"><i data-lucide="hash" class="h-4 w-4"></i><span>Count tokens (approx.)</span></button> <button data-action="count_tokens" class="menu-item"><i data-lucide="hash" class="h-4 w-4"></i><span>Count tokens (approx.)</span></button>
@@ -194,8 +195,6 @@
</div> </div>
<input id="importAccountSettingsInput" type="file" class="hidden" accept="application/json,.json"> <input id="importAccountSettingsInput" type="file" class="hidden" accept="application/json,.json">
<script src="https://unpkg.com/lucide@latest"></script> <script src="https://unpkg.com/lucide@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>

2
dist/sw.js vendored
View File

@@ -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} didnt 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:"f93182f466d6787d3329a9e33c91aa9e"},{url:"assets/index-zttrb_rF.js",revision:null},{url:"assets/index-JLEDB1oP.css",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} didnt 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 c=e=>i(e,t),l={module:{uri:t},exports:o,require:c};s[t]=Promise.all(n.map(e=>l[e]||c(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:"474e24940f3c2a0651c0199d8d9a5f5a"},{url:"assets/index-JLEDB1oP.css",revision:null},{url:"assets/index-BNCMHwwm.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});