File tree Expand file tree Collapse file tree
chat2db-client/src/components/ConsoleEditor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ function ConsoleEditor(props: IProps, ref: ForwardedRef<IConsoleRef>) {
9494 const uid = useMemo ( ( ) => uuidv4 ( ) , [ ] ) ;
9595 const chatResult = useRef ( '' ) ;
9696 const editorRef = useRef < IExportRefFunction > ( ) ;
97+ const [ selectedTables , setSelectedTables ] = useState < string [ ] > ( [ ] ) ;
98+ const [ tableNameList , setTableNameList ] = useState < string [ ] > ( [ ] ) ;
9799 const [ syncTableModel , setSyncTableModel ] = useState < number > ( 0 ) ;
98100 const [ isLoading , setIsLoading ] = useState ( false ) ;
99101 const [ aiContent , setAiContent ] = useState ( '' ) ;
@@ -355,9 +357,6 @@ function ConsoleEditor(props: IProps, ref: ForwardedRef<IConsoleRef>) {
355357 setSyncTableModel ( hasAiAccess ? SyncModelType . AUTO : SyncModelType . MANUAL ) ;
356358 } ;
357359
358- const [ selectedTables , setSelectedTables ] = useState < string [ ] > ( [ ] ) ;
359- const [ tableNameList , setTableNameList ] = useState < string [ ] > ( [ ] ) ;
360-
361360 // 注册快捷键
362361 const registerShortcutKey = ( editor , monaco ) => {
363362 // 保存
You can’t perform that action at this time.
0 commit comments