fix: textarea scroll bar, deactive count message
This commit is contained in:
@@ -317,6 +317,7 @@ const VersionsForm: React.FC<AddModalProps> = ({
|
||||
style={{ marginBottom: 0 }}
|
||||
>
|
||||
<SealInput.TextArea
|
||||
allowClear
|
||||
label={intl.formatMessage({ id: 'backend.runCommand' })}
|
||||
></SealInput.TextArea>
|
||||
</Form.Item>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealTextArea from '@/components/seal-form/seal-textarea';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form } from 'antd';
|
||||
@@ -85,9 +86,10 @@ const ClusterForm: React.FC<AddModalProps> = forwardRef(
|
||||
></CloudProvider>
|
||||
)}
|
||||
<Form.Item<FormData> name="description" rules={[{ required: false }]}>
|
||||
<SealInput.TextArea
|
||||
<SealTextArea
|
||||
autoSize={{ minRows: 4, maxRows: 6 }}
|
||||
label={intl.formatMessage({ id: 'common.table.description' })}
|
||||
></SealInput.TextArea>
|
||||
></SealTextArea>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@@ -265,7 +265,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
||||
// evaluate the form data when select a model file
|
||||
// TODO: reset backend related fields when select a GGUF file
|
||||
if (item.fakeName) {
|
||||
// onSelectFile(item, modelInfo, manual);
|
||||
onSelectFile(item, modelInfo, manual);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import IconFont from '@/components/icon-font';
|
||||
import AutoComplete from '@/components/seal-form/auto-complete';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import SealTextArea from '@/components/seal-form/seal-textarea';
|
||||
import TooltipList from '@/components/tooltip-list';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -127,7 +128,6 @@ const BackendFields: React.FC = () => {
|
||||
<SealInput.Input
|
||||
required
|
||||
allowClear
|
||||
scaleSize={true}
|
||||
label={intl.formatMessage({ id: 'backend.imageName' })}
|
||||
></SealInput.Input>
|
||||
</Form.Item>
|
||||
@@ -140,15 +140,17 @@ const BackendFields: React.FC = () => {
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealInput.TextArea
|
||||
<SealTextArea
|
||||
allowClear
|
||||
required
|
||||
scaleSize={true}
|
||||
allowClear
|
||||
alwaysFocus={true}
|
||||
autoSize={{ minRows: 2, maxRows: 4 }}
|
||||
label={intl.formatMessage({ id: 'backend.runCommand' })}
|
||||
placeholder={intl.formatMessage({
|
||||
id: 'models.form.runCommandPlaceholder'
|
||||
})}
|
||||
></SealInput.TextArea>
|
||||
></SealTextArea>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { PageActionType } from '@/config/types';
|
||||
import CollapsePanel from '@/pages/_components/collapse-panel';
|
||||
import { useWrapperContext } from '@/pages/_components/column-wrapper/use-wrapper-context';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form } from 'antd';
|
||||
import _ from 'lodash';
|
||||
@@ -54,7 +53,6 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
||||
onValuesChange,
|
||||
onOk
|
||||
} = props;
|
||||
const { scrollToTarget, scrollToBottom } = useWrapperContext();
|
||||
const { backendOptions, getBackendOptions } = useQueryBackends();
|
||||
const { getGPUOptionList, gpuOptions } = useGenerateGPUOptions();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -80,6 +80,8 @@ export const useGenerateGPUOptions = () => {
|
||||
return gpuSelectorList;
|
||||
};
|
||||
|
||||
const generateWorkerSelectorOptions = (workerList: WorkerListItem[]) => {};
|
||||
|
||||
const getGPUOptionList = async (params?: {
|
||||
clusterId: number;
|
||||
}): Promise<CascaderOption[]> => {
|
||||
|
||||
@@ -52,11 +52,18 @@ export default function useChatCompletion(
|
||||
return;
|
||||
}
|
||||
|
||||
reasonContentRef.current =
|
||||
reasonContentRef.current +
|
||||
_.get(chunk, 'choices.0.delta.reasoning_content', '');
|
||||
contentRef.current =
|
||||
contentRef.current + _.get(chunk, 'choices.0.delta.content', '');
|
||||
const deltaReasoningContent =
|
||||
_.get(chunk, 'choices.0.delta.reasoning_content', '') === null
|
||||
? ''
|
||||
: _.get(chunk, 'choices.0.delta.reasoning_content', '');
|
||||
|
||||
const deltaContent =
|
||||
_.get(chunk, 'choices.0.delta.content', '') === null
|
||||
? ''
|
||||
: _.get(chunk, 'choices.0.delta.content', '');
|
||||
|
||||
reasonContentRef.current = reasonContentRef.current + deltaReasoningContent;
|
||||
contentRef.current = contentRef.current + deltaContent;
|
||||
|
||||
const content = formatContent({
|
||||
content: contentRef.current,
|
||||
|
||||
Reference in New Issue
Block a user