Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: slove group member plugin is lost & not use the plugins (#11802)

Shinji-Lie4ebd402ee30
diff --git a/src/app/[variants]/(main)/community/(detail)/group_agent/features/Sidebar/ActionButton/ForkGroupAndChat.tsx b/src/app/[variants]/(main)/community/(detail)/group_agent/features/Sidebar/ActionButton/ForkGroupAndChat.tsx
index 825d1aefa14..9db25fc959c 100644
--- a/src/app/[variants]/(main)/community/(detail)/group_agent/features/Sidebar/ActionButton/ForkGroupAndChat.tsx
+++ b/src/app/[variants]/(main)/community/(detail)/group_agent/features/Sidebar/ActionButton/ForkGroupAndChat.tsx
@@ -104,9 +104,11 @@ const ForkGroupAndChat = memo<{ mobile?: boolean }>(() => {
const rawConfig = {
avatar: currentVersion.avatar,
backgroundColor: currentVersion.backgroundColor,
+ chatConfig: currentVersion.config?.chatConfig || currentVersion.chatConfig,
description: currentVersion.description,
model: currentVersion.config?.model || currentVersion.model,
params: currentVersion.config?.params || currentVersion.params,
+ plugins: currentVersion.config?.plugins || currentVersion.plugins,
provider: currentVersion.config?.provider || currentVersion.provider,
systemRole:
currentVersion.config?.systemRole ||
@@ -149,9 +151,10 @@ const ForkGroupAndChat = memo<{ mobile?: boolean }>(() => {
return {
avatar: currentVersion.avatar,
backgroundColor: currentVersion.backgroundColor,
+ chatConfig: currentVersion.config?.chatConfig || currentVersion.chatConfig,
description: currentVersion.description,
model: currentVersion.config?.model || currentVersion.model,
- plugins: currentVersion.plugins,
+ plugins: currentVersion.config?.plugins || currentVersion.plugins,
provider: currentVersion.config?.provider || currentVersion.provider,
systemRole:
currentVersion.config?.systemRole ||
diff --git a/src/app/[variants]/(main)/group/profile/features/Header/GroupPublishButton/useMarketGroupPublish.ts b/src/app/[variants]/(main)/group/profile/features/Header/GroupPublishButton/useMarketGroupPublish.ts
index b7849bb32a2..e138e69b056 100644
--- a/src/app/[variants]/(main)/group/profile/features/Header/GroupPublishButton/useMarketGroupPublish.ts
+++ b/src/app/[variants]/(main)/group/profile/features/Header/GroupPublishButton/useMarketGroupPublish.ts
@@ -113,6 +113,12 @@ export const useMarketGroupPublish = ({ action, onSuccess }: UseMarketGroupPubli
model: agent.model,
params: agent.params,
systemRole: agent.systemRole,
+ // Include plugins if they exist
+ ...(agent.plugins && agent.plugins.length > 0 ? { plugins: agent.plugins } : {}),
+ // Include provider if it exists
+ ...(agent.provider ? { provider: agent.provider } : {}),
+ // Include chatConfig if it exists
+ ...(agent.chatConfig ? { chatConfig: agent.chatConfig } : {}),
},
// Market requires at least 1 character for description
description: agent.description || 'No description provided',