u
This commit is contained in:
@@ -177,14 +177,17 @@ function MessageRow({ msg, showTime = true }) {
|
||||
bodyLength = textContent.length;
|
||||
}
|
||||
|
||||
let displayText = '';
|
||||
if (resObj && ('answer' in resObj || 'content' in resObj) && ('tool_call_id' in resObj) && !('status' in resObj)) {
|
||||
displayText = resObj.answer || resObj.content || '';
|
||||
} else {
|
||||
displayText = statusText
|
||||
const isToolAnswer =
|
||||
Boolean(resObj) &&
|
||||
('answer' in resObj || 'content' in resObj) &&
|
||||
'tool_call_id' in resObj &&
|
||||
!('status' in resObj);
|
||||
|
||||
const displayText = isToolAnswer
|
||||
? resObj.answer || resObj.content || ''
|
||||
: statusText
|
||||
? `${statusText}${bodyLength != null ? ` · ${bodyLength} byte` : ''}`
|
||||
: (bodyLength != null ? `${bodyLength} byte` : String(textContent));
|
||||
}
|
||||
|
||||
return (
|
||||
<Box sx={{ display: 'flex', justifyContent: 'flex-start', py: 0.35, px: 2 }}>
|
||||
|
||||
Reference in New Issue
Block a user