mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-05 01:02:59 +08:00
4.13.1 features (#5728)
* fix(api): 修复二级路由下的页面判断逻辑 在请求错误处理中,添加基础URL前缀以正确判断当前是否为外部链接页面。 * perf: use global var * remove invalid code * feat: response limit;perf: copy avatar image;perf: markdown parse (#5719) * feat: response limit * remove placeholder * perf: copy avatar image * perf: markdown parse * fix: child app cannot show cite * doc * fix: node template bugs (#5727) * add dataset search count track (#5721) * add dataset search count track * remove pro * change to track * remove unused * fix * perf: track code --------- Co-authored-by: archer <545436317@qq.com> * http response limit * deploy doc * fix: test * doc * remove invalid code * remove invalid code --------- Co-authored-by: 戴盛利 <1639499287@qq.com> Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
@@ -549,6 +549,7 @@ const dbPluginFormat = (item: SystemPluginConfigSchemaType): SystemPluginTemplat
|
||||
/* FastsGPT-Pluign api: */
|
||||
export const refreshSystemTools = async (): Promise<SystemPluginTemplateItemType[]> => {
|
||||
const tools = await APIGetSystemToolList();
|
||||
|
||||
// 从数据库里加载插件配置进行替换
|
||||
const systemToolsArray = await MongoSystemPlugin.find({}).lean();
|
||||
const systemTools = new Map(systemToolsArray.map((plugin) => [plugin.pluginId, plugin]));
|
||||
@@ -596,7 +597,7 @@ export const refreshSystemTools = async (): Promise<SystemPluginTemplateItemType
|
||||
.map((item) => dbPluginFormat(item));
|
||||
|
||||
const concatTools = [...formatTools, ...dbPlugins];
|
||||
concatTools.sort((a, b) => (a.pluginOrder ?? 0) - (b.pluginOrder ?? 0));
|
||||
concatTools.sort((a, b) => (a.pluginOrder ?? 999) - (b.pluginOrder ?? 999));
|
||||
|
||||
global.systemToolsTypeCache = {};
|
||||
concatTools.forEach((item) => {
|
||||
|
||||
Reference in New Issue
Block a user