修复无法获得pdf的问题

This commit is contained in:
yhy
2026-08-30 09:02:11 +08:00
parent 455059eebe
commit af2ee38443
8 changed files with 151 additions and 49 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import type { ChatMessage } from "../llm/types";
function sessionDir(): string {
const profile = (Zotero as any).Profile?.dir || (Zotero as any).getProfileDirectory?.()?.path;
if (!profile) {
const profile = (Zotero as any).Profile?.dir;
if (!profile || typeof profile !== "string") {
throw new Error("Cannot resolve Zotero profile directory");
}
return PathUtils.join(profile, "chatpapers", "sessions");