diff --git a/wren-ui/src/components/EllipsisWrapper.tsx b/wren-ui/src/components/EllipsisWrapper.tsx index 01f73ede8..1a17da97a 100644 --- a/wren-ui/src/components/EllipsisWrapper.tsx +++ b/wren-ui/src/components/EllipsisWrapper.tsx @@ -1,12 +1,29 @@ import { ReactNode, useEffect, useRef, useState } from 'react'; +import styled from 'styled-components'; interface Props { text?: string; children?: ReactNode; + multipleLine?: number; } +const Wrapper = styled.div<{ multipleLine?: number }>` + overflow: hidden; + text-overflow: ellipsis; + ${(props) => + props.multipleLine + ? ` + display: -webkit-box; + -webkit-line-clamp: ${props.multipleLine}; + -webkit-box-orient: vertical; +` + : ` + white-space: nowrap; +`} +`; + export default function EllipsisWrapper(props: Props) { - const { text, children } = props; + const { text, multipleLine, children } = props; const ref = useRef(null); const [width, setWidth] = useState(undefined); const hasWidth = width !== undefined; @@ -28,8 +45,13 @@ export default function EllipsisWrapper(props: Props) { const title = Array.isArray(text) ? text.join('') : text; return ( -
+ {hasWidth ? renderContent() : null} -
+ ); } diff --git a/wren-ui/src/components/ask/AnswerResult.tsx b/wren-ui/src/components/pages/home/AnswerResult.tsx similarity index 93% rename from wren-ui/src/components/ask/AnswerResult.tsx rename to wren-ui/src/components/pages/home/AnswerResult.tsx index ffb95962e..766532987 100644 --- a/wren-ui/src/components/ask/AnswerResult.tsx +++ b/wren-ui/src/components/pages/home/AnswerResult.tsx @@ -2,13 +2,13 @@ import { Button, Skeleton, Typography } from 'antd'; import CheckCircleOutlined from '@ant-design/icons/CheckCircleOutlined'; import SaveOutlined from '@ant-design/icons/SaveOutlined'; import QuestionCircleOutlined from '@ant-design/icons/QuestionCircleOutlined'; -import StepContent from '@/components/ask/StepContent'; +import StepContent from '@/components/pages/home/StepContent'; const { Title } = Typography; interface Props { loading: boolean; - onOpenSaveAsViewModal: ({ sql: string }) => void; + onOpenSaveAsViewModal: (data: { sql: string }) => void; question: string; description: string; answerResultSteps: Array<{ diff --git a/wren-ui/src/components/ask/CollapseContent.tsx b/wren-ui/src/components/pages/home/CollapseContent.tsx similarity index 96% rename from wren-ui/src/components/ask/CollapseContent.tsx rename to wren-ui/src/components/pages/home/CollapseContent.tsx index 406dbabbf..0fd87701a 100644 --- a/wren-ui/src/components/ask/CollapseContent.tsx +++ b/wren-ui/src/components/pages/home/CollapseContent.tsx @@ -2,7 +2,7 @@ import dynamic from 'next/dynamic'; import { Button, Typography } from 'antd'; import CopyOutlined from '@ant-design/icons/lib/icons/CopyOutlined'; import UpCircleOutlined from '@ant-design/icons/UpCircleOutlined'; -import PreviewData from '@/components/ask/PreviewData'; +import PreviewData from '@/components/pages/home/PreviewData'; const CodeBlock = dynamic(() => import('@/components/editor/CodeBlock'), { ssr: false, diff --git a/wren-ui/src/components/ask/PreviewData.tsx b/wren-ui/src/components/pages/home/PreviewData.tsx similarity index 100% rename from wren-ui/src/components/ask/PreviewData.tsx rename to wren-ui/src/components/pages/home/PreviewData.tsx diff --git a/wren-ui/src/components/ask/StepContent.tsx b/wren-ui/src/components/pages/home/StepContent.tsx similarity index 97% rename from wren-ui/src/components/ask/StepContent.tsx rename to wren-ui/src/components/pages/home/StepContent.tsx index 02ad3ddbc..2070f0089 100644 --- a/wren-ui/src/components/ask/StepContent.tsx +++ b/wren-ui/src/components/pages/home/StepContent.tsx @@ -3,7 +3,7 @@ import FunctionOutlined from '@ant-design/icons/FunctionOutlined'; import { BinocularsIcon } from '@/utils/icons'; import CollapseContent, { Props as CollapseContentProps, -} from '@/components/ask/CollapseContent'; +} from '@/components/pages/home/CollapseContent'; import useAnswerStepContent from '@/hooks/useAnswerStepContent'; const { Title, Paragraph } = Typography; diff --git a/wren-ui/src/components/pages/home/prompt/DemoPrompt.tsx b/wren-ui/src/components/pages/home/prompt/DemoPrompt.tsx new file mode 100644 index 000000000..2bbfcae07 --- /dev/null +++ b/wren-ui/src/components/pages/home/prompt/DemoPrompt.tsx @@ -0,0 +1,46 @@ +import { Row, Col } from 'antd'; +import styled from 'styled-components'; +import { makeIterable } from '@/utils/iteration'; +import EllipsisWrapper from '@/components/EllipsisWrapper'; + +const DemoBlock = styled.div` + &:hover { + border-color: var(--geekblue-6) !important; + transition: border-color ease 0.2s; + } +`; + +interface Props { + demo: any[]; + onSelect: (data: any) => void; +} + +const DemoTemplate = ({ title, summary, onSelect }) => { + return ( + + onSelect({ title, summary })} + > +
+
{title}
+
+ +
+ + ); +}; + +const DemoColumnIterator = makeIterable(DemoTemplate); + +export default function DemoPrompt(props: Props) { + const { demo, onSelect } = props; + return ( +
+
Try asking...
+ + + +
+ ); +} diff --git a/wren-ui/src/components/pages/home/prompt/Result.tsx b/wren-ui/src/components/pages/home/prompt/Result.tsx new file mode 100644 index 000000000..971e175ac --- /dev/null +++ b/wren-ui/src/components/pages/home/prompt/Result.tsx @@ -0,0 +1,228 @@ +import { ReactNode } from 'react'; +import { Row, Col, Button, Collapse } from 'antd'; +import styled from 'styled-components'; +import { PROCESS_STATE } from '@/utils/enum'; +import { makeIterable } from '@/utils/iteration'; +import CheckCircleOutlined from '@ant-design/icons/CheckCircleOutlined'; +import FunctionOutlined from '@ant-design/icons/FunctionOutlined'; +import CloseOutlined from '@ant-design/icons/CloseOutlined'; +import StopOutlined from '@ant-design/icons/StopFilled'; +import LoadingOutlined from '@ant-design/icons/LoadingOutlined'; +import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; +import WarningOutlined from '@ant-design/icons/WarningOutlined'; +import CaretRightOutlined from '@ant-design/icons/CaretRightOutlined'; +import ViewSQLModal from '@/components/pages/home/prompt/ViewSQLModal'; +import EllipsisWrapper from '@/components/EllipsisWrapper'; +import useModalAction from '@/hooks/useModalAction'; +import useAskProcessState from '@/hooks/useAskProcessState'; + +const ResultStyle = styled.div` + position: absolute; + bottom: calc(100% + 12px); + left: 0; + width: 100%; + background: white; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); +`; + +const StyledCollapse = styled(Collapse)` + .ant-collapse-item { + > .ant-collapse-header { + color: var(--gray-7); + padding-left: 0; + padding-right: 0; + + .ant-collapse-arrow { + margin-right: 8px; + } + } + > .ant-collapse-content .ant-collapse-content-box { + color: var(--gray-7); + padding: 0; + } + } +`; + +const ResultBlock = styled.div` + &:hover { + border-color: var(--geekblue-6) !important; + transition: border-color ease 0.2s; + } +`; + +interface Props { + processState: ReturnType; + data: any[]; + error?: any; + onClose: () => void; + onStop: () => void; +} + +const ResultTemplate = ({ index, summary, sql, onShowSQL }) => { + return ( + + +
+
+ Result {index + 1} +
+ +
+ +
+ + ); +}; +const ResultColumnIterator = makeIterable(ResultTemplate); + +const makeProcessing = (text: string) => (props: Props) => { + const { onStop } = props; + return ( +
+ + + {text} + + +
+ ); +}; + +const makeProcessingError = + (config: { icon: ReactNode; title: string; description: string }) => + (props: Props) => { + const { onClose, error } = props; + const { message } = error || {}; + return ( +
+
+
+ {config.icon} + {config.title} +
+ +
+
{config.description}
+ {message && ( + ( + + )} + > + +
{message}
+
+
+ )} +
+ ); + }; + +const ErrorIcon = () => ; + +const UnderstandingFailed = makeProcessingError({ + icon: , + title: 'Failed to understand', + description: + 'Sorry, I cannot understand your question. Could you please rephrase your question or provide more context?', +}); + +const SearchingFailed = makeProcessingError({ + icon: , + title: 'Something went wrong', + description: + "Sorry, we encountered an error when we're processing your request.", +}); + +const NoResult = makeProcessingError({ + icon: , + title: 'Please try again', + description: 'No results found. Try providing more details in your question.', +}); + +const Understanding = makeProcessing('Understanding question'); +const Searching = makeProcessing('Searching data'); +const Finished = (props: Props) => { + const { data, onClose } = props; + + const viewSQLModal = useModalAction(); + + const showSQL = (payload: { sql: string; summary: string }) => { + viewSQLModal.openModal(payload); + }; + + return ( +
+
+
+ {data.length}{' '} + result(s) found +
+ +
+ + + + +
+ ); +}; + +const getProcessStateComponent = (state: PROCESS_STATE) => { + return ( + { + [PROCESS_STATE.UNDERSTANDING]: Understanding, + [PROCESS_STATE.SEARCHING]: Searching, + [PROCESS_STATE.FINISHED]: Finished, + [PROCESS_STATE.UNDERSTANDING_FAILED]: UnderstandingFailed, + [PROCESS_STATE.SEARCHING_FAILED]: SearchingFailed, + [PROCESS_STATE.NO_RESULT]: NoResult, + }[state] || null + ); +}; + +export default function PromptResult(props: Props) { + const { processState } = props; + + const StateComponent = getProcessStateComponent(processState.currentState); + + if (StateComponent === null) return null; + + return ( + + + + ); +} diff --git a/wren-ui/src/components/pages/home/prompt/ViewSQLModal.tsx b/wren-ui/src/components/pages/home/prompt/ViewSQLModal.tsx new file mode 100644 index 000000000..99e0658be --- /dev/null +++ b/wren-ui/src/components/pages/home/prompt/ViewSQLModal.tsx @@ -0,0 +1,21 @@ +import { Modal } from 'antd'; +import CodeBlock from '@/components/editor/CodeBlock'; + +export default function ShowSQLModal(props) { + const { visible, onClose, defaultValue } = props; + const { sql, summary } = defaultValue || {}; + return ( + +
{summary}
+ +
+ ); +} diff --git a/wren-ui/src/components/pages/home/prompt/index.tsx b/wren-ui/src/components/pages/home/prompt/index.tsx new file mode 100644 index 000000000..5474ef6cb --- /dev/null +++ b/wren-ui/src/components/pages/home/prompt/index.tsx @@ -0,0 +1,128 @@ +import { useEffect, useMemo, useState } from 'react'; +import { Input, Button } from 'antd'; +import styled from 'styled-components'; +import { PROCESS_STATE } from '@/utils/enum'; +import PromptResult from '@/components/pages/home/prompt/Result'; +import useAskProcessState from '@/hooks/useAskProcessState'; + +interface Props { + onStop: () => void; + onSubmit: (value: string) => void; + data?: { status: string; result: { sql: string; summary: string }[] }; + error?: any; +} + +const PromptStyle = styled.div` + position: fixed; + width: 768px; + left: 50%; + margin-left: calc(-384px + 140px); + bottom: 12px; +`; + +const PromptButton = styled(Button)` + min-width: 72px; +`; + +const convertToProcessState = (status: string) => { + return { + understanding: PROCESS_STATE.UNDERSTANDING, + searching: PROCESS_STATE.SEARCHING, + finished: PROCESS_STATE.FINISHED, + }[status]; +}; + +const convertToErrorState = (status: string) => { + return { + understanding: PROCESS_STATE.UNDERSTANDING_FAILED, + searching: PROCESS_STATE.SEARCHING_FAILED, + finished: PROCESS_STATE.NO_RESULT, + }[status]; +}; + +export default function Prompt(props: Props) { + const { data, error, onSubmit, onStop } = props; + const [inputValue, setInputValue] = useState(''); + const askProcessState = useAskProcessState(); + + const results = useMemo(() => data.result || [], [data]); + const question = useMemo(() => inputValue.trim(), [inputValue]); + const isProcessing = useMemo( + () => + [PROCESS_STATE.UNDERSTANDING, PROCESS_STATE.SEARCHING].includes( + askProcessState.currentState, + ), + [askProcessState.currentState], + ); + + useEffect(() => { + if (data) { + const processState = convertToProcessState(data.status); + askProcessState.setState(processState); + } + }, [data]); + + useEffect(() => { + if (error) { + // TODO: confirm error state + const errorState = convertToErrorState(error.status); + askProcessState.setState(errorState); + } + }, [error]); + + const closeResult = () => { + askProcessState.resetState(); + }; + + const stopProcess = () => { + askProcessState.resetState(); + onStop && onStop(); + }; + + const syncInputValue = (event) => { + setInputValue(event.target.value); + }; + + const inputEnter = (event) => { + if (event.shiftKey) return; + event.preventDefault(); + + if (!isProcessing) submitAsk(); + }; + + const submitAsk = async () => { + if (question) { + onSubmit && (await onSubmit(question)); + } + }; + + return ( + + + + Ask + + + + + ); +} diff --git a/wren-ui/src/components/pages/setup/CreateModels.tsx b/wren-ui/src/components/pages/setup/CreateModels.tsx index e104dc9cb..36c72abfe 100644 --- a/wren-ui/src/components/pages/setup/CreateModels.tsx +++ b/wren-ui/src/components/pages/setup/CreateModels.tsx @@ -63,6 +63,8 @@ const SelectModelTemplate: IterableComponent = ({ index, name, fields }) => ( ); +const SelectModelIterator = makeIterable(SelectModelTemplate); + export default function CreateModels(props: Props) { const { onBack, onNext, selectedModels, tables } = props; @@ -78,8 +80,6 @@ export default function CreateModels(props: Props) { }); }, [selectedModels, tables]); - const SelectModelIterator = makeIterable(SelectModelTemplate); - const submit = () => { form .validateFields() diff --git a/wren-ui/src/components/pages/setup/RecommendRelations.tsx b/wren-ui/src/components/pages/setup/RecommendRelations.tsx index e8330c464..3591c4a66 100644 --- a/wren-ui/src/components/pages/setup/RecommendRelations.tsx +++ b/wren-ui/src/components/pages/setup/RecommendRelations.tsx @@ -75,12 +75,12 @@ const SelectRelationTemplate: IterableComponent = ({ ); +const SelectRelationIterator = makeIterable(SelectRelationTemplate); + export default function RecommendRelations(props: Props) { const { recommendRelations, onBack, onNext } = props; const [form] = Form.useForm(); - const SelectRelationIterator = makeIterable(SelectRelationTemplate); - const submit = () => { form .validateFields() diff --git a/wren-ui/src/components/pages/setup/Starter.tsx b/wren-ui/src/components/pages/setup/Starter.tsx index 02ecfeb64..df9a271e1 100644 --- a/wren-ui/src/components/pages/setup/Starter.tsx +++ b/wren-ui/src/components/pages/setup/Starter.tsx @@ -68,14 +68,14 @@ const ButtonTemplate = ( ); }; +const DataSourceIterator = makeIterable(ButtonTemplate); +const TemplatesIterator = makeIterable(ButtonTemplate); + export default function Starter(props) { const { onNext } = props; const dataSources = getDataSources(); const templates = getTemplates(); - const DataSourceIterator = makeIterable(ButtonTemplate); - const TemplatesIterator = makeIterable(ButtonTemplate); - const onSelectDataSource = (value: DATA_SOURCES) => { onNext && onNext({ dataSource: value }); }; diff --git a/wren-ui/src/hooks/useAskProcessState.tsx b/wren-ui/src/hooks/useAskProcessState.tsx new file mode 100644 index 000000000..8a7be553e --- /dev/null +++ b/wren-ui/src/hooks/useAskProcessState.tsx @@ -0,0 +1,28 @@ +import { useState } from 'react'; +import { PROCESS_STATE } from '@/utils/enum'; + +export default function useAskProcessState() { + const [currentState, setCurrentState] = useState( + PROCESS_STATE.IDLE, + ); + + const resetState = () => { + setCurrentState(PROCESS_STATE.IDLE); + }; + + const nextState = () => { + setCurrentState(currentState + 1); + console.log(currentState); + }; + + const setState = (state: PROCESS_STATE) => { + setCurrentState(state); + }; + + return { + currentState, + resetState, + nextState, + setState, + }; +} diff --git a/wren-ui/src/pages/ask/[id].tsx b/wren-ui/src/pages/home/[id].tsx similarity index 73% rename from wren-ui/src/pages/ask/[id].tsx rename to wren-ui/src/pages/home/[id].tsx index b80122a81..62ced5478 100644 --- a/wren-ui/src/pages/ask/[id].tsx +++ b/wren-ui/src/pages/home/[id].tsx @@ -1,12 +1,14 @@ -import { useEffect, useRef } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useRouter } from 'next/router'; import styled from 'styled-components'; import { Divider } from 'antd'; import { Path } from '@/utils/enum'; +import { nextTick } from '@/utils/time'; import useModalAction from '@/hooks/useModalAction'; import SiderLayout from '@/components/layouts/SiderLayout'; -import AnswerResult from '@/components/ask/AnswerResult'; +import AnswerResult from '@/components/pages/home/AnswerResult'; import SaveAsViewModal from '@/components/modals/SaveAsViewModal'; +import Prompt from '@/components/pages/home/prompt'; const AnswerResultsBlock = styled.div` width: 768px; @@ -31,10 +33,30 @@ const AnswerResultsBlock = styled.div` } `; +const testData = { + status: '', + result: [ + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + ], +}; + export default function AnswerBlock() { const divRef = useRef(null); const router = useRouter(); const saveAsViewModal = useModalAction(); + // TODO: adjust when intergrating with API + const [simulateData, setSimulateData] = useState(testData); // TODO: implement scroll when has new answer result useEffect(() => { @@ -58,7 +80,7 @@ export default function AnswerBlock() { const data = []; const onSelect = (selectKeys: string[]) => { - router.push(`${Path.ASK}/${selectKeys[0]}`); + router.push(`${Path.Home}/${selectKeys[0]}`); }; // TODO: call API to get real answer results @@ -90,6 +112,23 @@ export default function AnswerBlock() { }, ]; + const onStop = () => { + // TODO: send stop asking API + }; + + const simulateProcess = async () => { + setSimulateData({ ...simulateData, status: 'understanding' }); + await nextTick(3000); + setSimulateData({ ...simulateData, status: 'searching' }); + await nextTick(3000); + setSimulateData({ ...simulateData, status: 'finished' }); + }; + + const onSubmit = async (value) => { + console.log(value); + await simulateProcess(); + }; + return ( @@ -114,6 +153,7 @@ export default function AnswerBlock() { console.log('save as view', values); }} /> + ); } diff --git a/wren-ui/src/pages/home/index.tsx b/wren-ui/src/pages/home/index.tsx new file mode 100644 index 000000000..4996452fb --- /dev/null +++ b/wren-ui/src/pages/home/index.tsx @@ -0,0 +1,107 @@ +import { useState } from 'react'; +import { useRouter } from 'next/router'; +import { Path } from '@/utils/enum'; +import { nextTick } from '@/utils/time'; +import SiderLayout from '@/components/layouts/SiderLayout'; +import Prompt from '@/components/pages/home/prompt'; +import DemoPrompt from '@/components/pages/home/prompt/DemoPrompt'; + +const testData = { + status: 'searching', + result: [ + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + { + summary: 'Top 10 customer with most order from global customer in 2024', + sql: 'SELECT * FROM customer', + }, + ], +}; + +const errorData = undefined; +// { +// message: '', +// extensions: { +// code: '000', +// data: { +// status: 'finished', +// // message: `Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10\n at Main.main(Main.java:4)`, +// }, +// }, +// }; + +const demoData = [ + { + title: 'General question', + summary: 'Show me top 10 best-selling product last month.', + }, + { + title: 'Drill into metrics', + summary: + 'List the name of the users who successfully convert to paying customers last week.', + }, + { + title: 'Aggregate data', + summary: + "Help me categorize customers' ages into groups segmented by every 10 years.", + }, +]; + +export default function Ask() { + const router = useRouter(); + // TODO: adjust when intergrating with API + const [simulateData, setSimulateData] = useState(testData); + const data = []; + const isDemo = true; + + const onSelect = (selectKeys: string[]) => { + router.push(`${Path.Home}/${selectKeys[0]}`); + }; + + const onDemoSelect = () => {}; + + const onStop = () => { + // TODO: send stop asking API + }; + + const simulateProcess = async () => { + setSimulateData({ ...simulateData, status: 'understanding' }); + await nextTick(3000); + setSimulateData({ ...simulateData, status: 'searching' }); + await nextTick(3000); + setSimulateData({ ...simulateData, status: 'finished' }); + }; + + const onSubmit = async (value) => { + console.log(value); + await simulateProcess(); + }; + + return ( + +
+ home-logo +
+ Know more about your data +
+ + {isDemo && } +
+ +
+ ); +} diff --git a/wren-ui/src/styles/components/button.less b/wren-ui/src/styles/components/button.less index e02930bd9..83b2c633a 100644 --- a/wren-ui/src/styles/components/button.less +++ b/wren-ui/src/styles/components/button.less @@ -14,3 +14,11 @@ .button-disabled(); } } + +.adm-btn-no-style { + cursor: pointer; + background: transparent; + line-height: 1.2; + height: auto; + border: none; +} \ No newline at end of file diff --git a/wren-ui/src/styles/utilities/border.less b/wren-ui/src/styles/utilities/border.less index 78b5f2d6f..be80e6acf 100644 --- a/wren-ui/src/styles/utilities/border.less +++ b/wren-ui/src/styles/utilities/border.less @@ -23,3 +23,7 @@ .rounded { border-radius: 4px !important; } + +.rounded-pill { + border-radius: 999px !important; +} \ No newline at end of file diff --git a/wren-ui/src/styles/utilities/text.less b/wren-ui/src/styles/utilities/text.less index 136d035e2..16280d075 100644 --- a/wren-ui/src/styles/utilities/text.less +++ b/wren-ui/src/styles/utilities/text.less @@ -25,6 +25,14 @@ text-align: center !important; } +.text-bold { + font-weight: 700 !important; +} + +.text-medium { + font-weight: 500 !important; +} + .make-text-classes(); .text-truncate { diff --git a/wren-ui/src/utils/enum/ask.ts b/wren-ui/src/utils/enum/ask.ts deleted file mode 100644 index e9c7c36f0..000000000 --- a/wren-ui/src/utils/enum/ask.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum COLLAPSE_CONTENT_TYPE { - NONE = 'none', - VIEW_SQL = 'view_sql', - PREVIEW_DATA = 'preview_data', -} diff --git a/wren-ui/src/utils/enum/home.ts b/wren-ui/src/utils/enum/home.ts new file mode 100644 index 000000000..4a1677df1 --- /dev/null +++ b/wren-ui/src/utils/enum/home.ts @@ -0,0 +1,17 @@ +export enum COLLAPSE_CONTENT_TYPE { + NONE = 'none', + VIEW_SQL = 'view_sql', + PREVIEW_DATA = 'preview_data', +} + +export enum PROCESS_STATE { + IDLE, + UNDERSTANDING, + SEARCHING, + GENERATING, + FINISHED, + + UNDERSTANDING_FAILED, + SEARCHING_FAILED, + NO_RESULT, +} diff --git a/wren-ui/src/utils/enum/index.ts b/wren-ui/src/utils/enum/index.ts index 102b85f1c..226a5aa68 100644 --- a/wren-ui/src/utils/enum/index.ts +++ b/wren-ui/src/utils/enum/index.ts @@ -5,4 +5,4 @@ export * from './columnType'; export * from './modeling'; export * from './path'; export * from './diagram'; -export * from './ask'; +export * from './home'; diff --git a/wren-ui/src/utils/enum/path.ts b/wren-ui/src/utils/enum/path.ts index 18b089a51..e382732eb 100644 --- a/wren-ui/src/utils/enum/path.ts +++ b/wren-ui/src/utils/enum/path.ts @@ -2,5 +2,5 @@ export enum Path { Exploration = '/exploration', Modeling = '/modeling', Onboarding = '/setup', - ASK = '/ask', + Home = '/home', }