refactor: 重构组件,移动 FormComponents 到 InteractiveComponents,简化代码结构
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
@@ -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}
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user