refactor(ToolConfigs): use optional chaining for content retrieval

This commit is contained in:
Haileyesus
2026-02-12 22:20:13 +03:00
parent 4c387808ed
commit 0306f8d59b

View File

@@ -343,7 +343,7 @@ export const TOOL_CONFIGS: Record<string, ToolDisplayConfig> = {
title: 'Task list', title: 'Task list',
contentType: 'task', contentType: 'task',
getContentProps: (result) => ({ getContentProps: (result) => ({
content: String(result.content || '') content: String(result?.content || '')
}) })
} }
}, },
@@ -366,7 +366,7 @@ export const TOOL_CONFIGS: Record<string, ToolDisplayConfig> = {
title: 'Task details', title: 'Task details',
contentType: 'task', contentType: 'task',
getContentProps: (result) => ({ getContentProps: (result) => ({
content: String(result.content || '') content: String(result?.content || '')
}) })
} }
}, },
@@ -535,7 +535,7 @@ export const TOOL_CONFIGS: Record<string, ToolDisplayConfig> = {
type: 'collapsible', type: 'collapsible',
contentType: 'text', contentType: 'text',
getContentProps: (result) => ({ getContentProps: (result) => ({
content: String(result.content || ''), content: String(result?.content || ''),
format: 'plain' format: 'plain'
}) })
} }