Skip to content

Commit 1488375

Browse files
This build was committed by a bot.
1 parent b4bedec commit 1488375

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ ${sysPrompt}` }], max_tokens: 20, temperature: 0.2 }) });
731731
};
732732
const threadRow = (t) => {
733733
const icon = t.type === "folder" ? "folder" : t.type === "file" ? "file-text" : "";
734-
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>`;
734+
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>`;
735735
};
736736
let sortedThreads = [], isAddingThreads = false;
737737
const THREAD_PAGE_SIZE = 50;
@@ -776,7 +776,14 @@ $(el.threadList).on("click", async (e) => {
776776
const u2 = el.threadRepoInput.value.trim();
777777
if (u2.startsWith("gh://")) {
778778
const info = parseGhUrl(u2);
779-
window.open(`https://github.com/${info.owner}/${info.repo}/blob/${info.branch}/${id}`, "_blank");
779+
try {
780+
await navigator.clipboard.writeText(`${info.owner}/${info.repo}/${id}`);
781+
const old = openBtn.innerHTML;
782+
openBtn.innerHTML = '<i data-lucide="check" class="h-4 w-4 text-green-500"></i> Copied Path';
783+
icons();
784+
setTimeout(() => (openBtn.innerHTML = old, icons()), 1200);
785+
} catch {
786+
}
780787
}
781788
return;
782789
}
@@ -899,16 +906,6 @@ $(el.threadPopover).on("click", async (e) => {
899906
} else if (act === "export") {
900907
const msgs = await localforage.getItem(prefix + th.id) || [];
901908
dl(`thread-${(th.title || "thread").replace(/\W/g, "_")}-${ts()}.json`, { ...th, messages: msgs });
902-
} else if (act === "copy_path") {
903-
const u2 = el.threadRepoInput.value.trim();
904-
if (u2.startsWith("gh://")) {
905-
const info = parseGhUrl(u2);
906-
try {
907-
await navigator.clipboard.writeText(th.type === "file" ? th.id : `${info.owner}/${info.repo}/${th.id}`);
908-
alert("Path copied");
909-
} catch {
910-
}
911-
}
912909
}
913910
hideThreadPopover();
914911
await THREAD.save();

dist/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<script defer src="https://cdn.jsdelivr.net/npm/cash-dom/dist/cash.min.js"></script>
1313
<script defer src="//unpkg.com/alpinejs"></script>
1414

15-
<script type="module" crossorigin src="/assets/index-BNCMHwwm.js"></script>
15+
<script type="module" crossorigin src="/assets/index-zttrb_rF.js"></script>
1616
<link rel="stylesheet" crossorigin href="/assets/index-JLEDB1oP.css">
1717
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
1818
<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,7 +75,6 @@
7575
<button data-action="pin" class="menu-item"><i data-lucide="pin" class="h-4 w-4"></i><span>Pin to top</span></button>
7676
<button data-action="rename" class="menu-item"><i data-lucide="edit-3" class="h-4 w-4"></i><span>Rename</span></button>
7777
<button data-action="duplicate" class="menu-item"><i data-lucide="copy" class="h-4 w-4"></i><span>Duplicate</span></button>
78-
<button data-action="copy_path" class="menu-item"><i data-lucide="copy" class="h-4 w-4"></i><span>Copy Path</span></button>
7978
<button data-action="export" class="menu-item"><i data-lucide="download" class="h-4 w-4"></i><span>Export thread (.json)</span></button>
8079
<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>
8180
<button data-action="count_tokens" class="menu-item"><i data-lucide="hash" class="h-4 w-4"></i><span>Count tokens (approx.)</span></button>
@@ -195,6 +194,9 @@
195194
</div>
196195
<input id="importAccountSettingsInput" type="file" class="hidden" accept="application/json,.json">
197196

197+
198+
199+
198200
<script src="https://unpkg.com/lucide@latest"></script>
199201
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"></script>
200202
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>

dist/sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)