chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -42,7 +42,7 @@ export const useCreateKnowledgeModalV2 = (
|
||||
) => {
|
||||
const { onFinish, beforeCreate, projectID } = params;
|
||||
const formRef = useRef<Form<CozeKnowledgeAddTypeContentFormData>>(null);
|
||||
// 使用 useState 保证能重新渲染
|
||||
// Use useState to ensure re-rendering
|
||||
const [currentFormatType, setCurrentFormatType] = useState(FormatType.Text);
|
||||
const spaceId = useSpaceStore(store => store.getSpaceId());
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ import {
|
||||
|
||||
import { useCreateKnowledgeModalV2 } from '../../../create-knowledge-modal-v2/scenes/base';
|
||||
|
||||
// 直接使用原始参数类型,不需要创建新的接口
|
||||
// Directly use the original parameter types without creating a new interface
|
||||
export const useKnowledgeListModal = (
|
||||
params: Omit<UseKnowledgeListModalParams, 'createKnowledgeModal'>,
|
||||
) => {
|
||||
const { onClickAddKnowledge, beforeCreate, projectID } = params;
|
||||
|
||||
// 创建知识库的modal
|
||||
// A modal for creating a knowledge base
|
||||
const createKnowledgeModal = useCreateKnowledgeModalV2({
|
||||
projectID,
|
||||
onFinish: (datasetId: string, type: UnitType, shouldUpload: boolean) => {
|
||||
@@ -38,7 +38,7 @@ export const useKnowledgeListModal = (
|
||||
beforeCreate,
|
||||
});
|
||||
|
||||
// 将createKnowledgeModal传递给base组件
|
||||
// Pass createKnowledgeModal to the base component
|
||||
return useKnowledgeListModalBase({
|
||||
...params,
|
||||
createKnowledgeModal,
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useKnowledgeListModalContent = (
|
||||
props: DataSetModalContentProps,
|
||||
) => {
|
||||
const { projectID, onClickAddKnowledge, beforeCreate } = props;
|
||||
// 创建知识库的modal
|
||||
// A modal for creating a knowledge base
|
||||
const createKnowledgeModal = useCreateKnowledgeModalV2({
|
||||
projectID,
|
||||
onFinish: (datasetId: string, type: UnitType, shouldUpload: boolean) => {
|
||||
@@ -43,7 +43,7 @@ export const useKnowledgeListModalContent = (
|
||||
|
||||
export const KnowledgeListModalContent = (props: DataSetModalContentProps) => {
|
||||
const { projectID, onClickAddKnowledge, beforeCreate } = props;
|
||||
// 创建知识库的modal
|
||||
// A modal for creating a knowledge base
|
||||
const createKnowledgeModal = useCreateKnowledgeModalV2({
|
||||
projectID,
|
||||
onFinish: (datasetId: string, type: UnitType, shouldUpload: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user