🤯 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.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat(server): add batchMoveTopics TRPC mutation (#15793)
Arvin Xu21a1b45fa1d6
diff --git a/apps/server/src/routers/lambda/topic.ts b/apps/server/src/routers/lambda/topic.tsindex 1856562a624..1d27afa904f 100644--- a/apps/server/src/routers/lambda/topic.ts+++ b/apps/server/src/routers/lambda/topic.ts@@ -162,6 +162,18 @@ export const topicRouter = router({return ctx.topicModel.batchDeleteBySessionId(resolved.sessionId);}),+ batchMoveTopics: topicProcedure+ .use(withScopedPermission('topic:update'))+ .input(+ z.object({+ targetAgentId: z.string(),+ topicIds: z.array(z.string()),+ }),+ )+ .mutation(async ({ input, ctx }) => {+ return ctx.topicModel.batchMoveToAgent(input.topicIds, input.targetAgentId);+ }),+cloneTopic: topicProcedure.use(withScopedPermission('topic:create')).input(z.object({ id: z.string(), newTitle: z.string().optional() }))diff --git a/src/services/topic/index.ts b/src/services/topic/index.tsindex ff1c9aaa2f6..466451a4887 100644--- a/src/services/topic/index.ts+++ b/src/services/topic/index.ts@@ -32,6 +32,10 @@ export class TopicService {return lambdaClient.topic.cloneTopic.mutate({ id, newTitle });};+ batchMoveTopics = (topicIds: string[], targetAgentId: string) => {+ return lambdaClient.topic.batchMoveTopics.mutate({ targetAgentId, topicIds });+ };+importTopic = (params: {agentId: string;data: string;