From 0306f8d59b98ee07ace49a3421ffac7516a58167 Mon Sep 17 00:00:00 2001 From: Haileyesus Date: Thu, 12 Feb 2026 22:20:13 +0300 Subject: [PATCH] refactor(ToolConfigs): use optional chaining for content retrieval --- src/components/chat/tools/configs/toolConfigs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/chat/tools/configs/toolConfigs.ts b/src/components/chat/tools/configs/toolConfigs.ts index 39934b4..3bb4219 100644 --- a/src/components/chat/tools/configs/toolConfigs.ts +++ b/src/components/chat/tools/configs/toolConfigs.ts @@ -343,7 +343,7 @@ export const TOOL_CONFIGS: Record = { title: 'Task list', contentType: 'task', getContentProps: (result) => ({ - content: String(result.content || '') + content: String(result?.content || '') }) } }, @@ -366,7 +366,7 @@ export const TOOL_CONFIGS: Record = { title: 'Task details', contentType: 'task', getContentProps: (result) => ({ - content: String(result.content || '') + content: String(result?.content || '') }) } }, @@ -535,7 +535,7 @@ export const TOOL_CONFIGS: Record = { type: 'collapsible', contentType: 'text', getContentProps: (result) => ({ - content: String(result.content || ''), + content: String(result?.content || ''), format: 'plain' }) }