fix: reranker item uid updated, chat image size issue, #2280
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
}
|
||||
|
||||
.single-image {
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
width: inherit;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -23,7 +23,7 @@ const dompurifyOptions = {
|
||||
};
|
||||
|
||||
const cleanHtml = (html: string): string => {
|
||||
return DOMPurify.sanitize(html, dompurifyOptions);
|
||||
return DOMPurify?.sanitize?.(html, dompurifyOptions);
|
||||
};
|
||||
|
||||
const MarkdownViewer: React.FC<MarkdownViewerProps> = ({
|
||||
|
||||
@@ -615,6 +615,7 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
{renderDistributionInfo(
|
||||
instanceData.distributed_servers?.rpc_servers ||
|
||||
instanceData.distributed_servers?.ray_actors ||
|
||||
instanceData.distributed_servers?.subordinate_workers ||
|
||||
[]
|
||||
)}
|
||||
</span>
|
||||
|
||||
@@ -90,6 +90,7 @@ export interface ModelInstanceListItem {
|
||||
distributed_servers?: {
|
||||
rpc_servers: DistributedServerItem[];
|
||||
ray_actors: DistributedServerItem[];
|
||||
subordinate_workers: DistributedServerItem[];
|
||||
};
|
||||
computed_resource_claim?: ComputedResourceClaim;
|
||||
s3_address: string;
|
||||
|
||||
@@ -88,7 +88,6 @@ const fieldConfig: ParamsSchema[] = [
|
||||
const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
const { modelList } = props;
|
||||
|
||||
const messageId = useRef<number>(0);
|
||||
const intl = useIntl();
|
||||
const requestSource = useRequestToken();
|
||||
const [show, setShow] = useState(false);
|
||||
@@ -236,8 +235,8 @@ const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
};
|
||||
|
||||
const setMessageId = () => {
|
||||
messageId.current = messageId.current + 1;
|
||||
return messageId.current;
|
||||
const uid = inputListRef.current?.setMessageId();
|
||||
return uid;
|
||||
};
|
||||
|
||||
const handleStopConversation = () => {
|
||||
@@ -414,12 +413,12 @@ const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
setTextList([
|
||||
{
|
||||
text: '',
|
||||
uid: -1,
|
||||
uid: setMessageId(),
|
||||
name: ''
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
uid: -2,
|
||||
uid: setMessageId(),
|
||||
name: ''
|
||||
}
|
||||
]);
|
||||
@@ -530,7 +529,6 @@ const GroundReranker: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
</div>
|
||||
<div className="docs-wrapper">
|
||||
<InputList
|
||||
key={messageId.current}
|
||||
ref={inputListRef}
|
||||
textList={textList}
|
||||
showLabel={false}
|
||||
|
||||
@@ -17,6 +17,8 @@ import ThinkContent from './think-content';
|
||||
|
||||
const AudioWrapper = styled.div`
|
||||
padding-top: 10px;
|
||||
height: max-content;
|
||||
margin-right: 10px;
|
||||
`;
|
||||
|
||||
interface MessageBodyProps {
|
||||
|
||||
Reference in New Issue
Block a user