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