refactor: 重构组件,移动 FormComponents 到 InteractiveComponents,简化代码结构

This commit is contained in:
sd0ric4
2025-03-27 15:01:32 +08:00
parent 7f05a2ef1e
commit b5d892c0a7
3 changed files with 2 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ import {
type SelectOptionType, type SelectOptionType,
FormInputComponent, FormInputComponent,
type FormItemType type FormItemType
} from './Form/FormComponents'; } from './Interactive/InteractiveComponents';
const onSendPrompt = (e: { text: string; isInteractivePrompt: boolean }) => const onSendPrompt = (e: { text: string; isInteractivePrompt: boolean }) =>
eventBus.emit(EventNameEnum.sendQuestion, e); eventBus.emit(EventNameEnum.sendQuestion, e);
const formatJsonString = (jsonString: string) => { const formatJsonString = (jsonString: string) => {

View File

@@ -29,7 +29,6 @@ const DescriptionBox = React.memo(function DescriptionBox({
description?: string; description?: string;
}) { }) {
if (!description) return null; if (!description) return null;
return ( return (
<Box <Box
mb={4} mb={4}

View File

@@ -15,7 +15,7 @@ import {
type FormItemType, type FormItemType,
FormInputComponent, FormInputComponent,
SelectOptionsComponent SelectOptionsComponent
} from '@/components/core/chat/components/Form/FormComponents'; } from '@/components/core/chat/components/Interactive/InteractiveComponents';
const useInteractiveDebug = ( const useInteractiveDebug = (
interactive: UserSelectInteractive | UserInputInteractive, interactive: UserSelectInteractive | UserInputInteractive,
nodeId?: string nodeId?: string