Skip to content

Commit 68aa1c6

Browse files
committed
refactor: 重构项目文件结构, 为加入更多AI功能做准备
1 parent 99406a6 commit 68aa1c6

File tree

78 files changed

+1258
-1249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1258
-1249
lines changed

src/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import {
1616
import { useEffect, useState } from 'react'
1717
import { ErrorBoundary, type FallbackProps } from 'react-error-boundary'
1818
import { version } from '../package.json'
19-
import { AI } from './components/AI'
19+
import { AI } from './components/assistant/AI'
2020
import { Debug } from './components/widgets/Debug'
21-
import { useAssistant } from './lib/hooks/useAssistant'
22-
import { useData } from './lib/hooks/useData'
23-
import { MAIN_PAGES_LABELS, useNav } from './lib/hooks/useNav'
24-
import { useStates } from './lib/hooks/useStates'
21+
import { useAssistant } from './hooks/useAssistant'
22+
import { useData } from './hooks/useData'
23+
import { MAIN_PAGES_LABELS, useNav } from './hooks/useNav'
24+
import { useStates } from './hooks/useStates'
2525

2626
const ANTD_THEME_LIGHT: ThemeConfig = {
2727
token: {
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ import type {
99
} from 'openai/resources/index.mjs'
1010
import { useEffect, useState } from 'react'
1111
import { flushSync } from 'react-dom'
12-
import readme from '../../README.md?raw'
13-
import { useAssistant } from '../lib/hooks/useAssistant'
14-
import { useData } from '../lib/hooks/useData'
12+
import readme from '../../../README.md?raw'
13+
import { useAssistant } from '../../hooks/useAssistant'
14+
import { useData } from '../../hooks/useData'
1515
import {
1616
MAIN_PAGES_LABELS,
1717
PLOTS_SUB_PAGES_LABELS,
1818
STATISTICS_SUB_PAGES_LABELS,
1919
TOOLS_VIEW_SUB_PAGES_LABELS,
2020
VARIABLE_SUB_PAGES_LABELS,
2121
useNav,
22-
} from '../lib/hooks/useNav'
23-
import { useStates } from '../lib/hooks/useStates'
24-
import type { Variable } from '../types'
25-
import { ALLOWED_INTERPOLATION_METHODS, ALL_VARS_IDENTIFIER } from '../types'
26-
import { Messages } from './assistant/Messages'
27-
import { funcs } from './assistant/funcs'
22+
} from '../../hooks/useNav'
23+
import { useStates } from '../../hooks/useStates'
24+
import { funcs } from '../../tools/tools'
25+
import type { Variable } from '../../types'
26+
import { ALLOWED_INTERPOLATION_METHODS, ALL_VARS_IDENTIFIER } from '../../types'
27+
import { Messages } from './Messages'
2828

2929
const GREETTING =
3030
'你好, 我是 PsychPen 的 AI 助手, 可以帮你讲解 PsychPen 的使用方法、探索你的数据集、导出数据、跳转页面、定义缺失值、缺失值插值、标准化/中心化/离散化变量、生成新变量、筛选数据、解释你当前的统计结果等. 请问有什么可以帮你的?'

0 commit comments

Comments
 (0)