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