@gientech/modual 1.5.2 → 1.5.3

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "MIT",
4
4
  "style": "assets/style.css",
5
5
  "private": false,
6
- "version": "1.5.2",
6
+ "version": "1.5.3",
7
7
  "author": "hanfeng_Zhang",
8
8
  "type": "module",
9
9
  "main": "index.js",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gientech/modual",
3
3
  "private": false,
4
4
  "author": "hanfeng_Zhang",
5
- "version": "1.5.2",
5
+ "version": "1.5.3",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -76,8 +76,8 @@
76
76
  "@mxmweb/zui-theme": "^2.*",
77
77
  "antd": "^5.18.0",
78
78
  "axios": "^1.7.2",
79
- "@mxmweb/aichat": "1.9.0",
80
- "@mxmweb/rtext": "1.2.1"
79
+ "@mxmweb/rtext": "1.2.1",
80
+ "@mxmweb/aichat": "1.9.0"
81
81
  },
82
82
  "devDependencies": {
83
83
  "clipboard": "^2.0.11",
@@ -128,31 +128,43 @@ export const ReferenceBar = ({
128
128
 
129
129
  const dealData = (type: string, data: any[]) => {
130
130
  if (type === ListName.GRAPH) {
131
- return data.map(item => {
132
- return {
133
- ...item,
134
- name: item.graphName,
135
- };
136
- });
131
+ return data
132
+ .map(item => {
133
+ return {
134
+ ...item,
135
+ name: item.graphName,
136
+ };
137
+ })
138
+ .sort((a, b) => {
139
+ return (b.score || 0) - (a.score || 0);
140
+ });
137
141
  }
138
142
 
139
143
  if (type === ListName.KNOWLEDGE) {
140
- return data.map(item => {
141
- return {
142
- ...item,
143
- name: item.file_name,
144
- score: item.rrf_score,
145
- };
146
- });
144
+ return data
145
+ .map(item => {
146
+ return {
147
+ ...item,
148
+ name: item.file_name,
149
+ score: item.rrf_score,
150
+ };
151
+ })
152
+ .sort((a, b) => {
153
+ return (b.score || 0) - (a.score || 0);
154
+ });
147
155
  }
148
156
 
149
157
  if (type === ListName.SEARCH) {
150
- return data.map(item => {
151
- return {
152
- ...item,
153
- name: item.file_name,
154
- };
155
- });
158
+ return data
159
+ .map(item => {
160
+ return {
161
+ ...item,
162
+ name: item.file_name,
163
+ };
164
+ })
165
+ .sort((a, b) => {
166
+ return (b.score || 0) - (a.score || 0);
167
+ });
156
168
  }
157
169
 
158
170
  return data;
@@ -223,6 +235,8 @@ export const ReferenceBar = ({
223
235
 
224
236
  const curBtns = BTNS.filter((item: any) => {
225
237
  return lists[item.key]?.length;
238
+ }).sort((a, b) => {
239
+ return (lists[b.key]?.length || 0) - (lists[a.key]?.length || 0);
226
240
  });
227
241
 
228
242
  setBtns(curBtns);
@@ -11,8 +11,6 @@ import '@mxmweb/zui/style.css';
11
11
  import { defaultTheme, deepMergeTheme, type Styles } from '@mxmweb/zui';
12
12
  import { DefaultSenderConfig } from './constants';
13
13
  import GientechConversationPanel from './Conversations';
14
- import { registerPDFWorker } from '@mxmweb/fviewer';
15
- registerPDFWorker('/worker/pdf.worker1.min.js');
16
14
  import {
17
15
  convertQueryReplyPairListToMessages,
18
16
  getFileTypeByName,
@@ -1,7 +1,7 @@
1
1
  import { uid } from 'uid';
2
2
  import { useMemo } from 'react';
3
3
  import { dealMinioUrl, getFileName, getFilePath, getFileType, getInitialZoom } from '../utils';
4
- import { GientechStreamReader } from '@gientech/modual/streamFilesReader';
4
+ import { GientechStreamReader } from '../../streamFilesReader';
5
5
  export const DrawerContent = ({
6
6
  content,
7
7
  onClose,
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
  import { dealMinioUrl, getFileName, getFilePath, getFileType, getInitialZoom } from '../utils';
3
- import { GientechStreamReader } from '@gientech/modual/streamFilesReader';
3
+ import { GientechStreamReader } from '../../streamFilesReader';
4
4
 
5
5
  const DrawerPreview = ({
6
6
  curFileInfo,
@@ -1,5 +1,5 @@
1
1
  const token =
2
- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJHSUVOLVJBRyIsImF1ZCI6IkpJQUJJTkJJTjAwIiwidXNlcklkIjoxMjQzLCJ1c2VyTmFtZSI6IkpJQUJJTkJJTjAwIiwic3ViIjoibWl4ZWRRdWFudHVtIiwiZXhwIjoxNzYyOTMxOTA4LCJpYXQiOjE3NjI4NDU1MDh9.mqneHIhe-T0isGc9JrdZDpWrzaogBqec13XBVlWsZOQ';
2
+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJHSUVOLVJBRyIsImF1ZCI6IkpJQUJJTkJJTjAwIiwidXNlcklkIjoxMjQzLCJ1c2VyTmFtZSI6IkpJQUJJTkJJTjAwIiwic3ViIjoibWl4ZWRRdWFudHVtIiwiZXhwIjoxNzYyOTk1MjEzLCJpYXQiOjE3NjI5MDg4MTN9.ISCA-8AotHCzL_8ULNOLQDr9G0sB-IuEe1sR4YV_nIs';
3
3
  export const rag_dev_server = {
4
4
  token,
5
5