@gientech/modual 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AppLoading-mci3gLZt.js +414 -0
- package/dist/assets/{GientechStreamReader-A8zHypyu.js → GientechStreamReader-4496nAm0.js} +2 -2
- package/dist/assets/{index-B7u9FawR.js → index-7rZAt9P3.js} +1 -1
- package/dist/assets/index-BVENTW1Q.js +13 -0
- package/dist/assets/index-Bb8_WB-l.js +1 -0
- package/dist/assets/{index-rydP_SDR.js → index-BpJ9Bm5x.js} +6 -6
- package/dist/assets/index-CNxDI4h-.js +1078 -0
- package/dist/assets/{index-EcdpegTC.js → index-CWzpBU29.js} +1 -1
- package/dist/assets/{index-DiQ4Me9J.js → index-D1m34Ij7.js} +124 -124
- package/dist/assets/{index-CFlRqq2H.js → index-_gBtdXQV.js} +2 -2
- package/dist/assets/{plus-ufD39rmY.js → plus-CrtEUXaQ.js} +1 -1
- package/dist/assets/style3.css +1 -1
- package/dist/assets/{x-_1-UpSBt.js → x-Dr3EBTzJ.js} +1 -1
- package/dist/chat.d.ts +5 -1
- package/dist/chat.js +69 -78
- package/dist/database.js +2 -2
- package/dist/databaseId.js +2 -2
- package/dist/databaseTable.js +2 -14
- package/dist/index.js +3 -3
- package/dist/modelManage.js +1 -1
- package/dist/package.json +1 -1
- package/dist/sensitive.js +1 -1
- package/dist/streamFilesReader.js +1 -1
- package/package.json +3 -3
- package/scripts/README.md +133 -133
- package/scripts/build-demo.js +88 -88
- package/scripts/demo-selector.js +216 -216
- package/scripts/preview-demo.js +130 -130
- package/scripts/run-demo.bat +34 -34
- package/src/examples/Demo/index.tsx +12 -0
- package/src/examples/chat/index.tsx +8 -21
- package/src/examples/chat/logo03.png +0 -0
- package/src/main.tsx +2 -2
- package/src/main.tsx.backup +2 -2
- package/src/modules/chat/index.tsx +87 -4
- package/src/utils/gientechCommon/components/AppLoading.tsx +10 -10
- package/src/utils/testconfigs/index.ts +1 -1
- package/stats.html +1 -1
- package/dist/assets/AppLoading-BCu9TPs5.js +0 -414
- package/dist/assets/LeftOutlined-BdBZ6FSD.js +0 -1
- package/dist/assets/index-CNJZ9j4J.js +0 -1
- package/dist/assets/index-DfSHCQcq.js +0 -1289
package/scripts/preview-demo.js
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { spawn } from 'child_process';
|
|
4
|
-
import { main, restoreMainFile } from './demo-selector.js';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = path.dirname(__filename);
|
|
10
|
-
|
|
11
|
-
// 检测操作系统
|
|
12
|
-
const isWindows = process.platform === 'win32';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 执行打包
|
|
16
|
-
*/
|
|
17
|
-
function runBuild() {
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
console.log('\n🔨 正在执行打包...\n');
|
|
20
|
-
console.log('🔧 调试信息:');
|
|
21
|
-
console.log(' 操作系统:', process.platform);
|
|
22
|
-
console.log(' Windows 模式:', isWindows);
|
|
23
|
-
console.log(' 工作目录:', path.resolve(__dirname, '..'));
|
|
24
|
-
console.log('');
|
|
25
|
-
|
|
26
|
-
const buildProcess = spawn('pnpm', ['run', 'build:app'], {
|
|
27
|
-
stdio: 'inherit',
|
|
28
|
-
shell: isWindows, // Windows 下需要 shell: true
|
|
29
|
-
cwd: path.resolve(__dirname, '..'),
|
|
30
|
-
env: {
|
|
31
|
-
...process.env,
|
|
32
|
-
NODE_OPTIONS: '--max-old-space-size=16384'
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
buildProcess.on('close', (code) => {
|
|
37
|
-
if (code === 0) {
|
|
38
|
-
console.log('\n✅ 打包完成!');
|
|
39
|
-
console.log('📁 输出目录: dist-app/');
|
|
40
|
-
resolve();
|
|
41
|
-
} else {
|
|
42
|
-
console.error(`\n❌ 打包失败 (退出码: ${code})`);
|
|
43
|
-
reject(new Error(`打包失败,退出码: ${code}`));
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
buildProcess.on('error', (error) => {
|
|
48
|
-
console.error('❌ 执行打包失败:', error);
|
|
49
|
-
reject(error);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// 处理进程退出信号
|
|
53
|
-
process.on('SIGINT', () => {
|
|
54
|
-
console.log('\n🔄 正在取消打包...');
|
|
55
|
-
buildProcess.kill('SIGINT');
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
process.on('SIGTERM', () => {
|
|
59
|
-
console.log('\n🔄 正在取消打包...');
|
|
60
|
-
buildProcess.kill('SIGTERM');
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* 启动预览服务
|
|
67
|
-
*/
|
|
68
|
-
function startPreviewServer() {
|
|
69
|
-
console.log('\n🚀 正在启动预览服务器...\n');
|
|
70
|
-
console.log('🔧 调试信息:');
|
|
71
|
-
console.log(' 操作系统:', process.platform);
|
|
72
|
-
console.log(' Windows 模式:', isWindows);
|
|
73
|
-
console.log(' 工作目录:', path.resolve(__dirname, '..'));
|
|
74
|
-
console.log('');
|
|
75
|
-
|
|
76
|
-
const previewProcess = spawn('pnpm', ['run', 'preview:app'], {
|
|
77
|
-
stdio: 'inherit',
|
|
78
|
-
shell: isWindows, // Windows 下需要 shell: true
|
|
79
|
-
cwd: path.resolve(__dirname, '..')
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
previewProcess.on('close', (code) => {
|
|
83
|
-
console.log(`\n🔄 预览服务器已关闭 (退出码: ${code})`);
|
|
84
|
-
restoreMainFile();
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
previewProcess.on('error', (error) => {
|
|
88
|
-
console.error('❌ 启动预览服务器失败:', error);
|
|
89
|
-
restoreMainFile();
|
|
90
|
-
process.exit(1);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
// 处理进程退出信号
|
|
94
|
-
process.on('SIGINT', () => {
|
|
95
|
-
console.log('\n🔄 正在关闭预览服务器...');
|
|
96
|
-
previewProcess.kill('SIGINT');
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
process.on('SIGTERM', () => {
|
|
100
|
-
console.log('\n🔄 正在关闭预览服务器...');
|
|
101
|
-
previewProcess.kill('SIGTERM');
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 主函数
|
|
107
|
-
*/
|
|
108
|
-
async function runPreviewDemo() {
|
|
109
|
-
try {
|
|
110
|
-
// 先选择示例
|
|
111
|
-
await main();
|
|
112
|
-
|
|
113
|
-
// 执行打包
|
|
114
|
-
await runBuild();
|
|
115
|
-
|
|
116
|
-
// 启动预览服务
|
|
117
|
-
startPreviewServer();
|
|
118
|
-
} catch (error) {
|
|
119
|
-
console.error('❌ 预览模式启动失败:', error);
|
|
120
|
-
restoreMainFile();
|
|
121
|
-
process.exit(1);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// 如果直接运行此脚本
|
|
126
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
127
|
-
runPreviewDemo();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export { runPreviewDemo };
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { main, restoreMainFile } from './demo-selector.js';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
// 检测操作系统
|
|
12
|
+
const isWindows = process.platform === 'win32';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 执行打包
|
|
16
|
+
*/
|
|
17
|
+
function runBuild() {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
console.log('\n🔨 正在执行打包...\n');
|
|
20
|
+
console.log('🔧 调试信息:');
|
|
21
|
+
console.log(' 操作系统:', process.platform);
|
|
22
|
+
console.log(' Windows 模式:', isWindows);
|
|
23
|
+
console.log(' 工作目录:', path.resolve(__dirname, '..'));
|
|
24
|
+
console.log('');
|
|
25
|
+
|
|
26
|
+
const buildProcess = spawn('pnpm', ['run', 'build:app'], {
|
|
27
|
+
stdio: 'inherit',
|
|
28
|
+
shell: isWindows, // Windows 下需要 shell: true
|
|
29
|
+
cwd: path.resolve(__dirname, '..'),
|
|
30
|
+
env: {
|
|
31
|
+
...process.env,
|
|
32
|
+
NODE_OPTIONS: '--max-old-space-size=16384'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
buildProcess.on('close', (code) => {
|
|
37
|
+
if (code === 0) {
|
|
38
|
+
console.log('\n✅ 打包完成!');
|
|
39
|
+
console.log('📁 输出目录: dist-app/');
|
|
40
|
+
resolve();
|
|
41
|
+
} else {
|
|
42
|
+
console.error(`\n❌ 打包失败 (退出码: ${code})`);
|
|
43
|
+
reject(new Error(`打包失败,退出码: ${code}`));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
buildProcess.on('error', (error) => {
|
|
48
|
+
console.error('❌ 执行打包失败:', error);
|
|
49
|
+
reject(error);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// 处理进程退出信号
|
|
53
|
+
process.on('SIGINT', () => {
|
|
54
|
+
console.log('\n🔄 正在取消打包...');
|
|
55
|
+
buildProcess.kill('SIGINT');
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
process.on('SIGTERM', () => {
|
|
59
|
+
console.log('\n🔄 正在取消打包...');
|
|
60
|
+
buildProcess.kill('SIGTERM');
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 启动预览服务
|
|
67
|
+
*/
|
|
68
|
+
function startPreviewServer() {
|
|
69
|
+
console.log('\n🚀 正在启动预览服务器...\n');
|
|
70
|
+
console.log('🔧 调试信息:');
|
|
71
|
+
console.log(' 操作系统:', process.platform);
|
|
72
|
+
console.log(' Windows 模式:', isWindows);
|
|
73
|
+
console.log(' 工作目录:', path.resolve(__dirname, '..'));
|
|
74
|
+
console.log('');
|
|
75
|
+
|
|
76
|
+
const previewProcess = spawn('pnpm', ['run', 'preview:app'], {
|
|
77
|
+
stdio: 'inherit',
|
|
78
|
+
shell: isWindows, // Windows 下需要 shell: true
|
|
79
|
+
cwd: path.resolve(__dirname, '..')
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
previewProcess.on('close', (code) => {
|
|
83
|
+
console.log(`\n🔄 预览服务器已关闭 (退出码: ${code})`);
|
|
84
|
+
restoreMainFile();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
previewProcess.on('error', (error) => {
|
|
88
|
+
console.error('❌ 启动预览服务器失败:', error);
|
|
89
|
+
restoreMainFile();
|
|
90
|
+
process.exit(1);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// 处理进程退出信号
|
|
94
|
+
process.on('SIGINT', () => {
|
|
95
|
+
console.log('\n🔄 正在关闭预览服务器...');
|
|
96
|
+
previewProcess.kill('SIGINT');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
process.on('SIGTERM', () => {
|
|
100
|
+
console.log('\n🔄 正在关闭预览服务器...');
|
|
101
|
+
previewProcess.kill('SIGTERM');
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 主函数
|
|
107
|
+
*/
|
|
108
|
+
async function runPreviewDemo() {
|
|
109
|
+
try {
|
|
110
|
+
// 先选择示例
|
|
111
|
+
await main();
|
|
112
|
+
|
|
113
|
+
// 执行打包
|
|
114
|
+
await runBuild();
|
|
115
|
+
|
|
116
|
+
// 启动预览服务
|
|
117
|
+
startPreviewServer();
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error('❌ 预览模式启动失败:', error);
|
|
120
|
+
restoreMainFile();
|
|
121
|
+
process.exit(1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 如果直接运行此脚本
|
|
126
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
127
|
+
runPreviewDemo();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { runPreviewDemo };
|
package/scripts/run-demo.bat
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
REM Windows 批处理文件用于运行演示脚本
|
|
3
|
-
REM 使用方法: run-demo.bat [dev-demo|build-demo|preview-demo]
|
|
4
|
-
|
|
5
|
-
set NODE_OPTIONS=--max-old-space-size=16384
|
|
6
|
-
|
|
7
|
-
if "%1"=="" (
|
|
8
|
-
echo 请指定要运行的脚本:
|
|
9
|
-
echo run-demo.bat dev-demo
|
|
10
|
-
echo run-demo.bat build-demo
|
|
11
|
-
echo run-demo.bat preview-demo
|
|
12
|
-
exit /b 1
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
echo 🔧 调试信息:
|
|
16
|
-
echo Node.js 版本:
|
|
17
|
-
node --version
|
|
18
|
-
echo 操作系统: Windows
|
|
19
|
-
echo 当前目录: %CD%
|
|
20
|
-
echo 脚本参数: %1
|
|
21
|
-
echo.
|
|
22
|
-
|
|
23
|
-
node scripts\%1.js
|
|
24
|
-
|
|
25
|
-
if %ERRORLEVEL% neq 0 (
|
|
26
|
-
echo.
|
|
27
|
-
echo ❌ 脚本执行失败,错误代码: %ERRORLEVEL%
|
|
28
|
-
pause
|
|
29
|
-
exit /b %ERRORLEVEL%
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
echo.
|
|
33
|
-
echo ✅ 脚本执行完成
|
|
34
|
-
pause
|
|
1
|
+
@echo off
|
|
2
|
+
REM Windows 批处理文件用于运行演示脚本
|
|
3
|
+
REM 使用方法: run-demo.bat [dev-demo|build-demo|preview-demo]
|
|
4
|
+
|
|
5
|
+
set NODE_OPTIONS=--max-old-space-size=16384
|
|
6
|
+
|
|
7
|
+
if "%1"=="" (
|
|
8
|
+
echo 请指定要运行的脚本:
|
|
9
|
+
echo run-demo.bat dev-demo
|
|
10
|
+
echo run-demo.bat build-demo
|
|
11
|
+
echo run-demo.bat preview-demo
|
|
12
|
+
exit /b 1
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
echo 🔧 调试信息:
|
|
16
|
+
echo Node.js 版本:
|
|
17
|
+
node --version
|
|
18
|
+
echo 操作系统: Windows
|
|
19
|
+
echo 当前目录: %CD%
|
|
20
|
+
echo 脚本参数: %1
|
|
21
|
+
echo.
|
|
22
|
+
|
|
23
|
+
node scripts\%1.js
|
|
24
|
+
|
|
25
|
+
if %ERRORLEVEL% neq 0 (
|
|
26
|
+
echo.
|
|
27
|
+
echo ❌ 脚本执行失败,错误代码: %ERRORLEVEL%
|
|
28
|
+
pause
|
|
29
|
+
exit /b %ERRORLEVEL%
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
echo.
|
|
33
|
+
echo ✅ 脚本执行完成
|
|
34
|
+
pause
|
|
@@ -4,31 +4,12 @@ import { Brain, Search } from 'lucide-react';
|
|
|
4
4
|
import { rag_dev_server } from '../../utils/testconfigs';
|
|
5
5
|
import { ConfigProvider, Drawer } from 'antd';
|
|
6
6
|
import DrawerGraphPreview from './components/DrawerGraphPreview';
|
|
7
|
+
import Logo from './logo03.png';
|
|
7
8
|
const defaultToken = rag_dev_server.token;
|
|
8
9
|
const defaultUrl = rag_dev_server.url;
|
|
9
10
|
|
|
10
11
|
const mockSenderConfig = {
|
|
11
12
|
switchs: [
|
|
12
|
-
{
|
|
13
|
-
name: 'qaChannel',
|
|
14
|
-
label: '问答渠道',
|
|
15
|
-
type: 'select' as const,
|
|
16
|
-
defaultValue: 1,
|
|
17
|
-
enabled: true,
|
|
18
|
-
options: [
|
|
19
|
-
{ label: '默认', value: 1 },
|
|
20
|
-
{ label: '文档', value: 2 },
|
|
21
|
-
{ label: '视频', value: 3 },
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: '联网搜索',
|
|
26
|
-
name: 'netSearch',
|
|
27
|
-
type: 'checkbox',
|
|
28
|
-
defaultValue: false,
|
|
29
|
-
enabled: true,
|
|
30
|
-
icon: <Search className="w-3 h-3" />,
|
|
31
|
-
},
|
|
32
13
|
{
|
|
33
14
|
label: '推理思考',
|
|
34
15
|
name: 'reasoning',
|
|
@@ -116,10 +97,14 @@ export default function Preview() {
|
|
|
116
97
|
LogoBox: null,
|
|
117
98
|
}}
|
|
118
99
|
senderConfig={mockSenderConfig}
|
|
100
|
+
appLoadingConfig={{
|
|
101
|
+
// title: '"睿思"智能会话助手',
|
|
102
|
+
subtitle: '让智能对话更简单',
|
|
103
|
+
}}
|
|
119
104
|
url={url}
|
|
120
105
|
styles={parsedStyles}
|
|
121
106
|
eventsEmit={(eventName, data) => {
|
|
122
|
-
console.log('
|
|
107
|
+
console.log('事件触发:', event, data);
|
|
123
108
|
setCurFileInfo(data);
|
|
124
109
|
setOpen(true);
|
|
125
110
|
return;
|
|
@@ -158,6 +143,8 @@ export default function Preview() {
|
|
|
158
143
|
}
|
|
159
144
|
}
|
|
160
145
|
}}
|
|
146
|
+
productLogo={Logo as unknown as string}
|
|
147
|
+
scrollOld={false}
|
|
161
148
|
/>
|
|
162
149
|
<ConfigProvider
|
|
163
150
|
drawer={{
|
|
Binary file
|
package/src/main.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import
|
|
3
|
+
import Chat from './examples/chat/index';
|
|
4
4
|
|
|
5
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(<
|
|
5
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(<Chat />);
|
package/src/main.tsx.backup
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import
|
|
3
|
+
import Demo from './examples/Demo/index';
|
|
4
4
|
|
|
5
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(<
|
|
5
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(<Demo />);
|
|
@@ -77,6 +77,10 @@ interface GientechChatAdopterProps {
|
|
|
77
77
|
eventsEmit?: (eventName: string, data: any) => void;
|
|
78
78
|
CustomComponents?: CustomComponents;
|
|
79
79
|
senderConfig?: SenderConfig;
|
|
80
|
+
appLoadingConfig?: {
|
|
81
|
+
title?: string;
|
|
82
|
+
subtitle?: string;
|
|
83
|
+
};
|
|
80
84
|
[key: string]: any;
|
|
81
85
|
}
|
|
82
86
|
|
|
@@ -105,6 +109,7 @@ export default function withGientechChatAdopter(WrappedComponent = AiChat) {
|
|
|
105
109
|
styles,
|
|
106
110
|
CSRFToken,
|
|
107
111
|
eventsEmit,
|
|
112
|
+
scrollOld,
|
|
108
113
|
...rest
|
|
109
114
|
}: GientechChatAdopterProps) {
|
|
110
115
|
// 统一归一化样式:使用 UI 库的 deepMergeTheme
|
|
@@ -459,14 +464,86 @@ export default function withGientechChatAdopter(WrappedComponent = AiChat) {
|
|
|
459
464
|
headers: { Authorization: token },
|
|
460
465
|
})
|
|
461
466
|
.then(res => {
|
|
467
|
+
const r = {
|
|
468
|
+
data: {
|
|
469
|
+
success: true,
|
|
470
|
+
errorMsg: null,
|
|
471
|
+
errorCode: null,
|
|
472
|
+
data: {
|
|
473
|
+
label: '控制器起不来(控制器右上角RDY灯不亮)',
|
|
474
|
+
sessionId: '3d752532b3d4510867288e5ac5cb3833',
|
|
475
|
+
gmtCreate: '2025-11-06 14:30:43',
|
|
476
|
+
gmtModified: '2025-11-06 14:30:43',
|
|
477
|
+
createBy: 'admin',
|
|
478
|
+
updateBy: 'admin',
|
|
479
|
+
filePath: 'http://10.160.33.221:9000',
|
|
480
|
+
configId: 703,
|
|
481
|
+
kbId: null,
|
|
482
|
+
queryReplyPairList: [
|
|
483
|
+
{
|
|
484
|
+
query: {
|
|
485
|
+
id: 27665,
|
|
486
|
+
gmtCreate: '2025-11-06T06:31:05.000+00:00',
|
|
487
|
+
content: '控制器起不来(控制器右上角RDY灯不亮)',
|
|
488
|
+
type: 'text',
|
|
489
|
+
queryId: 'query-2532b3d4510867288e5ac5cb38338870',
|
|
490
|
+
audioUrl: '',
|
|
491
|
+
filePaths: null,
|
|
492
|
+
currentFiles: null,
|
|
493
|
+
},
|
|
494
|
+
reply: {
|
|
495
|
+
id: 27638,
|
|
496
|
+
gmtCreate: '2025-11-06T06:31:15.000+00:00',
|
|
497
|
+
content:
|
|
498
|
+
'<think>\n好的,我现在需要回答用户的问题:“控制器起不来(控制器右上角RDY灯不亮)”。首先,我要查看提供的参考资料,看看是否有相关信息。\n\n参考资料0提到了现象“控制器起不来(控制器右上角RDY灯不亮)”,并关联到“包含”和“产生”关系,但没有提供处理方法。参考资料1和2都详细描述了这个现象,并且都给出了处理方法:检查NT255模块是否报红,更换模块,并特别提到机舱检查FS211/N模块。这些处理方法的ID都是10001,说明是同一个解决方案。\n\n用户的问题没有指定版本,根据规则2,我应该使用最新的版本信息。不过,参考资料中没有明确的版本日期,所以只能假设它们都是最新的。因此,我应该综合所有参考资料的信息,提供处理方法。\n\n最后,我需要按照要求,用简洁的语言回答,并标注来源。由于处理方法在参考资料1和2中都有,我会引用这两个来源。\n\n\n</think>\n\n控制器起不来(控制器右上角RDY灯不亮)的处理方法如下:\n\n1. 检查NT255模块是否报红(ERR灯是否亮红)[retrive-tag id="2290607639633892359" image_urls="" fromType="2"][1][/retrive-tag][retrive-tag id="439368868506707299" image_urls="" fromType="2"][2][/retrive-tag]。\n2. 更换NT255模块(注:机舱检查FS211/N模块)[retrive-tag id="2290607639633892359" image_urls="" fromType="2"][1][/retrive-tag][retrive-tag id="439368868506707299" image_urls="" fromType="2"][2][/retrive-tag]。\n\n这些步骤可以帮助解决控制器无法启动的问题。',
|
|
499
|
+
type: 'text',
|
|
500
|
+
reference: '[]',
|
|
501
|
+
webReference: '[]',
|
|
502
|
+
graphReference:
|
|
503
|
+
'[{"cyphers":["match (n:`组件`)-[e]-(m) where id(n) == \\"组件101\\" return n,e,m;","match (n:`现象`)-[e]-(m) where id(n) == \\"现象1001\\" return n,e,m;","match (n:`现象`)-[e]-(m) where id(n) == \\"现象1001\\" return n,e,m;"],"fetchUrl":"https://10.160.33.150:30001/jinxin_graph/proxy/search/graph/search/cypherSearch4Rag","graphName":"故障处理图谱","id":"1952195957278367755","traceNodes":[{"graphId":"1952195957278367755","id":"3484145002858895870","name":"控制器","nodeType":"组件","vid":"组件101"},{"graphId":"1952195957278367755","id":"2290607639633892359","name":"控制器起不来(控制器右上角RDY灯不亮)","nodeType":"现象","vid":"现象1001"},{"graphId":"1952195957278367755","id":"439368868506707299","name":"控制器起不来(控制器右上角RDY灯不亮)","nodeType":"现象","vid":"现象1001"}]}]',
|
|
504
|
+
queryId: 'query-2532b3d4510867288e5ac5cb38338870',
|
|
505
|
+
feedbackResult: null,
|
|
506
|
+
feedbackId: null,
|
|
507
|
+
parsedFilePaths: null,
|
|
508
|
+
recommendQuestion:
|
|
509
|
+
'["在检查NT255模块时,ERR灯亮红可能表示哪些具体问题?","更换NT255模块时需要注意哪些步骤或注意事项?","除了检查和更换NT255模块,还有哪些方法可以排查控制器无法启动的问题?"]',
|
|
510
|
+
llmType: 1,
|
|
511
|
+
resultType: 1,
|
|
512
|
+
respTime: 32453,
|
|
513
|
+
tokens: 824,
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
searchConfigDTO: {
|
|
518
|
+
id: 703,
|
|
519
|
+
status: 1,
|
|
520
|
+
isDefault: 0,
|
|
521
|
+
configJson:
|
|
522
|
+
'{"status":1,"defaultAnswer":"您好!我注意到您的消息中可能包含了一些敏感的内容。为了保证社区的友好氛围,我们无法继续就此话题进行讨论。如果您有其他问题或需要帮助,我很乐意继续为您服务!谢谢您的理解和支持。","dependOnKb":1,"isDel":1,"config_name":"图谱测试","model_name":"deepseek-distill-qwen32b","plan_model_name":"deepseek-distill-qwen32b","prologue":"你好","system_prompt":"","recommend_model_name":"deepseek-distill-qwen32b","temperature":0.3,"top_p":0.8,"top_k":10,"score_threshold":0.1,"max_tokens":4096,"max_round":5,"rerank_model_name":"bge-reranker-v2-m3_xinference","knowledge_base_name_source":"","graph_nb_name":[{"graph_name":"故障处理图谱","index_name":"1952195957278367755"}],"thinking":false,"knowledge_base_name":"","selectedKnowledgeBase":[],"enabled_graph":false,"enabled_nb_graph":true,"need_trace_source":true,"trace_by_llm":true,"is_download":false,"search_policy":1,"enabled_question_rewrite":false,"enabled_faq":true,"enabled_rerank":true,"rerank":false}',
|
|
523
|
+
name: '图谱测试',
|
|
524
|
+
des: null,
|
|
525
|
+
createBy: 'admin',
|
|
526
|
+
gmtCreate: '2025-11-05 19:37:54',
|
|
527
|
+
permission: null,
|
|
528
|
+
sensitiveWordIds: '',
|
|
529
|
+
defaultAnswer:
|
|
530
|
+
'您好!我注意到您的消息中可能包含了一些敏感的内容。为了保证社区的友好氛围,我们无法继续就此话题进行讨论。如果您有其他问题或需要帮助,我很乐意继续为您服务!谢谢您的理解和支持。',
|
|
531
|
+
model: false,
|
|
532
|
+
enabledFaq: 0,
|
|
533
|
+
dependOnKb: 1,
|
|
534
|
+
isDel: 1,
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
};
|
|
462
539
|
// 如果会话没有数据(例如新建的),直接返回
|
|
463
540
|
|
|
464
|
-
if (!
|
|
541
|
+
if (!r.data.data) {
|
|
465
542
|
setAppStatus(prev => ({ ...prev, display: 'ready' }));
|
|
466
543
|
return;
|
|
467
544
|
}
|
|
468
545
|
// 解析消息数据
|
|
469
|
-
const queryReplyPairList =
|
|
546
|
+
const queryReplyPairList = r.data.data?.queryReplyPairList || [];
|
|
470
547
|
const messages = convertQueryReplyPairListToMessages(queryReplyPairList);
|
|
471
548
|
const {
|
|
472
549
|
sessionId,
|
|
@@ -1705,6 +1782,7 @@ export default function withGientechChatAdopter(WrappedComponent = AiChat) {
|
|
|
1705
1782
|
styles={normalizedStyles}
|
|
1706
1783
|
selectedId={selectedAssistantId}
|
|
1707
1784
|
onSelectAssistant={setSelectedAssistantId}
|
|
1785
|
+
productLogo={rest?.productLogo}
|
|
1708
1786
|
/>
|
|
1709
1787
|
);
|
|
1710
1788
|
}, [selectedAssistantId]);
|
|
@@ -1838,7 +1916,12 @@ export default function withGientechChatAdopter(WrappedComponent = AiChat) {
|
|
|
1838
1916
|
subMsg="无法完成应用初始化,这可能是由于网络连接问题或服务配置错误导致的。请检查您的网络连接并重试。"
|
|
1839
1917
|
/>
|
|
1840
1918
|
),
|
|
1841
|
-
AppLoading: () =>
|
|
1919
|
+
AppLoading: () => (
|
|
1920
|
+
<AppLoading
|
|
1921
|
+
title={rest?.appLoadingConfig?.title}
|
|
1922
|
+
subtitle={rest?.appLoadingConfig?.subtitle || ''}
|
|
1923
|
+
/>
|
|
1924
|
+
),
|
|
1842
1925
|
UserChatBox: (msg: any, idx: number) => {
|
|
1843
1926
|
return (
|
|
1844
1927
|
<ChatMessageAdapter
|
|
@@ -1915,7 +1998,7 @@ export default function withGientechChatAdopter(WrappedComponent = AiChat) {
|
|
|
1915
1998
|
fileUploadStatus={fileStatuses}
|
|
1916
1999
|
CustomComponents={mergedCustomComponents}
|
|
1917
2000
|
activeSessionId={activeSessionId}
|
|
1918
|
-
|
|
2001
|
+
scrollOld={scrollOld}
|
|
1919
2002
|
/>
|
|
1920
2003
|
<FeedBackModal
|
|
1921
2004
|
open={openFeed}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
export default function AppLoading() {
|
|
3
|
+
export default function AppLoading({ title, subtitle }: { title?: string; subtitle?: string }) {
|
|
4
4
|
const [progress, setProgress] = useState(0);
|
|
5
5
|
|
|
6
6
|
useEffect(() => {
|
|
@@ -33,8 +33,10 @@ export default function AppLoading() {
|
|
|
33
33
|
</defs>
|
|
34
34
|
</svg>
|
|
35
35
|
</div> */}
|
|
36
|
-
<div className="mt-6 text-2xl font-semibold text-[#222222] tracking-wide"
|
|
37
|
-
|
|
36
|
+
<div className="mt-6 text-2xl font-semibold text-[#222222] tracking-wide">
|
|
37
|
+
{title || '小鲸智能会话助手'}
|
|
38
|
+
</div>
|
|
39
|
+
<div className="mt-2 text-sm text-[#555555]">{subtitle || '让智能对话更简单'}</div>
|
|
38
40
|
</div>
|
|
39
41
|
|
|
40
42
|
{/* 进度条 */}
|
|
@@ -45,17 +47,15 @@ export default function AppLoading() {
|
|
|
45
47
|
style={{ width: `${Math.min(progress, 100)}%` }}
|
|
46
48
|
/>
|
|
47
49
|
</div>
|
|
48
|
-
<div className="absolute -right-2 top-5 text-sm text-[#555555]">
|
|
50
|
+
<div className="absolute -right-2 top-5 text-sm text-[#555555]">
|
|
51
|
+
{Math.min(Math.round(progress), 100)}%
|
|
52
|
+
</div>
|
|
49
53
|
</div>
|
|
50
54
|
|
|
51
55
|
{/* 加载提示 */}
|
|
52
56
|
<div className="mt-8 flex flex-col items-center gap-2">
|
|
53
|
-
<div className="text-sm text-[#555555] animate-pulse">
|
|
54
|
-
|
|
55
|
-
</div>
|
|
56
|
-
<div className="text-xs text-[#888888]">
|
|
57
|
-
首次加载可能需要一些时间,请耐心等待
|
|
58
|
-
</div>
|
|
57
|
+
<div className="text-sm text-[#555555] animate-pulse">正在初始化应用</div>
|
|
58
|
+
<div className="text-xs text-[#888888]">首次加载可能需要一些时间,请耐心等待</div>
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const token =
|
|
2
|
-
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
2
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJHSUVOLVJBRyIsImF1ZCI6IkpJQUJJTkJJTjAwIiwidXNlcklkIjoxMjQzLCJ1c2VyTmFtZSI6IkpJQUJJTkJJTjAwIiwic3ViIjoibWl4ZWRRdWFudHVtIiwiZXhwIjoxNzYyNDkyMDk5LCJpYXQiOjE3NjI0MDU2OTl9.onc_FBt807jwmpNUuLLoclvqPgMD5qXUhz9ZpxuZIAM';
|
|
3
3
|
export const rag_dev_server = {
|
|
4
4
|
token,
|
|
5
5
|
|