mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 08:45:50 +00:00
feat: 添加 UI 组件增强与测试覆盖
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
src/components/messages/SnipBoundaryMessage.tsx
Normal file
23
src/components/messages/SnipBoundaryMessage.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* SnipBoundaryMessage — visual separator showing where conversation was snipped.
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import { Box, Text } from '@anthropic/ink';
|
||||
import type { Message } from '../../types/message.js';
|
||||
|
||||
type Props = {
|
||||
message: Message;
|
||||
};
|
||||
|
||||
export function SnipBoundaryMessage({ message }: Props): React.ReactNode {
|
||||
const content =
|
||||
typeof (message as Record<string, unknown>).content === 'string'
|
||||
? ((message as Record<string, unknown>).content as string)
|
||||
: '[snip] Conversation history before this point has been snipped.';
|
||||
|
||||
return (
|
||||
<Box marginTop={1} marginBottom={1}>
|
||||
<Text dimColor>── {content} ──</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user