feat: 添加 UI 组件增强与测试覆盖

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
unraid
2026-04-22 22:38:10 +08:00
parent 23bb09d240
commit 23fcbf9004
13 changed files with 1332 additions and 1299 deletions

View 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>
);
}