diff --git a/front/components/assistant/Sharing.tsx b/front/components/assistant/Sharing.tsx
index 1ea6b8684dc3..312318edba0a 100644
--- a/front/components/assistant/Sharing.tsx
+++ b/front/components/assistant/Sharing.tsx
@@ -109,6 +109,7 @@ export function SharingButton({
newScope,
setNewScope,
baseUrl,
+ showSlackIntegration,
slackDataSource,
slackChannelSelected,
setNewLinkedSlackChannels,
@@ -119,6 +120,7 @@ export function SharingButton({
newScope: NonGlobalScope;
setNewScope: (scope: NonGlobalScope) => void;
baseUrl: string;
+ showSlackIntegration: boolean;
slackDataSource: DataSourceType | null;
slackChannelSelected: SlackChannel[];
setNewLinkedSlackChannels: (channels: SlackChannel[]) => void;
@@ -193,48 +195,50 @@ export function SharingButton({
-
-
-
- Slack integration
-
-
- {slackChannelSelected.length === 0 ? (
- <>Set as default assistant for specific channels.>
- ) : (
- <>
- Default assistant for{" "}
- {slackChannelSelected
- .map((c) => c.slackChannelName)
- .join(", ")}
- >
- )}
-
+ {showSlackIntegration && (
+
+
+
+ Slack integration
+
+
+ {slackChannelSelected.length === 0 ? (
+ <>Set as default assistant for specific channels.>
+ ) : (
+ <>
+ Default assistant for{" "}
+ {slackChannelSelected
+ .map((c) => c.slackChannelName)
+ .join(", ")}
+ >
+ )}
+
-
- {slackChannelSelected.length > 0 && (
-
+
+ 0}
+ onClick={() => {
+ if (slackChannelSelected.length > 0) {
+ setNewLinkedSlackChannels([]);
+ } else {
+ setSlackDrawerOpened(true);
+ }
+ }}
+ />
-
- 0}
- onClick={() => {
- if (slackChannelSelected.length > 0) {
- setNewLinkedSlackChannels([]);
- } else {
- setSlackDrawerOpened(true);
- }
- }}
- />
-
-
+ )}
{agentConfigurationId && (
diff --git a/front/components/assistant_builder/AssistantBuilder.tsx b/front/components/assistant_builder/AssistantBuilder.tsx
index 7afff127bbd8..947c9294d1a0 100644
--- a/front/components/assistant_builder/AssistantBuilder.tsx
+++ b/front/components/assistant_builder/AssistantBuilder.tsx
@@ -203,6 +203,9 @@ export default function AssistantBuilder({
}
);
+ const showSlackIntegration =
+ builderState.scope === "workspace" || builderState.scope === "published";
+
const [edited, setEdited] = useState(defaultIsEdited ?? false);
const [isSavingOrDeleting, setIsSavingOrDeleting] = useState(false);
const [submitEnabled, setSubmitEnabled] = useState(false);
@@ -434,6 +437,7 @@ export default function AssistantBuilder({