HTTP support jsonPath; System plugin support save file. (#2969)

* perf: system plugin auto save file

* feat: http support jsonPath

* fix: assistant response

* reset milvus version

* fix: textarea register

* fix: global variable

* delete tip

* doc
This commit is contained in:
Archer
2024-10-23 00:40:54 +08:00
committed by shilin66
parent 036bdabe5d
commit ab08fc80d3
30 changed files with 374 additions and 163 deletions

15
packages/plugins/utils.ts Normal file
View File

@@ -0,0 +1,15 @@
import path from 'path';
import * as fs from 'fs';
const isProduction = process.env.NODE_ENV === 'production';
export const getFileSavePath = (name: string) => {
if (isProduction) {
return `/app/plugin_file/${name}`;
}
const filePath = path.join(process.cwd(), 'local', 'plugin_file', name);
fs.mkdirSync(path.dirname(filePath), { recursive: true });
return filePath;
};