Improve AI chat UX (#17974)

## Summary
- update AI chat message typography and list line-height for readability
- apply richer markdown-section styling for headings, spacing,
separators, and inline code
- keep links non-underlined by default with underline on hover, using
accent11 for link color
- preserve previous AI chat table design while keeping other markdown
improvements

## Validation
- yarn eslint
packages/twenty-front/src/modules/ai/components/LazyMarkdownRenderer.tsx
packages/twenty-front/src/modules/ai/components/AIChatMessage.tsx

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
Thomas des Francs
2026-02-17 11:24:33 +01:00
committed by GitHub
parent aac032e517
commit 9477bb3677
29 changed files with 1636 additions and 165 deletions
@@ -0,0 +1,44 @@
import { type ExtendedUIMessagePart } from 'twenty-shared/ai';
import { type AssistantMessageRenderItem } from '@/ai/utils/assistantMessageRenderItem';
import { isThinkingStepPart } from '@/ai/utils/isThinkingStepPart';
import { type ThinkingStepPart } from '@/ai/utils/thinkingStepPart';
export const groupContiguousThinkingStepParts = (
parts: ExtendedUIMessagePart[],
): AssistantMessageRenderItem[] => {
const renderItems: AssistantMessageRenderItem[] = [];
let currentThinkingParts: ThinkingStepPart[] = [];
const flushThinkingParts = () => {
if (currentThinkingParts.length > 0) {
renderItems.push({
type: 'thinking-steps',
parts: currentThinkingParts,
});
currentThinkingParts = [];
}
};
for (const part of parts) {
if (part.type === 'step-start') {
continue;
}
if (isThinkingStepPart(part)) {
currentThinkingParts.push(part);
continue;
}
flushThinkingParts();
renderItems.push({
type: 'part',
part,
});
}
flushThinkingParts();
return renderItems;
};