feat: Enhance training parameters handling and documentation
- Introduced new fields for descriptions in training parameters, improving clarity for AI context in `training_sessions_recent_json`.
- Added a glossary placeholder `{{training_parameters_glossary_md}}` to provide a Markdown table of active training parameters, including names and descriptions.
- Updated the `placeholder_resolver.py` and `activity_metrics.py` to support the new glossary functionality.
- Enhanced the `AdminActivityAttributeProfilesPage` to allow input for descriptions in both German and English, ensuring better context for metrics.
- Revised tests to validate the inclusion of description fields in parameter schema merges and metrics handling.
This commit is contained in:
1 parent
c3be745efa
commit
bc8e9fb7fa
8 files changed
+262
-7
No files matched your search
@@ -10,6 +10,8 @@ const emptyParamForm = () => ({
|
||||
key: '',
|
||||
name_de: '',
|
||||
name_en: '',
|
||||
description_de: '',
|
||||
description_en: '',
|
||||
category: 'physical',
|
||||
data_type: 'float',
|
||||
unit: '',
|
||||
@@ -130,6 +132,8 @@ export default function AdminActivityAttributeProfilesPage() {
|
||||
key: paramForm.key.trim().toLowerCase(),
|
||||
name_de: paramForm.name_de.trim(),
|
||||
name_en: paramForm.name_en.trim(),
|
||||
description_de: paramForm.description_de.trim() || null,
|
||||
description_en: paramForm.description_en.trim() || null,
|
||||
category: paramForm.category,
|
||||
data_type: paramForm.data_type,
|
||||
unit: paramForm.unit.trim() || null,
|
||||
@@ -153,6 +157,8 @@ export default function AdminActivityAttributeProfilesPage() {
|
||||
await api.adminUpdateTrainingParameter(editParam.id, {
|
||||
name_de: editParam.name_de.trim(),
|
||||
name_en: editParam.name_en.trim(),
|
||||
description_de: editParam.description_de?.trim() || null,
|
||||
description_en: editParam.description_en?.trim() || null,
|
||||
category: editParam.category,
|
||||
data_type: editParam.data_type,
|
||||
unit: editParam.unit?.trim() || null,
|
||||
@@ -302,6 +308,11 @@ export default function AdminActivityAttributeProfilesPage() {
|
||||
Nach Migration <strong>055</strong> werden Standard-Parameter allen Kategorien zugeordnet und vorhandene{' '}
|
||||
<code>activity_log</code>-Spalten idempotent nach EAV gespiegelt (sofern noch keine EAV-Zeile existiert).
|
||||
</li>
|
||||
<li>
|
||||
<strong>KI:</strong> Bei eigenen / unklaren Metriken kurze <strong>Beschreibung DE/EN</strong> im Katalog
|
||||
pflegen — sie erscheinen in Export/Platzhalter-Kontext (<code>training_sessions_recent_json</code>,{' '}
|
||||
<code>{'{{training_parameters_glossary_md}}'}</code>).
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -394,6 +405,23 @@ export default function AdminActivityAttributeProfilesPage() {
|
||||
onChange={(e) => setParamForm((f) => ({ ...f, name_en: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Beschreibung DE / EN (optional, für KI)</label>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
placeholder="Was bedeutet der Wert? Einheit/Skala?"
|
||||
value={paramForm.description_de}
|
||||
onChange={(e) => setParamForm((f) => ({ ...f, description_de: e.target.value }))}
|
||||
/>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
placeholder="Short meaning for prompts / EN users"
|
||||
value={paramForm.description_en}
|
||||
onChange={(e) => setParamForm((f) => ({ ...f, description_en: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Gruppe / Datentyp</label>
|
||||
<select
|
||||
@@ -468,6 +496,21 @@ export default function AdminActivityAttributeProfilesPage() {
|
||||
onChange={(e) => setEditParam((p) => ({ ...p, name_en: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Beschreibung DE / EN (optional, für KI)</label>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
value={editParam.description_de || ''}
|
||||
onChange={(e) => setEditParam((p) => ({ ...p, description_de: e.target.value }))}
|
||||
/>
|
||||
<textarea
|
||||
className="form-input"
|
||||
rows={2}
|
||||
value={editParam.description_en || ''}
|
||||
onChange={(e) => setEditParam((p) => ({ ...p, description_en: e.target.value }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label className="form-label">Gruppe / Typ</label>
|
||||
<select
|
||||
|
||||
Reference in new issue
Block a user