fix: chat stream data too long

This commit is contained in:
jialin
2025-11-06 15:37:42 +08:00
parent 38cc179068
commit e1e38f0404
7 changed files with 68 additions and 39 deletions
@@ -366,8 +366,6 @@ const AddModal: FC<AddModalProps> = (props) => {
evaluateStateRef.current.state === EvaluateProccess.model &&
item.evaluated
) {
handleShowCompatibleAlert(item.evaluateResult);
const newFormValues = {
...(manual
? { ...defaultFormValues }
@@ -21,9 +21,9 @@ import SearchInput from './search-input';
import SearchResult from './search-result';
const filterOptions = [
{ label: 'FP8', value: 'fp8' },
{ label: 'AWQ', value: 'awq' },
{ label: 'GPTQ', value: 'gptq' },
{ label: 'GGUF', value: 'gguf' }
{ label: 'GPTQ', value: 'gptq' }
];
const PaginationMain = styled(Pagination)`
.ant-pagination-slash {
@@ -541,8 +541,10 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
onChange={handleFilterChange}
options={filterOptions}
size="middle"
placeholder={intl.formatMessage({ id: 'common.input.type' })}
style={{ width: 120 }}
placeholder={intl.formatMessage({
id: 'models.form.quantization'
})}
style={{ width: 130 }}
></BaseSelect>
</span>
<PaginationMain
+10
View File
@@ -29,3 +29,13 @@ export async function deleteUser(id: number) {
method: 'DELETE'
});
}
export async function updateUserStatus(params: {
id: number;
data: { is_active: boolean };
}) {
return request(`${USERS_API}/${params.id}/activation`, {
method: 'PATCH',
data: params.data
});
}
+18 -2
View File
@@ -23,6 +23,16 @@ const actionList: Global.ActionItem[] = [
key: 'edit',
icon: icons.EditOutlined
},
{
label: 'Active Account',
key: 'active',
icon: icons.EditOutlined
},
{
label: 'Deactivate Account',
key: 'inactive',
icon: icons.EditOutlined
},
{
label: 'common.button.delete',
key: 'delete',
@@ -40,8 +50,14 @@ const useUsersColumns = ({
const setActions = useMemoizedFn((record: ListItem) => {
return actionList.filter((action) => {
if (initialState?.currentUser?.id === record.id) {
return action.key !== 'delete';
if (action.key === 'delete') {
return initialState?.currentUser?.id !== record.id;
}
if (action.key === 'active') {
return !record.is_active && initialState?.currentUser?.id !== record.id;
}
if (action.key === 'inactive') {
return record.is_active && initialState?.currentUser?.id !== record.id;
}
return true;
});