Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { omit } from 'lodash';
import { validate as uuidValidate } from 'uuid';
import { schema } from '@kbn/config-schema';
import path from 'node:path';
import type { Observable } from 'rxjs';
Expand Down Expand Up @@ -73,6 +74,7 @@ export function registerChatRoutes({
),
conversation_id: schema.maybe(
schema.string({
validate: (v) => (uuidValidate(v) ? undefined : 'conversation_id must be a valid UUID'),
meta: {
description: 'Optional existing conversation ID to continue a previous conversation.',
},
Expand Down Expand Up @@ -301,6 +303,7 @@ export function registerChatRoutes({
agentId,
connectorId,
conversationId,
autoCreateConversationWithId: true,
capabilities,
browserApiTools,
configurationOverrides,
Expand Down
Loading