Merge pull request #89 from iFwu/main

feat: add font size config
This commit is contained in:
Yifei Zhang
2023-03-29 14:49:05 +08:00
committed by GitHub
6 changed files with 36 additions and 1 deletions

View File

@@ -178,6 +178,7 @@ export function Chat(props: { showSideBar?: () => void }) {
state.currentSession(),
state.currentSessionIndex,
]);
const fontSize = useChatStore((state) => state.config.fontSize);
const inputRef = useRef<HTMLTextAreaElement>(null);
const [userInput, setUserInput] = useState("");
@@ -406,6 +407,7 @@ export function Chat(props: { showSideBar?: () => void }) {
) : (
<div
className="markdown-body"
style={{ fontSize: `${fontSize}px` }}
onContextMenu={(e) => onRightClick(e, message)}
>
<Markdown content={message.content} />