Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: Return parentChatId after branching

Blue Mousef2c60c69ae3f
diff --git a/backend/apps/cloud/src/ai/ai.controller.ts b/backend/apps/cloud/src/ai/ai.controller.ts
index fea0f063d..433d9b6f3 100644
--- a/backend/apps/cloud/src/ai/ai.controller.ts
+++ b/backend/apps/cloud/src/ai/ai.controller.ts
@@ -910,6 +910,7 @@ export class AiController {
created: branchedChat.created,
updated: branchedChat.updated,
branched: true,
+ parentChatId: branchedChat.parentChatId ?? existingChat.id,
}
}