chore: message link

This commit is contained in:
jialin
2025-01-15 12:42:09 +08:00
parent 9553aa944a
commit 5bfca0f86f
5 changed files with 51 additions and 14 deletions
@@ -304,13 +304,29 @@ const AddModal: React.FC<AddModalProps> = (props) => {
return groupList[item.value];
});
const defaultSpec =
_.find(res.items, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(res.items, `0`, {});
const list72B = _.filter(res.items, (item: CatalogSpec) => {
return item.size === 72;
});
let defaultSpec: any = {};
if (list72B.length) {
defaultSpec =
_.find(list72B, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(list72B, `0`, {});
} else {
defaultSpec =
_.find(res.items, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(res.items, `0`, {});
}
selectSpecRef.current = defaultSpec;
setSourceList(sources);
+3 -2
View File
@@ -739,17 +739,18 @@ const Models: React.FC<ModelsProps> = ({
<Space>
<Input
placeholder={intl.formatMessage({ id: 'common.filter.name' })}
style={{ width: 200 }}
style={{ width: 230 }}
size="large"
allowClear
onChange={handleNameChange}
></Input>
<Select
allowClear
showSearch={false}
placeholder={intl.formatMessage({
id: 'models.filter.category'
})}
style={{ width: 240 }}
style={{ width: 230 }}
size="large"
mode="multiple"
maxTagCount={1}