arkaos 3.8.0 → 3.9.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.9.0
|
|
@@ -226,6 +226,72 @@ function csvToList(value: string): string[] {
|
|
|
226
226
|
type SuggestField = 'mental_models' | 'frameworks' | 'expertise_domains' | 'communication_avoid' | 'key_quotes'
|
|
227
227
|
const suggestingField = ref<SuggestField | null>(null)
|
|
228
228
|
|
|
229
|
+
// PR84c v3.9.0 — Auto-fill empty lists in one go.
|
|
230
|
+
const autofilling = ref(false)
|
|
231
|
+
|
|
232
|
+
async function autofillEmpties() {
|
|
233
|
+
if (!draft.value || !detail.value) return
|
|
234
|
+
type ListKey = 'mental_models' | 'expertise_domains' | 'frameworks' | 'key_quotes' | 'communication_avoid'
|
|
235
|
+
const targets: ListKey[] = []
|
|
236
|
+
if ((draft.value.mental_models ?? []).length === 0) targets.push('mental_models')
|
|
237
|
+
if ((draft.value.expertise_domains ?? []).length === 0) targets.push('expertise_domains')
|
|
238
|
+
if ((draft.value.frameworks ?? []).length === 0) targets.push('frameworks')
|
|
239
|
+
if ((draft.value.key_quotes ?? []).length === 0) targets.push('key_quotes')
|
|
240
|
+
if ((draft.value.communication.avoid ?? []).length === 0) targets.push('communication_avoid')
|
|
241
|
+
if (targets.length === 0) {
|
|
242
|
+
toast.add({ title: 'No empty lists', description: 'Every list already has at least one item.', color: 'info' })
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
autofilling.value = true
|
|
246
|
+
const results = await Promise.allSettled(
|
|
247
|
+
targets.map((field) =>
|
|
248
|
+
$fetch<{ suggestions: string[], provider_name: string, error?: string }>(
|
|
249
|
+
`${apiBase}/api/personas/suggest`,
|
|
250
|
+
{
|
|
251
|
+
method: 'POST',
|
|
252
|
+
body: {
|
|
253
|
+
field,
|
|
254
|
+
count: 5,
|
|
255
|
+
context: {
|
|
256
|
+
name: detail.value!.name,
|
|
257
|
+
title: detail.value!.title,
|
|
258
|
+
current: [],
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
),
|
|
263
|
+
),
|
|
264
|
+
)
|
|
265
|
+
let filledCount = 0
|
|
266
|
+
let providerName = ''
|
|
267
|
+
results.forEach((r, idx) => {
|
|
268
|
+
if (r.status !== 'fulfilled' || r.value.error) return
|
|
269
|
+
const items = r.value.suggestions ?? []
|
|
270
|
+
if (items.length === 0) return
|
|
271
|
+
const field = targets[idx]
|
|
272
|
+
if (!draft.value) return
|
|
273
|
+
if (field === 'communication_avoid') {
|
|
274
|
+
draft.value.communication.avoid = items
|
|
275
|
+
} else {
|
|
276
|
+
;(draft.value as any)[field] = items
|
|
277
|
+
}
|
|
278
|
+
filledCount += 1
|
|
279
|
+
providerName = r.value.provider_name || providerName
|
|
280
|
+
})
|
|
281
|
+
autofilling.value = false
|
|
282
|
+
if (filledCount > 0) {
|
|
283
|
+
markDirty()
|
|
284
|
+
toast.add({
|
|
285
|
+
title: `Filled ${filledCount} list${filledCount === 1 ? '' : 's'}`,
|
|
286
|
+
description: `via ${providerName}`,
|
|
287
|
+
color: 'success',
|
|
288
|
+
icon: 'i-lucide-sparkles',
|
|
289
|
+
})
|
|
290
|
+
} else {
|
|
291
|
+
toast.add({ title: 'Nothing filled', description: 'LLM returned no items.', color: 'error' })
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
229
295
|
// PR83c v3.5.0 — single-string suggester (tone for personas).
|
|
230
296
|
const suggestingString = ref<'tone' | null>(null)
|
|
231
297
|
|
|
@@ -657,15 +723,26 @@ const vocabOptions = [
|
|
|
657
723
|
}"
|
|
658
724
|
>
|
|
659
725
|
<template #header>
|
|
660
|
-
<div class="flex items-center justify-between">
|
|
726
|
+
<div class="flex items-center justify-between gap-3">
|
|
661
727
|
<h2 class="text-xl font-bold">Edit {{ draft.name || 'persona' }}</h2>
|
|
662
|
-
<
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
728
|
+
<div class="flex items-center gap-2">
|
|
729
|
+
<UButton
|
|
730
|
+
label="Auto-fill empties"
|
|
731
|
+
icon="i-lucide-sparkles"
|
|
732
|
+
color="primary"
|
|
733
|
+
variant="soft"
|
|
734
|
+
size="sm"
|
|
735
|
+
:loading="autofilling"
|
|
736
|
+
@click="autofillEmpties"
|
|
737
|
+
/>
|
|
738
|
+
<UButton
|
|
739
|
+
icon="i-lucide-x"
|
|
740
|
+
variant="ghost"
|
|
741
|
+
size="sm"
|
|
742
|
+
aria-label="Close"
|
|
743
|
+
@click="tryCloseEdit"
|
|
744
|
+
/>
|
|
745
|
+
</div>
|
|
669
746
|
</div>
|
|
670
747
|
</template>
|
|
671
748
|
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
Binary file
|