@cat-factory/app 0.186.0 → 0.187.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/app/components/fragments/FragmentLibraryManager.vue +39 -2
- package/i18n/locales/de.json +2 -0
- package/i18n/locales/en.json +3 -0
- package/i18n/locales/es.json +2 -0
- package/i18n/locales/fr.json +2 -0
- package/i18n/locales/he.json +2 -0
- package/i18n/locales/it.json +2 -0
- package/i18n/locales/ja.json +2 -0
- package/i18n/locales/pl.json +2 -0
- package/i18n/locales/tr.json +2 -0
- package/i18n/locales/uk.json +2 -0
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
ResolvedFragment,
|
|
15
15
|
} from '~/types/domain'
|
|
16
16
|
import { useFragmentLibrary, useFragmentLibraryStore } from '~/stores/fragmentLibrary'
|
|
17
|
+
import { showOverrideField } from '~/utils/uiMode'
|
|
17
18
|
import GitHubRepoSearchSelect from '~/components/github/GitHubRepoSearchSelect.vue'
|
|
18
19
|
import RepoTreeBrowser from '~/components/github/RepoTreeBrowser.vue'
|
|
19
20
|
import GitHubDocUrlImport from '~/components/fragments/GitHubDocUrlImport.vue'
|
|
@@ -131,7 +132,7 @@ const linkingDoc = ref(false)
|
|
|
131
132
|
const linkingSource = ref(false)
|
|
132
133
|
|
|
133
134
|
// ---- create a hand-authored fragment --------------------------------------
|
|
134
|
-
const draft = ref({ title: '', summary: '', body: '', tags: '' })
|
|
135
|
+
const draft = ref({ title: '', summary: '', body: '', brief: '', tags: '' })
|
|
135
136
|
const draftValid = computed(
|
|
136
137
|
() => draft.value.title.trim() && draft.value.summary.trim() && draft.value.body.trim(),
|
|
137
138
|
)
|
|
@@ -167,6 +168,7 @@ const editDraft = ref<{
|
|
|
167
168
|
title: string
|
|
168
169
|
summary: string
|
|
169
170
|
body: string
|
|
171
|
+
brief: string
|
|
170
172
|
tags: string
|
|
171
173
|
} | null>(null)
|
|
172
174
|
function startEdit(f: (typeof library.fragments)[number]) {
|
|
@@ -175,8 +177,10 @@ function startEdit(f: (typeof library.fragments)[number]) {
|
|
|
175
177
|
title: f.title,
|
|
176
178
|
summary: f.summary,
|
|
177
179
|
body: f.body,
|
|
180
|
+
brief: f.brief ?? '',
|
|
178
181
|
tags: (f.tags ?? []).join(', '),
|
|
179
182
|
}
|
|
183
|
+
showEditBrief.value = showOverrideField(uiMode.isAdvanced, f.brief ?? null)
|
|
180
184
|
}
|
|
181
185
|
function cancelEdit() {
|
|
182
186
|
editDraft.value = null
|
|
@@ -188,6 +192,19 @@ const editValid = computed(
|
|
|
188
192
|
!!editDraft.value.summary.trim() &&
|
|
189
193
|
!!editDraft.value.body.trim(),
|
|
190
194
|
)
|
|
195
|
+
// The linked SHORT VERSION is an OVERRIDE of what the platform does by default (condense a
|
|
196
|
+
// long standard automatically, fold a short one in full), so it follows the override rule:
|
|
197
|
+
// hidden in basic mode while unset, revealed as soon as the fragment carries one — a
|
|
198
|
+
// basic-mode curator is never left unable to see or clear a brief a teammate linked.
|
|
199
|
+
//
|
|
200
|
+
// Both flags are LATCHED at the moment the form opens rather than tracking the live draft.
|
|
201
|
+
// Recomputing per keystroke makes the control delete itself the instant a basic-mode curator
|
|
202
|
+
// empties it — mid-edit, under the cursor, on the one interaction (clearing, to hand the
|
|
203
|
+
// standard back to auto-generation) the rule exists to keep reachable.
|
|
204
|
+
const uiMode = useUiModeStore()
|
|
205
|
+
const showEditBrief = ref(false)
|
|
206
|
+
const showDraftBrief = computed(() => showOverrideField(uiMode.isAdvanced, null))
|
|
207
|
+
|
|
191
208
|
async function saveEdit() {
|
|
192
209
|
const d = editDraft.value
|
|
193
210
|
if (!d || !editValid.value) return
|
|
@@ -197,6 +214,9 @@ async function saveEdit() {
|
|
|
197
214
|
title: d.title.trim(),
|
|
198
215
|
summary: d.summary.trim(),
|
|
199
216
|
body: d.body.trim(),
|
|
217
|
+
// Always sent, so clearing the box UNLINKS the short version and hands the
|
|
218
|
+
// standard back to auto-generation (an omitted key would leave the old one).
|
|
219
|
+
brief: d.brief.trim(),
|
|
200
220
|
tags: d.tags
|
|
201
221
|
.split(',')
|
|
202
222
|
.map((t) => t.trim())
|
|
@@ -218,12 +238,13 @@ async function createFragment() {
|
|
|
218
238
|
title: draft.value.title.trim(),
|
|
219
239
|
summary: draft.value.summary.trim(),
|
|
220
240
|
body: draft.value.body.trim(),
|
|
241
|
+
brief: draft.value.brief.trim() || undefined,
|
|
221
242
|
tags: draft.value.tags
|
|
222
243
|
.split(',')
|
|
223
244
|
.map((t) => t.trim())
|
|
224
245
|
.filter(Boolean),
|
|
225
246
|
})
|
|
226
|
-
draft.value = { title: '', summary: '', body: '', tags: '' }
|
|
247
|
+
draft.value = { title: '', summary: '', body: '', brief: '', tags: '' }
|
|
227
248
|
toast.add({ title: t('fragments.toast.added'), icon: 'i-lucide-check' })
|
|
228
249
|
} catch (e) {
|
|
229
250
|
notifyError(t('fragments.toast.addFailed'), e)
|
|
@@ -701,6 +722,14 @@ async function unlinkSource(id: string) {
|
|
|
701
722
|
:placeholder="t('fragments.authored.bodyPlaceholder')"
|
|
702
723
|
:rows="4"
|
|
703
724
|
/>
|
|
725
|
+
<div v-if="showEditBrief" class="flex flex-col gap-1">
|
|
726
|
+
<UTextarea
|
|
727
|
+
v-model="editDraft.brief"
|
|
728
|
+
:placeholder="t('fragments.authored.briefPlaceholder')"
|
|
729
|
+
:rows="2"
|
|
730
|
+
/>
|
|
731
|
+
<p class="text-xs text-slate-500">{{ t('fragments.authored.briefHint') }}</p>
|
|
732
|
+
</div>
|
|
704
733
|
<UInput
|
|
705
734
|
v-model="editDraft.tags"
|
|
706
735
|
:placeholder="t('fragments.authored.tagsPlaceholder')"
|
|
@@ -799,6 +828,14 @@ async function unlinkSource(id: string) {
|
|
|
799
828
|
:placeholder="t('fragments.authored.bodyPlaceholder')"
|
|
800
829
|
:rows="4"
|
|
801
830
|
/>
|
|
831
|
+
<div v-if="showDraftBrief" class="flex flex-col gap-1">
|
|
832
|
+
<UTextarea
|
|
833
|
+
v-model="draft.brief"
|
|
834
|
+
:placeholder="t('fragments.authored.briefPlaceholder')"
|
|
835
|
+
:rows="2"
|
|
836
|
+
/>
|
|
837
|
+
<p class="text-xs text-slate-500">{{ t('fragments.authored.briefHint') }}</p>
|
|
838
|
+
</div>
|
|
802
839
|
<UInput v-model="draft.tags" :placeholder="t('fragments.authored.tagsPlaceholder')" />
|
|
803
840
|
<UButton
|
|
804
841
|
icon="i-lucide-plus"
|
package/i18n/locales/de.json
CHANGED
|
@@ -4007,6 +4007,8 @@
|
|
|
4007
4007
|
"titlePlaceholder": "Titel",
|
|
4008
4008
|
"summaryPlaceholder": "Einzeilige Zusammenfassung (vom Selektor verwendet)",
|
|
4009
4009
|
"bodyPlaceholder": "Richtlinientext (in den Prompt injiziert)",
|
|
4010
|
+
"briefPlaceholder": "Kurzfassung, die Coding-Agents erhalten (optional)",
|
|
4011
|
+
"briefHint": "Lange Standards werden für Coding-Agents automatisch verdichtet, da diese sie in jedem Zug erneut lesen. Verlinke hier deine eigene Kurzfassung, um sie stattdessen zu verwenden; leere das Feld, um zur automatischen zurückzukehren.",
|
|
4010
4012
|
"tagsPlaceholder": "Tags, kommagetrennt (z. B. backend, db)",
|
|
4011
4013
|
"add": "Fragment hinzufügen",
|
|
4012
4014
|
"generateTitle": "Generieren",
|
package/i18n/locales/en.json
CHANGED
|
@@ -5158,6 +5158,9 @@
|
|
|
5158
5158
|
"titlePlaceholder": "Title",
|
|
5159
5159
|
"summaryPlaceholder": "One-line summary (used by the selector)",
|
|
5160
5160
|
"bodyPlaceholder": "Guidance body (injected into the prompt)",
|
|
5161
|
+
"briefPlaceholder": "Short version folded for coding agents (optional)",
|
|
5162
|
+
"@briefPlaceholder": "Placeholder for the optional 'brief' field: a terse restatement of the same standard, folded into a coding agent's prompt instead of the full text.",
|
|
5163
|
+
"briefHint": "Long standards are condensed automatically for coding agents, which re-read them on every turn. Link your own short version here to use it instead; clear it to go back to the automatic one.",
|
|
5161
5164
|
"tagsPlaceholder": "Tags, comma-separated (e.g. backend, db)",
|
|
5162
5165
|
"add": "Add fragment",
|
|
5163
5166
|
"generateTitle": "Generate",
|
package/i18n/locales/es.json
CHANGED
|
@@ -4932,6 +4932,8 @@
|
|
|
4932
4932
|
"titlePlaceholder": "Título",
|
|
4933
4933
|
"summaryPlaceholder": "Resumen de una línea (usado por el selector)",
|
|
4934
4934
|
"bodyPlaceholder": "Cuerpo de la guía (inyectado en el prompt)",
|
|
4935
|
+
"briefPlaceholder": "Versión corta que reciben los agentes de código (opcional)",
|
|
4936
|
+
"briefHint": "Los estándares largos se condensan automáticamente para los agentes de código, que los releen en cada turno. Enlaza aquí tu propia versión corta para usarla en su lugar; vacíalo para volver a la automática.",
|
|
4935
4937
|
"tagsPlaceholder": "Etiquetas, separadas por comas (p. ej., backend, db)",
|
|
4936
4938
|
"add": "Añadir fragmento",
|
|
4937
4939
|
"generateTitle": "Generar",
|
package/i18n/locales/fr.json
CHANGED
|
@@ -4932,6 +4932,8 @@
|
|
|
4932
4932
|
"titlePlaceholder": "Titre",
|
|
4933
4933
|
"summaryPlaceholder": "Résumé en une ligne (utilisé par le sélecteur)",
|
|
4934
4934
|
"bodyPlaceholder": "Corps de la consigne (injecté dans le prompt)",
|
|
4935
|
+
"briefPlaceholder": "Version courte transmise aux agents de code (facultatif)",
|
|
4936
|
+
"briefHint": "Les standards longs sont condensés automatiquement pour les agents de code, qui les relisent à chaque tour. Liez ici votre propre version courte pour l'utiliser à la place ; videz le champ pour revenir à la version automatique.",
|
|
4935
4937
|
"tagsPlaceholder": "Étiquettes, séparées par des virgules (par ex. backend, db)",
|
|
4936
4938
|
"add": "Ajouter le fragment",
|
|
4937
4939
|
"generateTitle": "Générer",
|
package/i18n/locales/he.json
CHANGED
|
@@ -4943,6 +4943,8 @@
|
|
|
4943
4943
|
"titlePlaceholder": "כותרת",
|
|
4944
4944
|
"summaryPlaceholder": "תקציר בשורה אחת (בשימוש הבורר)",
|
|
4945
4945
|
"bodyPlaceholder": "גוף ההנחיה (מוזרק לפרומפט)",
|
|
4946
|
+
"briefPlaceholder": "גרסה מקוצרת שסוכני הקוד מקבלים (רשות)",
|
|
4947
|
+
"briefHint": "תקנים ארוכים מתומצתים אוטומטית עבור סוכני קוד, שקוראים אותם מחדש בכל תור. קשרו כאן גרסה מקוצרת משלכם כדי להשתמש בה במקום; רוקנו את השדה כדי לחזור לגרסה האוטומטית.",
|
|
4946
4948
|
"tagsPlaceholder": "תגיות, מופרדות בפסיקים (למשל backend, db)",
|
|
4947
4949
|
"add": "הוסף מקטע",
|
|
4948
4950
|
"generateTitle": "יצירה",
|
package/i18n/locales/it.json
CHANGED
|
@@ -4007,6 +4007,8 @@
|
|
|
4007
4007
|
"titlePlaceholder": "Titolo",
|
|
4008
4008
|
"summaryPlaceholder": "Riepilogo su una riga (usato dal selettore)",
|
|
4009
4009
|
"bodyPlaceholder": "Corpo delle indicazioni (iniettato nel prompt)",
|
|
4010
|
+
"briefPlaceholder": "Versione breve fornita agli agenti di codice (facoltativo)",
|
|
4011
|
+
"briefHint": "Gli standard lunghi vengono condensati automaticamente per gli agenti di codice, che li rileggono a ogni turno. Collega qui la tua versione breve per usarla al suo posto; svuota il campo per tornare a quella automatica.",
|
|
4010
4012
|
"tagsPlaceholder": "Tag, separati da virgola (es. backend, db)",
|
|
4011
4013
|
"add": "Aggiungi frammento",
|
|
4012
4014
|
"generateTitle": "Genera",
|
package/i18n/locales/ja.json
CHANGED
|
@@ -4944,6 +4944,8 @@
|
|
|
4944
4944
|
"titlePlaceholder": "タイトル",
|
|
4945
4945
|
"summaryPlaceholder": "1行の要約 (セレクターで使用)",
|
|
4946
4946
|
"bodyPlaceholder": "ガイダンス本文 (プロンプトに挿入)",
|
|
4947
|
+
"briefPlaceholder": "コーディングエージェントに渡す短縮版 (任意)",
|
|
4948
|
+
"briefHint": "長い基準は、毎ターン読み直すコーディングエージェント向けに自動で要約されます。独自の短縮版をここにリンクするとそちらが使われ、空にすると自動要約に戻ります。",
|
|
4947
4949
|
"tagsPlaceholder": "タグ、カンマ区切り (例: backend, db)",
|
|
4948
4950
|
"add": "フラグメントを追加",
|
|
4949
4951
|
"generateTitle": "生成",
|
package/i18n/locales/pl.json
CHANGED
|
@@ -4932,6 +4932,8 @@
|
|
|
4932
4932
|
"titlePlaceholder": "Tytuł",
|
|
4933
4933
|
"summaryPlaceholder": "Jednowierszowe podsumowanie (używane przez selektor)",
|
|
4934
4934
|
"bodyPlaceholder": "Treść wytycznej (wstrzykiwana do promptu)",
|
|
4935
|
+
"briefPlaceholder": "Krótka wersja przekazywana agentom kodującym (opcjonalnie)",
|
|
4936
|
+
"briefHint": "Długie standardy są automatycznie skracane dla agentów kodujących, które czytają je w każdej turze. Podlinkuj tu własną krótką wersję, aby użyć jej zamiast tego; wyczyść pole, by wrócić do wersji automatycznej.",
|
|
4935
4937
|
"tagsPlaceholder": "Tagi, oddzielone przecinkami (np. backend, db)",
|
|
4936
4938
|
"add": "Dodaj fragment",
|
|
4937
4939
|
"generateTitle": "Generuj",
|
package/i18n/locales/tr.json
CHANGED
|
@@ -4944,6 +4944,8 @@
|
|
|
4944
4944
|
"titlePlaceholder": "Başlık",
|
|
4945
4945
|
"summaryPlaceholder": "Tek satırlık özet (seçici tarafından kullanılır)",
|
|
4946
4946
|
"bodyPlaceholder": "Yönerge gövdesi (prompt'a enjekte edilir)",
|
|
4947
|
+
"briefPlaceholder": "Kod ajanlarına verilen kısa sürüm (isteğe bağlı)",
|
|
4948
|
+
"briefHint": "Uzun standartlar, onları her turda yeniden okuyan kod ajanları için otomatik olarak özetlenir. Bunun yerine kendi kısa sürümünüzü buraya bağlayın; otomatik sürüme dönmek için alanı boşaltın.",
|
|
4947
4949
|
"tagsPlaceholder": "Etiketler, virgülle ayrılmış (örn. backend, db)",
|
|
4948
4950
|
"add": "Parça ekle",
|
|
4949
4951
|
"generateTitle": "Oluştur",
|
package/i18n/locales/uk.json
CHANGED
|
@@ -4932,6 +4932,8 @@
|
|
|
4932
4932
|
"titlePlaceholder": "Заголовок",
|
|
4933
4933
|
"summaryPlaceholder": "Однорядковий підсумок (використовується селектором)",
|
|
4934
4934
|
"bodyPlaceholder": "Текст настанови (вставляється у промпт)",
|
|
4935
|
+
"briefPlaceholder": "Коротка версія, яку отримують агенти-кодери (необов'язково)",
|
|
4936
|
+
"briefHint": "Довгі стандарти автоматично стискаються для агентів-кодерів, які перечитують їх щохода. Приєднайте тут власну коротку версію, щоб використати її замість автоматичної; очистіть поле, щоб повернутися до автоматичної.",
|
|
4935
4937
|
"tagsPlaceholder": "Теги, розділені комами (напр. backend, db)",
|
|
4936
4938
|
"add": "Додати фрагмент",
|
|
4937
4939
|
"generateTitle": "Згенерувати",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.187.0",
|
|
4
4
|
"description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"valibot": "^1.4.2",
|
|
41
41
|
"vue": "3.5.40",
|
|
42
42
|
"wretch": "^3.0.9",
|
|
43
|
-
"@cat-factory/contracts": "0.
|
|
43
|
+
"@cat-factory/contracts": "0.194.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@toad-contracts/testing": "0.3.2",
|