mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-14 06:30:57 +00:00
perf: style of pipeline dialog
This commit is contained in:
@@ -112,46 +112,6 @@ export default function BotConfigPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.configPageContainer}>
|
<div className={styles.configPageContainer}>
|
||||||
{/* <Spin spinning={isLoading} tip="加载中..." size="large">
|
|
||||||
<Modal
|
|
||||||
title={isEditForm ? '编辑机器人' : '创建机器人'}
|
|
||||||
centered
|
|
||||||
open={modalOpen}
|
|
||||||
onOk={() => setModalOpen(false)}
|
|
||||||
onCancel={() => setModalOpen(false)}
|
|
||||||
width={700}
|
|
||||||
footer={null}
|
|
||||||
destroyOnClose={true}
|
|
||||||
>
|
|
||||||
<BotForm
|
|
||||||
initBotId={nowSelectedBotCard?.id}
|
|
||||||
onFormSubmit={() => {
|
|
||||||
getBotList();
|
|
||||||
setModalOpen(false);
|
|
||||||
}}
|
|
||||||
onFormCancel={() => setModalOpen(false)}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
{pageShowRule === BotConfigPageShowRule.NO_LLM && (
|
|
||||||
<EmptyAndCreateComponent
|
|
||||||
title={'需要先创建大模型才能配置机器人哦~'}
|
|
||||||
subTitle={'快去创建一个吧!'}
|
|
||||||
buttonText={'创建大模型 GO!'}
|
|
||||||
onButtonClick={() => {
|
|
||||||
router.push('/home/models');
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{pageShowRule === BotConfigPageShowRule.NO_BOT && (
|
|
||||||
<EmptyAndCreateComponent
|
|
||||||
title={'您还未配置机器人哦~'}
|
|
||||||
subTitle={'快去创建一个吧!'}
|
|
||||||
buttonText={'创建机器人 +'}
|
|
||||||
onButtonClick={handleCreateBotClick}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Spin> */}
|
|
||||||
|
|
||||||
<Dialog open={modalOpen} onOpenChange={setModalOpen}>
|
<Dialog open={modalOpen} onOpenChange={setModalOpen}>
|
||||||
<DialogContent className="w-[700px] max-h-[80vh] p-0 flex flex-col">
|
<DialogContent className="w-[700px] max-h-[80vh] p-0 flex flex-col">
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { SelectProps } from 'antd';
|
|
||||||
import { ICreateLLMField } from '@/app/home/models/ICreateLLMField';
|
import { ICreateLLMField } from '@/app/home/models/ICreateLLMField';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { IChooseRequesterEntity } from '@/app/home/models/component/llm-form/ChooseRequesterEntity';
|
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 [extraArgs, setExtraArgs] = useState<{key: string, type: 'string' | 'number' | 'boolean', value: string}[]>([]);
|
||||||
|
|
||||||
const [showDeleteConfirmModal, setShowDeleteConfirmModal] = useState(false);
|
const [showDeleteConfirmModal, setShowDeleteConfirmModal] = useState(false);
|
||||||
const abilityOptions: SelectProps['options'] = [
|
const abilityOptions: { label: string, value: string }[] = [
|
||||||
{
|
{
|
||||||
label: '视觉能力',
|
label: '视觉能力',
|
||||||
value: 'vision',
|
value: 'vision',
|
||||||
|
|||||||
@@ -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 { useEffect, useState } from 'react';
|
||||||
import styles from './pipelineFormStyle.module.css';
|
|
||||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||||
import { LLMModel, Pipeline } from '@/app/infra/entities/api';
|
import { LLMModel, Pipeline } from '@/app/infra/entities/api';
|
||||||
import { UUID } from 'uuidjs';
|
import { UUID } from 'uuidjs';
|
||||||
|
|||||||
@@ -82,22 +82,24 @@ export default function PluginConfigPage() {
|
|||||||
<div className={styles.configPageContainer}>
|
<div className={styles.configPageContainer}>
|
||||||
|
|
||||||
<Dialog open={modalOpen} onOpenChange={setModalOpen}>
|
<Dialog open={modalOpen} onOpenChange={setModalOpen}>
|
||||||
<DialogContent>
|
<DialogContent className="w-[700px] max-h-[80vh] p-0 flex flex-col">
|
||||||
<DialogHeader>
|
<DialogHeader className="px-6 pt-6 pb-4">
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{isEditForm ? '编辑流水线' : '创建流水线'}
|
{isEditForm ? '编辑流水线' : '创建流水线'}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<PipelineFormComponent
|
<div className="flex-1 overflow-y-auto px-6">
|
||||||
onFinish={() => {
|
<PipelineFormComponent
|
||||||
getPipelines();
|
onFinish={() => {
|
||||||
setModalOpen(false);
|
getPipelines();
|
||||||
}}
|
setModalOpen(false);
|
||||||
isEditMode={isEditForm}
|
}}
|
||||||
pipelineId={selectedPipelineId}
|
isEditMode={isEditForm}
|
||||||
disableForm={disableForm}
|
pipelineId={selectedPipelineId}
|
||||||
initValues={selectedPipelineFormValue}
|
disableForm={disableForm}
|
||||||
/>
|
initValues={selectedPipelineFormValue}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user