Add a password-gated private instance mode for xaigen.
Keep Authentik on aigen, isolate library data per instance, and purge Comfy outputs from the desktop after they are saved on the server. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,6 +65,7 @@ function libraryRoot() {
|
||||
}
|
||||
|
||||
export function libraryOwnerKey(event: H3Event) {
|
||||
if (passwordAuthEnabled()) return privateInstanceId()
|
||||
const user = getSessionUser(event)
|
||||
const raw = user?.sub || user?.email || (!authEnabled() ? 'local' : '')
|
||||
if (!raw) {
|
||||
@@ -708,7 +709,7 @@ export async function importMissingComfyVideos(owner: string, folderId?: string)
|
||||
const found: { promptId: string; video: { filename: string; subfolder: string; type: string }; prompt: string; width: number; height: number; steps: number; seed: number }[] = []
|
||||
for (const [promptId, entry] of Object.entries(history)) {
|
||||
const video = extractVideo({ [promptId]: entry as Record<string, unknown> }, promptId)
|
||||
if (!video || known.has(video.filename)) continue
|
||||
if (!video || known.has(video.filename) || !isOurComfyVideo(video)) continue
|
||||
const prompt = extractPromptFromHistory(entry) || 'Recovered from ComfyUI'
|
||||
const meta = extractClipMetaFromHistory(entry)
|
||||
found.push({
|
||||
@@ -743,6 +744,7 @@ export async function importMissingComfyVideos(owner: string, folderId?: string)
|
||||
comfyFilename: item.video.filename
|
||||
})
|
||||
imported.push(clip)
|
||||
await purgeComfyArtifacts({ video: item.video, promptId: item.promptId })
|
||||
}
|
||||
return imported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user