diff --git a/patch_history/RETRIEX_PATCH_68_FOLLOWUP_ACTIONS_ALWAYS_VISIBLE_README.md b/patch_history/RETRIEX_PATCH_68_FOLLOWUP_ACTIONS_ALWAYS_VISIBLE_README.md new file mode 100644 index 0000000..5fc9419 --- /dev/null +++ b/patch_history/RETRIEX_PATCH_68_FOLLOWUP_ACTIONS_ALWAYS_VISIBLE_README.md @@ -0,0 +1,39 @@ +# RetrieX Patch p68 – Follow-up Actions Always Visible + +## Ziel + +Follow-up-Actions aus p67 sollen nicht vom Frontend-Schalter „Status-Info anzeigen“ abhängen. Wenn der Agent sie kontextsensitiv rendert, sollen sie als echte nächste Handlung immer sichtbar bleiben. + +## Änderung + +- Die Follow-up-Actions-Card wird nicht mehr als `retriex-meta-card`, sondern als eigenständige `retriex-action-card` gerendert. +- Die CSS-Regel für ausgeblendete Detail-/Statuskarten bleibt unverändert und betrifft weiterhin nur `retriex-meta-card` und `retriex-alert`. +- `retriex-action-card` erhält dieselbe visuelle Card-Basis wie Meta-Cards, wird aber nicht durch `body:not(.retriex-show-detail-cards)` versteckt. +- Frontend-Deduplizierung berücksichtigt zusätzlich Action-Cards mit `data-retriex-action-card-id`. + +## Bewusst nicht geändert + +- Keine Änderung an Retrieval, Scoring, Ranking, Intent-Erkennung, Shop-Matching oder PromptBuilder. +- Keine Änderung an den p67-Kontextguards: Actions erscheinen weiterhin nur, wenn p67 sie als sinnvoll einstuft. +- Keine Änderung am bestehenden Status-Info-Schalter; dieser blendet weiterhin technische Status-/Meta-/Alert-Karten ein und aus. + +## Geänderte Dateien + +- `src/Agent/AgentRunner.php` +- `public/assets/styles/base.css` +- `public/assets/js/base.js` + +## Lokale Checks + +```bash +php -l src/Agent/AgentRunner.php +node --check public/assets/js/base.js +``` + +## Empfohlene Checks in der Zielumgebung + +```bash +bin/console mto:agent:config:validate +bin/console mto:agent:regression:test +bin/console mto:agent:config:audit-source --details +``` diff --git a/public/assets/js/base.js b/public/assets/js/base.js index 7ab94dc..4391d26 100644 --- a/public/assets/js/base.js +++ b/public/assets/js/base.js @@ -624,21 +624,27 @@ document.addEventListener('DOMContentLoaded', async () => { deduplicateRetriexSourceChips(container); - const cards = Array.from(container.querySelectorAll('.retriex-meta-card[data-retriex-meta-id]')); const cardsById = new Map(); - cards.forEach((card) => { - const cardId = card.getAttribute('data-retriex-meta-id'); + [ + ['.retriex-meta-card[data-retriex-meta-id]', 'data-retriex-meta-id'], + ['.retriex-action-card[data-retriex-action-card-id]', 'data-retriex-action-card-id'], + ].forEach(([selector, idAttribute]) => { + Array.from(container.querySelectorAll(selector)).forEach((card) => { + const cardId = card.getAttribute(idAttribute); - if (!cardId) { - return; - } + if (!cardId) { + return; + } - if (!cardsById.has(cardId)) { - cardsById.set(cardId, []); - } + const cardKey = `${selector}:${cardId}`; - cardsById.get(cardId).push(card); + if (!cardsById.has(cardKey)) { + cardsById.set(cardKey, []); + } + + cardsById.get(cardKey).push(card); + }); }); cardsById.forEach((group) => { diff --git a/public/assets/styles/base.css b/public/assets/styles/base.css index 621147f..852f5a6 100644 --- a/public/assets/styles/base.css +++ b/public/assets/styles/base.css @@ -551,6 +551,7 @@ body:not(.retriex-show-detail-cards) #chat .retriex-alert { /* RetrieX chat meta/status cards */ .retriex-meta-card, +.retriex-action-card, .retriex-alert { margin: 0 0 1.5rem -.5rem; border: 0; @@ -559,7 +560,8 @@ body:not(.retriex-show-detail-cards) #chat .retriex-alert { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); } -.retriex-meta-card { +.retriex-meta-card, +.retriex-action-card { padding: 0.85rem 0.95rem; } @@ -685,6 +687,11 @@ body:not(.retriex-show-detail-cards) #chat .retriex-alert { display: flex; flex-wrap: wrap; gap: 0.35rem; + font-size: 0.7rem !important; +} + +.data-retriex-action-prompt{ + font-size: 0.7rem !important; } .retriex-source-chip { diff --git a/src/Agent/AgentRunner.php b/src/Agent/AgentRunner.php index b961ff9..71be84f 100644 --- a/src/Agent/AgentRunner.php +++ b/src/Agent/AgentRunner.php @@ -4888,7 +4888,7 @@ final readonly class AgentRunner return ''; } - $html = '