fix(chat): show follow-up chips on ALL assistant messages, not just streaming
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
This commit is contained in:
parent
b308a80332
commit
036c959102
@ -2727,6 +2727,20 @@ function addMessage(role, content, animate = true, techInfo = null) {
|
||||
}
|
||||
}
|
||||
|
||||
// Add follow-up chips to the LAST assistant message
|
||||
if (role === 'assistant') {
|
||||
// Remove chips from any previous assistant message
|
||||
document.querySelectorAll('.follow-up-suggestions').forEach(el => el.remove());
|
||||
const suggestions = document.createElement('div');
|
||||
suggestions.className = 'follow-up-suggestions';
|
||||
suggestions.innerHTML = `
|
||||
<button class="suggestion-chip small" onclick="sendSuggestion('Podaj telefony i strony WWW TYLKO do firm które polecileś powyżej — nie dodawaj żadnych innych')">📞 Kontakt do poleconych</button>
|
||||
<button class="suggestion-chip small" onclick="sendSuggestion('Powiedz więcej o tych firmach — czym się dokładnie zajmują i dlaczego pasują')">📋 Więcej szczegółów</button>
|
||||
<button class="suggestion-chip small" onclick="sendSuggestion('Jakie inne firmy z Izby mogłyby pomóc w tym temacie?')">🔍 Inne firmy</button>
|
||||
`;
|
||||
contentDiv.appendChild(suggestions);
|
||||
}
|
||||
|
||||
messageDiv.appendChild(avatar);
|
||||
messageDiv.appendChild(contentDiv);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user