feat: 暂存,添加app-manager
This commit is contained in:
@@ -2,7 +2,7 @@ import { useShallow } from 'zustand/react/shallow';
|
||||
import { useAiStore } from './store/ai-store';
|
||||
import { CloseOutlined, HistoryOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import { Button, Dropdown, Form, Input, message, Modal, Tooltip } from 'antd';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { TextArea } from '../container/components/TextArea';
|
||||
import clsx from 'clsx';
|
||||
import { query } from '@/modules';
|
||||
@@ -221,7 +221,11 @@ export const AiMoudle = () => {
|
||||
const onSendNoPrompt = (value) => {
|
||||
send({ type: 'messages', data: { message: value, root: true } });
|
||||
};
|
||||
const inputs = form.getFieldValue('inputs');
|
||||
const inputs = useMemo(() => {
|
||||
if (!aiStore.open) return [];
|
||||
const inputs = form.getFieldValue('inputs');
|
||||
return inputs;
|
||||
}, [aiStore.open]);
|
||||
const isNotShow = inputs?.length === 0 || !inputs;
|
||||
const OnlyNormalMessage = (
|
||||
<Tooltip title='不需要任何预设prompt'>
|
||||
|
||||
Reference in New Issue
Block a user