mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-14 20:57:32 +00:00
refactor(ToolConfigs): use optional chaining for content retrieval
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user