diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx
index 4bdb7ae..f691303 100644
--- a/src/app/(dashboard)/page.tsx
+++ b/src/app/(dashboard)/page.tsx
@@ -261,7 +261,7 @@ export default async function Dashboard({
No sessions yet, create one to get started.
-
+
diff --git a/src/app/api/v1/sessions/[id]/route.ts b/src/app/api/v1/sessions/[id]/route.ts
index 56f522a..73f75fe 100644
--- a/src/app/api/v1/sessions/[id]/route.ts
+++ b/src/app/api/v1/sessions/[id]/route.ts
@@ -48,6 +48,8 @@ const ALLOWED_UPDATE_FIELDS: (keyof UpdateSessionRequest)[] = [
'context',
'critical',
'prompt',
+ 'cross_pollination',
+ 'distribution',
];
export async function PATCH(
@@ -78,6 +80,11 @@ export async function PATCH(
update.prompt_summary = update.prompt.substring(0, 500);
}
+ // Serialize distribution array to JSON string for storage
+ if (update.distribution !== undefined) {
+ update.distribution = update.distribution ? JSON.stringify(update.distribution) : null;
+ }
+
if (Object.keys(update).length === 0) {
return validationError(
'No valid fields provided. Allowed fields: ' +
diff --git a/src/lib/api-types.ts b/src/lib/api-types.ts
index 7b92ec7..87504dc 100644
--- a/src/lib/api-types.ts
+++ b/src/lib/api-types.ts
@@ -47,6 +47,8 @@ export interface UpdateSessionRequest {
context?: string;
critical?: string;
prompt?: string;
+ cross_pollination?: boolean;
+ distribution?: DistributionTarget[];
}
export interface SessionCreated extends SessionListItem {