arkaos 3.44.0 → 3.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.45.0
|
|
@@ -142,6 +142,41 @@ const favs = useFavorites()
|
|
|
142
142
|
await favs.load()
|
|
143
143
|
const favoritesOnly = ref(false)
|
|
144
144
|
|
|
145
|
+
// PR93c v3.45.0 — bulk export only selected rows.
|
|
146
|
+
const exportingSelected = ref(false)
|
|
147
|
+
async function exportSelectedZip() {
|
|
148
|
+
if (selected.value.size === 0) return
|
|
149
|
+
const ids = Array.from(selected.value).join(',')
|
|
150
|
+
exportingSelected.value = true
|
|
151
|
+
try {
|
|
152
|
+
const blob = await $fetch<Blob>(
|
|
153
|
+
`${apiBase}/api/personas/export-all.zip`,
|
|
154
|
+
{ query: { ids }, responseType: 'blob' },
|
|
155
|
+
)
|
|
156
|
+
const url = URL.createObjectURL(blob)
|
|
157
|
+
const a = document.createElement('a')
|
|
158
|
+
a.href = url
|
|
159
|
+
a.download = `arkaos-personas-selected-${selected.value.size}.zip`
|
|
160
|
+
document.body.appendChild(a)
|
|
161
|
+
a.click()
|
|
162
|
+
a.remove()
|
|
163
|
+
URL.revokeObjectURL(url)
|
|
164
|
+
toast.add({
|
|
165
|
+
title: `Exported ${selected.value.size} persona${selected.value.size === 1 ? '' : 's'}`,
|
|
166
|
+
color: 'success',
|
|
167
|
+
icon: 'i-lucide-archive',
|
|
168
|
+
})
|
|
169
|
+
} catch (err) {
|
|
170
|
+
toast.add({
|
|
171
|
+
title: 'Export failed',
|
|
172
|
+
description: err instanceof Error ? err.message : 'unknown error',
|
|
173
|
+
color: 'error',
|
|
174
|
+
})
|
|
175
|
+
} finally {
|
|
176
|
+
exportingSelected.value = false
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
145
180
|
// PR92a v3.39.0 — bulk export every persona as a zip.
|
|
146
181
|
const exportingZip = ref(false)
|
|
147
182
|
async function exportAllAsZip() {
|
|
@@ -636,6 +671,14 @@ async function undoTrashIds(ids: string[]) {
|
|
|
636
671
|
@click="clearSelection"
|
|
637
672
|
/>
|
|
638
673
|
<div class="h-5 w-px bg-default" />
|
|
674
|
+
<UButton
|
|
675
|
+
label="Export ZIP"
|
|
676
|
+
icon="i-lucide-archive"
|
|
677
|
+
size="sm"
|
|
678
|
+
variant="soft"
|
|
679
|
+
:loading="exportingSelected"
|
|
680
|
+
@click="exportSelectedZip"
|
|
681
|
+
/>
|
|
639
682
|
<UButton
|
|
640
683
|
label="Delete"
|
|
641
684
|
icon="i-lucide-trash-2"
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
Binary file
|
package/scripts/dashboard-api.py
CHANGED
|
@@ -334,13 +334,11 @@ def personas_archetypes():
|
|
|
334
334
|
|
|
335
335
|
|
|
336
336
|
@app.get("/api/personas/export-all.zip")
|
|
337
|
-
def personas_export_all():
|
|
337
|
+
def personas_export_all(ids: Optional[str] = None):
|
|
338
338
|
"""PR92a v3.39.0 — stream every persona as Markdown inside a ZIP.
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
`ObsidianPersonaStore._render`, and zips them. Filename uses the
|
|
343
|
-
persona name (sanitised), falling back to id.
|
|
340
|
+
PR93c v3.45.0 — optional ``?ids=a,b,c`` filter narrows the export
|
|
341
|
+
to a specific subset.
|
|
344
342
|
"""
|
|
345
343
|
mgr = _get_persona_manager()
|
|
346
344
|
if not mgr:
|
|
@@ -350,6 +348,13 @@ def personas_export_all():
|
|
|
350
348
|
except Exception as exc: # noqa: BLE001
|
|
351
349
|
return {"error": f"list failed: {exc}"}
|
|
352
350
|
|
|
351
|
+
# PR93c — optional id allow-list.
|
|
352
|
+
id_filter: Optional[set[str]] = None
|
|
353
|
+
if ids:
|
|
354
|
+
id_filter = {s.strip() for s in ids.split(",") if s.strip()}
|
|
355
|
+
if id_filter is not None:
|
|
356
|
+
items = [p for p in items if hasattr(p, "id") and p.id in id_filter]
|
|
357
|
+
|
|
353
358
|
from core.personas.obsidian_store import ObsidianPersonaStore
|
|
354
359
|
|
|
355
360
|
import io
|