Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,723 changes: 1,723 additions & 0 deletions .claude/design/projects_app_performance_stability_analysis.md

Large diffs are not rendered by default.

1,278 changes: 1,278 additions & 0 deletions .claude/design/projects_app_performance_stability_deep_analysis.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ README.md
.yalc/
yalc.lock
testApi/
*.local.*
*.local.*
*.local
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ files/helm/fastgpt/charts/*.tgz

tmp/
coverage
document/.source
document/.source

projects/app/worker/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ ifeq ($(proxy), taobao)
else ifeq ($(proxy), clash)
docker build -f $(filePath) -t $(image) . --network host --build-arg HTTP_PROXY=http://127.0.0.1:7890 --build-arg HTTPS_PROXY=http://127.0.0.1:7890
else
docker build -f $(filePath) -t $(image) .
docker build --progress=plain -f $(filePath) -t $(image) .
endif
1 change: 1 addition & 0 deletions document/content/docs/upgrading/4-13/4132.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ S3_PUBLIC_BUCKET=S3公开桶名称(公开读私有写)

1. 非管理员无法看到团队审计日志。
2. 引入 S3 用于存储应用头像。
3. 工作流画布性能。

## 🐛 修复

Expand Down
2 changes: 1 addition & 1 deletion document/data/doc-last-modified.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-30T16:00:10+08:00",
"document/content/docs/upgrading/4-13/4131.mdx": "2025-09-30T15:47:06+08:00",
"document/content/docs/upgrading/4-13/4132.mdx": "2025-10-17T21:17:58+08:00",
"document/content/docs/upgrading/4-13/4132.mdx": "2025-10-17T21:40:12+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",
Expand Down
4 changes: 4 additions & 0 deletions packages/global/common/string/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export const getTextValidLength = (chunk: string) => {
return chunk.replaceAll(/[\s\n]/g, '').length;
};

export const isObjectId = (str: string) => {
return /^[0-9a-fA-F]{24}$/.test(str);
};
19 changes: 13 additions & 6 deletions packages/service/common/mongo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,19 @@ export const getMongoLogModel = <T>(name: string, schema: mongoose.Schema) => {
};

const syncMongoIndex = async (model: Model<any>) => {
if (process.env.SYNC_INDEX !== '0' && process.env.NODE_ENV !== 'test') {
try {
model.syncIndexes({ background: true });
} catch (error) {
addLog.error('Create index error', error);
}
if (
process.env.NODE_ENV === 'test' ||
process.env.SYNC_INDEX === '0' ||
process.env.NEXT_PHASE === 'phase-production-build' ||
!MONGO_URL
) {
return;
}

try {
await model.syncIndexes({ background: true });
} catch (error) {
addLog.error('Create index error', error);
}
};

Expand Down
19 changes: 6 additions & 13 deletions packages/service/common/response/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,12 @@ export const jsonRes = <T = any>(
clearCookie(res);
}

res.status(processedError.code);

// 如果有自定义消息,直接发送
if (message) {
res.send(message);
} else {
res.json({
code: processedError.code,
statusText: processedError.statusText,
message: processedError.message,
data: processedError.data !== undefined ? processedError.data : null
});
}
res.status(500).json({
code: processedError.code,
statusText: processedError.statusText,
message: message || processedError.message,
data: processedError.data !== undefined ? processedError.data : null
});

return;
}
Expand Down
10 changes: 8 additions & 2 deletions packages/service/common/s3/buckets/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ export class S3BaseBucket {
if (this.options.externalBaseURL) {
const externalBaseURL = new URL(this.options.externalBaseURL);
const endpoint = externalBaseURL.hostname;
const useSSL = externalBaseURL.protocol === 'https';
const useSSL = externalBaseURL.protocol === 'https:';

const externalPort = externalBaseURL.port
? parseInt(externalBaseURL.port)
: useSSL
? 443
: undefined; // https 默认 443,其他情况让 MinIO 客户端使用默认端口

this._externalClient = new Client({
useSSL: useSSL,
endPoint: endpoint,
port: options.port,
port: externalPort,
accessKey: options.accessKey,
secretKey: options.secretKey,
transportAgent: options.transportAgent
Expand Down
7 changes: 6 additions & 1 deletion packages/service/core/ai/config/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ export const loadSystemModels = async (init = false, language = 'en') => {

if (!init && global.systemModelList) return;

await preloadModelProviders();
try {
await preloadModelProviders();
} catch (error) {
console.log('Load systen model error, please check fastgpt-plugin', error);
return Promise.reject(error);
}

global.systemModelList = [];
global.systemActiveModelList = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/service/worker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getSafeEnv = () => {
};

export const getWorker = (name: `${WorkerNameEnum}`) => {
const workerPath = path.join(process.cwd(), '.next', 'server', 'worker', `${name}.js`);
const workerPath = path.join(process.cwd(), 'worker', `${name}.js`);
return new Worker(workerPath, {
env: getSafeEnv()
});
Expand Down
Loading
Loading