mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 18:48:55 +00:00
4.8.21 feature (#3720)
* agent search demo * edit form force close image select * feat: llm params and doubao1.5 * perf: model error tip * fix: template register path * package
This commit is contained in:
@@ -7,7 +7,12 @@ import { AppTemplateSchemaType } from '@fastgpt/global/core/app/type';
|
||||
|
||||
const getTemplateNameList = () => {
|
||||
const currentFileUrl = new URL(import.meta.url);
|
||||
const templatesPath = path.join(path.dirname(currentFileUrl.pathname), 'src');
|
||||
const filePath = decodeURIComponent(
|
||||
process.platform === 'win32'
|
||||
? currentFileUrl.pathname.substring(1) // Remove leading slash on Windows
|
||||
: currentFileUrl.pathname
|
||||
);
|
||||
const templatesPath = path.join(path.dirname(filePath), 'src');
|
||||
|
||||
return fs.readdirSync(templatesPath) as string[];
|
||||
};
|
||||
|
Reference in New Issue
Block a user