This commit is contained in:
team 1
2026-05-09 19:45:15 +02:00
parent dabbc33f07
commit d6727120ae
4 changed files with 64 additions and 12 deletions

View File

@@ -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
```

View File

@@ -624,21 +624,27 @@ document.addEventListener('DOMContentLoaded', async () => {
deduplicateRetriexSourceChips(container); deduplicateRetriexSourceChips(container);
const cards = Array.from(container.querySelectorAll('.retriex-meta-card[data-retriex-meta-id]'));
const cardsById = new Map(); 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) { if (!cardId) {
return; return;
} }
if (!cardsById.has(cardId)) { const cardKey = `${selector}:${cardId}`;
cardsById.set(cardId, []);
if (!cardsById.has(cardKey)) {
cardsById.set(cardKey, []);
} }
cardsById.get(cardId).push(card); cardsById.get(cardKey).push(card);
});
}); });
cardsById.forEach((group) => { cardsById.forEach((group) => {

View File

@@ -551,6 +551,7 @@ body:not(.retriex-show-detail-cards) #chat .retriex-alert {
/* RetrieX chat meta/status cards */ /* RetrieX chat meta/status cards */
.retriex-meta-card, .retriex-meta-card,
.retriex-action-card,
.retriex-alert { .retriex-alert {
margin: 0 0 1.5rem -.5rem; margin: 0 0 1.5rem -.5rem;
border: 0; 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); 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; padding: 0.85rem 0.95rem;
} }
@@ -685,6 +687,11 @@ body:not(.retriex-show-detail-cards) #chat .retriex-alert {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.35rem; gap: 0.35rem;
font-size: 0.7rem !important;
}
.data-retriex-action-prompt{
font-size: 0.7rem !important;
} }
.retriex-source-chip { .retriex-source-chip {

View File

@@ -4888,7 +4888,7 @@ final readonly class AgentRunner
return ''; return '';
} }
$html = '<div class="retriex-meta-card retriex-followup-actions" data-retriex-meta-id="followup-actions" data-retriex-meta-state="completed">' $html = '<div class="retriex-action-card retriex-followup-actions" data-retriex-action-card-id="followup-actions" data-retriex-action-card-state="completed">'
. '<div class="retriex-meta-card__eyebrow">' . htmlspecialchars($this->agentRunnerConfig->getProductionUiText('followup_eyebrow'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</div>' . '<div class="retriex-meta-card__eyebrow">' . htmlspecialchars($this->agentRunnerConfig->getProductionUiText('followup_eyebrow'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</div>'
. '<div class="retriex-meta-card__title">' . htmlspecialchars($this->agentRunnerConfig->getProductionUiText('followup_title'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</div>' . '<div class="retriex-meta-card__title">' . htmlspecialchars($this->agentRunnerConfig->getProductionUiText('followup_title'), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</div>'
. '<div class="retriex-action-chip-row">'; . '<div class="retriex-action-chip-row">';