diff --git a/src/lib/common/ProfileDropdown.svelte b/src/lib/common/ProfileDropdown.svelte
index 0ae88a33..3dd7953c 100644
--- a/src/lib/common/ProfileDropdown.svelte
+++ b/src/lib/common/ProfileDropdown.svelte
@@ -1,5 +1,6 @@
diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
index c9126041..4983f274 100644
--- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
+++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
@@ -127,6 +127,7 @@
let loadTextEditor = false;
let loadFileEditor = false;
let autoScrollLog = false;
+ let disableAction = false;
$: {
const editor = lastBotMsg?.rich_content?.editor || '';
@@ -135,6 +136,10 @@
loadEditor = !isSendingMsg && !isThinking && (loadTextEditor || loadFileEditor);
}
+ $: {
+ disableAction = currentUser?.role !== UserRole.Admin && currentUser?.id !== conversationUser?.id;
+ }
+
setContext('chat-window-context', {
autoScrollToBottom: autoScrollToBottom
});
@@ -914,12 +919,26 @@
{#if !isLoadStateLog}
- toggleStateLog()}>View States
+ toggleStateLog()}
+ >
+ View States
+
{/if}
{#if !isOpenUserAddStateModal}
- toggleUserAddStateModal()}>Add States
+ toggleUserAddStateModal()}
+ >
+ Add States
+
{/if}
- clearUserAddStates()}>Clear States
+ clearUserAddStates()}
+ >
+ Clear States
+
@@ -932,6 +951,7 @@
{#if !isLite}
-
+