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.

🔨 feat: support workspace mem (#15971)

Rdmclin2da3412e2023e
diff --git a/packages/types/src/user/preference.ts b/packages/types/src/user/preference.ts
index ab66a24ba2d..2b9699ac282 100644
--- a/packages/types/src/user/preference.ts
+++ b/packages/types/src/user/preference.ts
@@ -84,6 +84,12 @@ export interface UserPreference {
* lab experimental features
*/
lab?: UserLab;
+ /**
+ * Last active workspace id. Used on cloud to land the user back in the
+ * workspace they last used when they open `/` — `null` means personal
+ * context. Stored as id (not slug) so workspace renames don't invalidate it.
+ */
+ lastWorkspaceId?: string | null;
/**
* @deprecated Use settings.general.telemetry instead
*/
@@ -155,6 +161,7 @@ export const UserPreferenceSchema = z
guide: UserGuideSchema.optional(),
hideSyncAlert: z.boolean().optional(),
lab: UserLabSchema.optional(),
+ lastWorkspaceId: z.string().nullable().optional(),
telemetry: z.boolean().nullable(),
topicGroupMode: z.enum(['byTime', 'byProject', 'flat', 'byStatus']).optional(),
topicIncludeCompleted: z.boolean().optional(),