🐛(summarize) fix the summarization tool loader

When the loader was not in the proper place.
This commit is contained in:
Quentin BEY
2025-11-06 23:17:41 +01:00
parent c83c8c7da7
commit b33a3e4987
2 changed files with 18 additions and 2 deletions
@@ -701,7 +701,23 @@ export const Chat = ({
>
<Loader />
<Text $variation="600" $size="md">
{t('Search...')}
{(() => {
const toolInvocation = message.parts?.find(
(part) =>
part.type === 'tool-invocation' &&
part.toolInvocation.toolName !==
'document_parsing',
);
if (
toolInvocation?.type ===
'tool-invocation' &&
toolInvocation.toolInvocation.toolName ===
'summarize'
) {
return t('Summarizing...');
}
return t('Search...');
})()}
</Text>
</Box>
)}
@@ -68,7 +68,7 @@ export const ToolInvocationItem: React.FC<ToolInvocationItemProps> = ({
>
<Loader />
<Text $variation="600" $size="md">
{toolInvocation.toolName === 'summarize' ? t('Summarizing...') : t('Search...')}
{t('Search...')}
</Text>
</Box>
)}