feat: init @affine/copilot (#2511)

This commit is contained in:
Himself65
2023-05-30 18:02:49 +08:00
committed by himself65
parent 673d0f98b8
commit e78fe306a2
49 changed files with 2963 additions and 1331 deletions
@@ -0,0 +1,19 @@
import { marked } from 'marked';
import { type ReactElement, useMemo } from 'react';
export interface ConversationProps {
text: string;
}
export const Conversation = (props: ConversationProps): ReactElement => {
const html = useMemo(() => marked.parse(props.text), [props.text]);
return (
<div>
<div
dangerouslySetInnerHTML={{
__html: html,
}}
/>
</div>
);
};
@@ -0,0 +1,5 @@
import { type ReactElement } from 'react';
export const Divider = (): ReactElement => {
return <hr style={{ borderTop: '1px solid #ddd' }} />;
};