From f544fd13c3dc84b79e0af8a3684fc05a60b19754 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Thu, 8 May 2025 21:02:00 +0800 Subject: [PATCH] perf: style of pipeline dialog --- web/src/app/home/bots/page.tsx | 40 ------------------- .../models/component/llm-form/LLMForm.tsx | 3 +- .../pipeline-form/PipelineFormComponent.tsx | 12 +----- web/src/app/home/pipelines/page.tsx | 26 ++++++------ 4 files changed, 16 insertions(+), 65 deletions(-) diff --git a/web/src/app/home/bots/page.tsx b/web/src/app/home/bots/page.tsx index 8c2de108..f9299672 100644 --- a/web/src/app/home/bots/page.tsx +++ b/web/src/app/home/bots/page.tsx @@ -112,46 +112,6 @@ export default function BotConfigPage() { return (
- {/* - setModalOpen(false)} - onCancel={() => setModalOpen(false)} - width={700} - footer={null} - destroyOnClose={true} - > - { - getBotList(); - setModalOpen(false); - }} - onFormCancel={() => setModalOpen(false)} - /> - - {pageShowRule === BotConfigPageShowRule.NO_LLM && ( - { - router.push('/home/models'); - }} - /> - )} - - {pageShowRule === BotConfigPageShowRule.NO_BOT && ( - - )} - */} diff --git a/web/src/app/home/models/component/llm-form/LLMForm.tsx b/web/src/app/home/models/component/llm-form/LLMForm.tsx index 1004a62f..41ba4842 100644 --- a/web/src/app/home/models/component/llm-form/LLMForm.tsx +++ b/web/src/app/home/models/component/llm-form/LLMForm.tsx @@ -1,4 +1,3 @@ -import { SelectProps } from 'antd'; import { ICreateLLMField } from '@/app/home/models/ICreateLLMField'; import { useEffect, useState } from 'react'; import { IChooseRequesterEntity } from '@/app/home/models/component/llm-form/ChooseRequesterEntity'; @@ -91,7 +90,7 @@ export default function LLMForm({ const [extraArgs, setExtraArgs] = useState<{key: string, type: 'string' | 'number' | 'boolean', value: string}[]>([]); const [showDeleteConfirmModal, setShowDeleteConfirmModal] = useState(false); - const abilityOptions: SelectProps['options'] = [ + const abilityOptions: { label: string, value: string }[] = [ { label: '视觉能力', value: 'vision', diff --git a/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx b/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx index 47182d18..ca7adca4 100644 --- a/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx +++ b/web/src/app/home/pipelines/components/pipeline-form/PipelineFormComponent.tsx @@ -1,15 +1,5 @@ -// import { -// Form, -// Button, -// Switch, -// Select, -// Input, -// InputNumber, -// SelectProps, -// } from 'antd'; -import { CaretLeftOutlined, CaretRightOutlined } from '@ant-design/icons'; + import { useEffect, useState } from 'react'; -import styles from './pipelineFormStyle.module.css'; import { httpClient } from '@/app/infra/http/HttpClient'; import { LLMModel, Pipeline } from '@/app/infra/entities/api'; import { UUID } from 'uuidjs'; diff --git a/web/src/app/home/pipelines/page.tsx b/web/src/app/home/pipelines/page.tsx index 37320bc2..cfbb0e39 100644 --- a/web/src/app/home/pipelines/page.tsx +++ b/web/src/app/home/pipelines/page.tsx @@ -82,22 +82,24 @@ export default function PluginConfigPage() {
- - + + {isEditForm ? '编辑流水线' : '创建流水线'} - { - getPipelines(); - setModalOpen(false); - }} - isEditMode={isEditForm} - pipelineId={selectedPipelineId} - disableForm={disableForm} - initValues={selectedPipelineFormValue} - /> +
+ { + getPipelines(); + setModalOpen(false); + }} + isEditMode={isEditForm} + pipelineId={selectedPipelineId} + disableForm={disableForm} + initValues={selectedPipelineFormValue} + /> +