更新至 v0.11.1_20251229 版本
This commit is contained in:
@@ -181,7 +181,16 @@ const ChatBubble: React.FC<ChatBubbleProps> = ({ message, language, onUpdateMess
|
||||
prose prose-p:my-1 prose-headings:my-2 prose-strong:font-bold prose-code:bg-black/10 prose-code:rounded prose-code:px-1 prose-code:py-0.5 prose-pre:bg-slate-900 prose-pre:text-slate-100 prose-pre:rounded-lg max-w-none
|
||||
`}>
|
||||
{message.type === MessageType.TEXT ? (
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
<ReactMarkdown
|
||||
remarkPlugins={[remarkGfm]}
|
||||
components={{
|
||||
strong: ({node, ...props}) => <strong className="font-bold text-inherit" {...props} />,
|
||||
b: ({node, ...props}) => <strong className="font-bold text-inherit" {...props} />,
|
||||
ul: ({node, ...props}) => <ul className="list-disc list-outside ml-4 mb-2" {...props} />,
|
||||
ol: ({node, ...props}) => <ol className="list-decimal list-outside ml-4 mb-2" {...props} />,
|
||||
li: ({node, ...props}) => <li className="mb-0.5" {...props} />
|
||||
}}
|
||||
>
|
||||
{message.content}
|
||||
</ReactMarkdown>
|
||||
) : (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Component, ErrorInfo, ReactNode } from "react";
|
||||
import React, { ErrorInfo, ReactNode } from "react";
|
||||
import { AlertCircle, RefreshCw, Trash2 } from 'lucide-react';
|
||||
|
||||
interface Props {
|
||||
@@ -10,14 +10,11 @@ interface State {
|
||||
error: Error | null;
|
||||
}
|
||||
|
||||
export class ErrorBoundary extends Component<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasError: false,
|
||||
error: null
|
||||
};
|
||||
}
|
||||
export class ErrorBoundary extends React.Component<Props, State> {
|
||||
public state: State = {
|
||||
hasError: false,
|
||||
error: null
|
||||
};
|
||||
|
||||
public static getDerivedStateFromError(error: Error): State {
|
||||
return { hasError: true, error };
|
||||
|
||||
BIN
releases/HTY1024-APP-SKR-0.11.1_20251229.zip
Normal file
BIN
releases/HTY1024-APP-SKR-0.11.1_20251229.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user