diff --git a/src/lib/components/chat/Settings/Interface/ManageFloatingActionButtonsModal.svelte b/src/lib/components/chat/Settings/Interface/ManageFloatingActionButtonsModal.svelte index 6de35f73f1..ad7e3fe0bc 100644 --- a/src/lib/components/chat/Settings/Interface/ManageFloatingActionButtonsModal.svelte +++ b/src/lib/components/chat/Settings/Interface/ManageFloatingActionButtonsModal.svelte @@ -93,11 +93,19 @@ class="" type="button" on:click={() => { + let id = `new-button`; + let idx = 0; + + while (floatingActionButtons.some((b) => b.id === id)) { + idx++; + id = `new-button-${idx}`; + } + floatingActionButtons = [ ...floatingActionButtons, { - id: 'new-button', - label: $i18n.t('New Button'), + id: id, + label: `${$i18n.t('New Button')}`, input: true, prompt: `{{CONTENT}}\n\n\n{{INPUT_CONTENT}}` } @@ -117,17 +125,17 @@ {:else} {#each floatingActionButtons as button (button.id)}