enh: action __event_emitter__ support

This commit is contained in:
Timothy J. Baek 2024-08-15 23:55:31 +02:00
parent e5e1bac242
commit 8ea1a10525
2 changed files with 9 additions and 0 deletions

View File

@ -167,6 +167,14 @@
message.content += data.content; message.content += data.content;
} else if (type === 'replace') { } else if (type === 'replace') {
message.content = data.content; message.content = data.content;
} else if (type === 'action') {
if (data.action === 'continue') {
const continueButton = document.getElementById('continue-response-button');
if (continueButton) {
continueButton.click();
}
}
} else if (type === 'confirmation') { } else if (type === 'confirmation') {
eventCallback = cb; eventCallback = cb;

View File

@ -915,6 +915,7 @@
<Tooltip content={$i18n.t('Continue Response')} placement="bottom"> <Tooltip content={$i18n.t('Continue Response')} placement="bottom">
<button <button
type="button" type="button"
id="continue-response-button"
class="{isLastMessage class="{isLastMessage
? 'visible' ? 'visible'
: 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button" : 'invisible group-hover:visible'} p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg dark:hover:text-white hover:text-black transition regenerate-response-button"