feat: update Makelore modules and conversations
This commit is contained in:
@@ -251,7 +251,7 @@ describe('ChatMessage current-view controls', () => {
|
||||
});
|
||||
|
||||
describe('ChatMessage bubble surface styling', () => {
|
||||
it('uses the NITU light paper palette for user and assistant message backgrounds', () => {
|
||||
it('uses the Makelore light paper palette for user and assistant message backgrounds', () => {
|
||||
const userMessage: RawMessage = {
|
||||
role: 'user',
|
||||
content: [{ type: 'text', text: 'Please inspect this prototype.' }],
|
||||
@@ -264,18 +264,20 @@ describe('ChatMessage bubble surface styling', () => {
|
||||
const { rerender } = render(<ChatMessage message={userMessage} />);
|
||||
|
||||
expect(screen.getByTestId('chat-message-bubble-user')).toHaveClass(
|
||||
'bg-[#DCE6EF]',
|
||||
'text-[#26384D]',
|
||||
'shadow-[3px_3px_0_#26384D]',
|
||||
'chat-user-message-surface',
|
||||
'bg-brand-soft',
|
||||
'text-foreground',
|
||||
'shadow-soft',
|
||||
);
|
||||
expect(screen.getByTestId('chat-message-bubble-user')).not.toHaveClass('bg-[#168fff]', 'text-white');
|
||||
|
||||
rerender(<ChatMessage message={assistantMessage} />);
|
||||
|
||||
expect(screen.getByTestId('chat-message-bubble-assistant')).toHaveClass(
|
||||
'bg-[#FFFFFF]',
|
||||
'text-[#26384D]',
|
||||
'shadow-[3px_3px_0_#26384D]',
|
||||
'chat-assistant-message-surface',
|
||||
'bg-background',
|
||||
'text-foreground',
|
||||
'shadow-soft',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -299,6 +301,28 @@ describe('ChatMessage LaTeX rendering', () => {
|
||||
expect(screen.getByRole('img', { name: '小码头像' })).toHaveAttribute('src', '/avatar-16.png');
|
||||
});
|
||||
|
||||
it('reserves the assistant column without painting a second avatar', () => {
|
||||
const message: RawMessage = { role: 'assistant', content: '最终回答。' };
|
||||
render(<ChatMessage message={message} assistantAvatarSrc="/avatar-16.png" assistantAvatarMode="reserved" />);
|
||||
|
||||
expect(screen.queryByTestId('chat-message-avatar-assistant')).not.toBeInTheDocument();
|
||||
expect(screen.getByTestId('chat-message-avatar-reserved')).toHaveAttribute('aria-hidden', 'true');
|
||||
expect(screen.queryByRole('img')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('compacts the assistant reply that follows an execution trace', () => {
|
||||
const message: RawMessage = { role: 'assistant', content: '最终回答。' };
|
||||
render(
|
||||
<ChatMessage
|
||||
message={message}
|
||||
assistantAvatarMode="reserved-trace"
|
||||
compactAssistantReply
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByTestId('chat-message-bubble-assistant')).toHaveClass('pt-1', 'pb-3');
|
||||
});
|
||||
|
||||
it('renders inline `$...$` math with KaTeX', () => {
|
||||
const message: RawMessage = {
|
||||
role: 'assistant',
|
||||
|
||||
Reference in New Issue
Block a user