mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-15 05:07:35 +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',
|
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'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user