This commit is contained in:
Timothy Jaeryang Baek 2026-10-12 19:24:52 +04:00
parent 9335bc26db
commit 3a54306c50
3 changed files with 10 additions and 1 deletions

View file

@ -409,6 +409,7 @@
// Non-owners may reply when the sharing mode allows it, but cannot save chat edits.
$: isShared = chat != null && chat.user_id !== $user?.id;
$: if (isShared && $showCallOverlay) showCallOverlay.set(false);
$: canClone = isShared && ($user?.role === 'admin' || ($user?.permissions?.chat?.import ?? true));
let cloning = false;
@ -2472,6 +2473,8 @@
//////////////////////////
const openCallOverlay = () => {
if (isShared) return;
if (!($user?.role === 'admin' || ($user?.permissions?.chat?.call ?? true))) {
return;
}
@ -5062,6 +5065,7 @@
{typingUsers}
on:typing={(event) => emitTyping(event.detail)}
callActive={!!(bridge?.connected || bridge?.connecting)}
callEnabled={!isShared}
bind:this={messageInput}
{history}
{taskIds}
@ -5157,6 +5161,7 @@
{typingUsers}
on:typing={(event) => emitTyping(event.detail)}
callActive={!!(bridge?.connected || bridge?.connecting)}
callEnabled={!isShared}
bind:this={messageInput}
{history}
{taskIds}
@ -5219,6 +5224,7 @@
<div class="flex items-center h-full">
<Placeholder
callActive={!!(bridge?.connected || bridge?.connecting)}
callEnabled={!isShared}
bind:selectedModelIdx
{history}
bind:selectedModels

View file

@ -155,6 +155,7 @@
export let contextCompactionEnabled = false;
export let embedded = false;
export let callActive = false;
export let callEnabled = true;
export let autoScroll = false;
export let generating = false;
@ -2717,7 +2718,7 @@
{/if}
{/if}
{#if !embedded && prompt === '' && files.length === 0 && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.call ?? true))}
{#if callEnabled && !embedded && prompt === '' && files.length === 0 && ($_user?.role === 'admin' || ($_user?.permissions?.chat?.call ?? true))}
<div class=" flex items-center">
<!-- {$i18n.t('Call')} -->
<Tooltip

View file

@ -41,6 +41,7 @@
export let autoScroll = false;
export let callActive = false;
export let callEnabled = true;
export let atSelectedModel: Model | undefined;
export let selectedModels: [''];
@ -243,6 +244,7 @@
{#if !($selectedFolder && folderReadOnly)}
<MessageInput
{callActive}
{callEnabled}
bind:this={messageInput}
{history}
bind:selectedModels