diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index a0438899ad..7430fa9a30 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -538,7 +538,7 @@ id.startsWith('agent:')); $: if (history.messages) { const source = history.messages[messageId]; if (source) { @@ -461,6 +463,7 @@ }; const saveAsCopyHandler = async () => { + if (!canBranch) return; if (editedOutput) { editMessage(message.id, { output: editedOutput }); } else { @@ -832,15 +835,17 @@
- + {#if canBranch} + + {/if}
@@ -1420,7 +1425,7 @@ {/if} - {#if isLastMessage && ($user?.role === 'admin' || ($user?.permissions?.chat?.continue_response ?? true))} + {#if canBranch && isLastMessage && ($user?.role === 'admin' || ($user?.permissions?.chat?.continue_response ?? true))} - + {#if canBranch} + + {/if}