forked from wangziqi/gongxue-base
Refactor AI chat: streaming, tool calls, UI polish
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import React, { Suspense, lazy } from 'react';
|
||||
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
||||
import { ConfigProvider, App as AntdApp, Spin } from 'antd';
|
||||
import { XProvider } from '@ant-design/x';
|
||||
import xZhCN from '@ant-design/x/es/locale/zh_CN';
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import MainLayout from './layouts/MainLayout';
|
||||
import PermissionRoute from './components/PermissionRoute';
|
||||
@@ -58,9 +60,19 @@ const App: React.FC = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<AntdApp>
|
||||
<AppMessageBridge />
|
||||
<BrowserRouter>
|
||||
<XProvider
|
||||
locale={{ ...zhCN, ...xZhCN }}
|
||||
theme={{
|
||||
token: { colorPrimary: '#007AFF', borderRadius: 10 },
|
||||
components: {
|
||||
Sender: { colorBorder: '#d9d9de' },
|
||||
Bubble: { colorBgContainer: '#f5f7fa' },
|
||||
},
|
||||
}}
|
||||
>
|
||||
<AntdApp>
|
||||
<AppMessageBridge />
|
||||
<BrowserRouter>
|
||||
<Suspense
|
||||
fallback={
|
||||
<div style={{ minHeight: '40vh', display: 'grid', placeItems: 'center' }}>
|
||||
@@ -330,8 +342,9 @@ const App: React.FC = () => {
|
||||
</Route>
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</BrowserRouter>
|
||||
</AntdApp>
|
||||
</BrowserRouter>
|
||||
</AntdApp>
|
||||
</XProvider>
|
||||
</ConfigProvider>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user