From 1c00ee88fa71eeac4d73c5a6398ee5304929c5e7 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Fri, 27 Jun 2025 16:21:16 +0200 Subject: [PATCH] fix type error - narrow type after find --- .../onechat/public/application/hooks/use_conversation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/onechat/public/application/hooks/use_conversation.ts b/x-pack/platform/plugins/shared/onechat/public/application/hooks/use_conversation.ts index 47f720adce503..5b135811a2a3c 100644 --- a/x-pack/platform/plugins/shared/onechat/public/application/hooks/use_conversation.ts +++ b/x-pack/platform/plugins/shared/onechat/public/application/hooks/use_conversation.ts @@ -69,7 +69,9 @@ const createActions = ({ }, setToolCallResult: ({ result, toolCallId }: { result: string; toolCallId: string }) => { setCurrentRound((round) => { - const step = round.steps.find((s) => isToolCallStep(s) && s.toolCallId === toolCallId); + const step = round.steps.find( + (s) => isToolCallStep(s) && s.toolCallId === toolCallId + ) as ToolCallStep; if (step) { step.result = result; }