feat: configurable Enter/Shift+Enter send behavior in embedded chat (#32295) (#32300)

This commit is contained in:
agent-steven
2026-03-10 12:44:11 +09:00
committed by GitHub
parent 504138bb23
commit 2a3cc2951b
5 changed files with 35 additions and 2 deletions

View File

@@ -135,6 +135,11 @@
config.baseUrl || `https://${config.isDev ? "dev." : ""}udify.app`;
const targetOrigin = new URL(baseUrl).origin;
// Pass sendOnEnter config as URL parameter
if (config.sendOnEnter === false) {
params.set('sendOnEnter', 'false');
}
// pre-check the length of the URL
const iframeUrl = `${baseUrl}/chatbot/${config.token}?${params}`;
// 1) CREATE the iframe immediately, so it can load in the background: