Skip to content

Conversation

c121914yu
Copy link
Collaborator

No description provided.

Copy link

cla-assistant bot commented Jul 21, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ c121914yu
✅ colnii
✅ newfish-cmyk
❌ chuanhu9
You have signed the CLA already but the status is still pending? Let us recheck it.

c121914yu and others added 20 commits July 21, 2025 22:27
* feat: error catch

* feat: workflow catch error

* perf: add catch error to node

* feat: system tool error catch

* catch error

* fix: ts
* doc

* perf: training queue code
* feat: 批量重试异常数据 & 报错信息国际化

  - 新增“全部重试”按钮,支持批量重试所有训练异常数据
  - 报错信息支持国际化,常见错误自动映射为 i18n key
  - 相关文档和 i18n 资源已同步更新

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism

* feat: add retry_failed i18n key

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism

* feat: enhance error message and retry mechanism : 5

* feat: enhance error message and retry mechanism : 6

* feat: enhance error message and retry mechanism : 7

* feat: enhance error message and retry mechanism : 8
* perf: copy hook

* doc

* doc
* add app evaluation

* fix

* usage

* variables

* editing condition

* var ui

* isplus filter

* migrate code

* remove utils

* name

* update type

* build

* fix

* fix

* fix

* delete comment

* fix
* feat: update side bar layout; add login and logout logic at chat page

* refactor: encapsulate login logic and reuse it in `LoginModal` and `Login` page

* chore: improve some logics and comments

* chore: improve some logics

* chore: remove redundant side effect; add translations

---------

Co-authored-by: Archer <[email protected]>
* eval scroll pagination

* change eval list to manual pagination

* number

* fix build

* fix
* version doc

* version doc

* doc

* feat: eval model select

* config eval model

* perf: eval detail modal ui

* doc

* doc

* fix: chat store reload
Copy link

github-actions bot commented Jul 21, 2025

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_a0ae1112fe6f992449b60139e4fda8b1938f4b1e

Copy link

github-actions bot commented Jul 21, 2025

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_a0ae1112fe6f992449b60139e4fda8b1938f4b1e

Copy link

github-actions bot commented Jul 21, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 22.07% 12296 / 55708
🔵 Statements 22.07% 12296 / 55708
🔵 Functions 29.79% 340 / 1141
🔵 Branches 68.26% 899 / 1317
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/global/common/error/utils.ts 24% 100% 0% 24% 5-23, 27-29
packages/global/common/error/code/user.ts 100% 100% 100% 100%
packages/global/common/system/utils.ts 38.88% 80% 66.66% 38.88% 13-18, 23-41
packages/global/core/app/evaluation/constants.ts 0% 0% 0% 0% 1-22
packages/global/core/app/evaluation/utils.ts 0% 100% 100% 0% 3-10
packages/global/core/app/mcpTools/utils.ts 9.09% 100% 0% 9.09% 19-53, 56-99
packages/global/core/workflow/constants.ts 100% 100% 100% 100%
packages/global/core/workflow/utils.ts 8.83% 100% 0% 8.83% 56-61, 64-68, 72-77, 79-128, 132-174, 177-187, 195-196, 199-236, 239-311, 314-327, 330-343, 346-352, 356-357, 364-371, 379-385, 388-389, 393-424, 428-447
packages/global/core/workflow/node/constant.ts 100% 100% 100% 100%
packages/global/core/workflow/runtime/utils.ts 22.76% 88.13% 13.33% 22.76% 24-33, 35-49, 139-142, 147-148, 157-194, 197-208, 211-234, 237-259, 262-267, 274-362, 370-417, 420-441, 444-487, 490-520, 524-546
packages/global/core/workflow/template/output.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/agent.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/datasetSearch.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/http468.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/laf.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/aiChat/index.ts 97.2% 100% 0% 97.2% 159-162
packages/global/core/workflow/template/system/contextExtract/index.ts 100% 100% 100% 100%
packages/global/core/workflow/template/system/sandbox/index.ts 100% 100% 100% 100%
packages/global/support/user/audit/constants.ts 100% 100% 100% 100%
packages/global/support/wallet/usage/constants.ts 100% 100% 100% 100%
packages/service/common/bullmq/index.ts 0% 0% 0% 0% 1-89
packages/service/common/otel/trace/register.ts 0% 0% 0% 0% 1-16
packages/service/core/ai/model.ts 54.9% 66.66% 31.25% 54.9% 19-20, 23-25, 35-37, 41-43, 47-49, 52-59, 61-62
packages/service/core/ai/config/utils.ts 0% 0% 0% 0% 1-248
packages/service/core/app/utils.ts 0% 0% 0% 0% 1-196
packages/service/core/app/evaluation/evalItemSchema.ts 0% 0% 0% 0% 1-56
packages/service/core/app/evaluation/evalSchema.ts 0% 0% 0% 0% 1-57
packages/service/core/app/evaluation/mq.ts 0% 0% 0% 0% 1-80
packages/service/core/app/plugin/controller.ts 5.46% 100% 0% 5.46% 49-70, 81-352, 355-392, 395-396, 399-406, 409-485, 488-501
packages/service/core/app/plugin/systemPluginSchema.ts 100% 100% 100% 100%
packages/service/core/chat/saveChat.ts 5.85% 100% 0% 5.85% 38-174, 177-276
packages/service/core/workflow/dispatch/index.ts 12.15% 100% 0% 12.15% 137-846, 850-873, 877-901
packages/service/core/workflow/dispatch/utils.ts 13.96% 80% 11.11% 13.96% 23-71, 74-85, 102-110, 114-131, 133-141, 144-152, 155-211, 214-238
packages/service/core/workflow/dispatch/abandoned/runApp.ts 11.62% 100% 0% 11.62% 33-117
packages/service/core/workflow/dispatch/ai/chat.ts 5.84% 100% 0% 5.84% 81-620
packages/service/core/workflow/dispatch/ai/classifyQuestion.ts 11.8% 100% 0% 11.8% 43-110, 113-185
packages/service/core/workflow/dispatch/ai/extract.ts 6.45% 100% 0% 6.45% 56-167, 170-190, 193-299, 302-389
packages/service/core/workflow/dispatch/ai/agent/index.ts 7.03% 100% 0% 7.03% 43-308, 311-362, 369-411
packages/service/core/workflow/dispatch/child/runApp.ts 8.43% 100% 0% 8.43% 38-208
packages/service/core/workflow/dispatch/dataset/concat.ts 13.79% 100% 0% 13.79% 21-48
packages/service/core/workflow/dispatch/dataset/search.ts 4.86% 100% 0% 4.86% 50-288
packages/service/core/workflow/dispatch/interactive/formInput.ts 10.86% 100% 0% 10.86% 25-70
packages/service/core/workflow/dispatch/interactive/userSelect.ts 10.63% 100% 0% 10.63% 21-69
packages/service/core/workflow/dispatch/loop/runLoop.ts 5.83% 100% 0% 5.83% 26-161
packages/service/core/workflow/dispatch/loop/runLoopStart.ts 21.42% 100% 0% 21.42% 19-29
packages/service/core/workflow/dispatch/plugin/run.ts 10.95% 100% 0% 10.95% 40-188
packages/service/core/workflow/dispatch/plugin/runInput.ts 15.62% 100% 0% 15.62% 19-55
packages/service/core/workflow/dispatch/tools/answer.ts 16% 100% 0% 16% 17-40
packages/service/core/workflow/dispatch/tools/http468.ts 6.94% 100% 0% 6.94% 71-433
packages/service/core/workflow/dispatch/tools/queryExternsion.ts 14.75% 100% 0% 14.75% 25-83
packages/service/core/workflow/dispatch/tools/readFiles.ts 8.8% 100% 0% 8.8% 27-45, 48-93, 96-113, 116-252
packages/service/core/workflow/dispatch/tools/runIfElse.ts 5.08% 100% 0% 5.08% 30-133, 136-171
packages/service/core/workflow/dispatch/tools/runLaf.ts 4.83% 100% 0% 4.83% 28-223
packages/service/core/workflow/dispatch/tools/textEditor.ts 12.5% 100% 0% 12.5% 17-50
packages/service/support/permission/teamLimit.ts 36.89% 16.66% 33.33% 36.89% 13-25, 28-41, 55-56, 60-68, 72-91, 104-105, 109-115, 119-126
packages/service/support/permission/evaluation/auth.ts 0% 0% 0% 0% 1-64
packages/service/support/wallet/usage/controller.ts 7.86% 100% 0% 7.86% 14-27, 30-70, 81-169, 172-197, 200-237, 240-280
packages/web/components/common/Icon/constants.ts 0% 100% 100% 0% 3-491
packages/web/i18n/constants.ts 0% 0% 0% 0% 1-32
packages/web/styles/theme.ts 0% 0% 0% 0% 1-881
packages/web/support/user/audit/constants.ts 0% 0% 0% 0% 1-502
projects/app/src/pages/api/core/app/del.ts 0% 100% 100% 0% 2-148
projects/app/src/pages/api/core/app/list.ts 0% 0% 0% 0% 1-219
projects/app/src/pages/api/core/dataset/collection/list.ts 0% 100% 100% 0% 2-188
projects/app/src/pages/api/core/dataset/collection/listV2.ts 0% 100% 100% 0% 2-186
projects/app/src/pages/api/core/dataset/training/updateTrainingData.ts 100% 100% 100% 100%
projects/app/src/service/common/system/index.ts 27.27% 100% 16.66% 27.27% 26-46, 52-54, 57-58, 61-63, 66-68, 71-73, 83-103, 126-207
projects/app/src/service/core/dataset/queues/datasetParse.ts 0% 100% 100% 0% 3-360
projects/app/src/service/core/dataset/queues/generateQA.ts 0% 0% 0% 0% 1-248
projects/app/src/service/core/dataset/queues/generateVector.ts 0% 0% 0% 0% 1-294
projects/app/src/web/core/app/api/evaluation.ts 0% 0% 0% 0% 1-58
projects/app/src/web/core/chat/context/useChatStore.ts 0% 0% 0% 0% 1-134
projects/app/src/web/core/workflow/utils.ts 38.28% 67.39% 33.33% 38.28% 88, 127-132, 172-187, 191-201, 205-218, 222-258, 329-376, 396-397, 406-407, 410-430, 432-442, 453-518, 525-540, 544-656, 661-711
Generated in workflow #1506 for commit a0ae111 by the Vitest Coverage Report Action

Copy link

github-actions bot commented Jul 21, 2025

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_a0ae1112fe6f992449b60139e4fda8b1938f4b1e

@c121914yu c121914yu requested a review from Copilot July 21, 2025 15:28
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces v4.11.0 features including application evaluation capabilities, workflow error handling improvements, and UX enhancements for the chat interface.

Key Changes

  • Added application evaluation system (beta) for supervised scoring in the commercial version
  • Implemented error catch branches for workflow nodes with catchError support
  • Enhanced chat page UX with independent tab functionality and improved user interface
  • Added new model configurations and system tracing support

Reviewed Changes

Copilot reviewed 191 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
projects/mcp_server/Dockerfile Added packages/web dependency for MCP server build
projects/app/src/web/core/workflow/utils.ts Enhanced workflow utilities with error handling and adapted legacy nodes
projects/app/src/web/core/chat/context/useChatStore.ts Fixed storage format compatibility with version/state structure
projects/app/src/web/core/app/api/evaluation.ts New evaluation API endpoints for CRUD operations
projects/app/src/service/core/dataset/queues/ Refactored queue processing to use loops instead of recursion
projects/app/src/pages/login/index.tsx Simplified login page by extracting logic to reusable components
projects/app/src/pages/chat/index.tsx Major refactor for independent chat page with improved authentication
projects/app/src/pageComponents/login/ New modular login components with better separation of concerns
projects/app/src/pageComponents/app/evaluation/ Complete evaluation system UI implementation
projects/app/src/pageComponents/app/detail/WorkflowComponents/ Added error catch functionality to workflow nodes
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported


const parentId = node.parentNodeId;
let sourceNodes: FlowNodeItemType[] = [];
const sourceNodes = new Map<string, FlowNodeItemType>();
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Map instead of array for sourceNodes improves performance by avoiding repeated linear searches for duplicate checking.

Copilot uses AI. Check for mistakes.

Comment on lines +212 to +213
const bd_vid = getBdVId();
if (bd_vid) {
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The bd_vid check and early return logic could be extracted into a helper function for better readability and testability.

Suggested change
const bd_vid = getBdVId();
if (bd_vid) {
if (shouldUsePasswordLogin()) {

Copilot uses AI. Check for mistakes.

const { lastChatAppId, setSource, setAppId } = useChatStore();
const { userInfo, initUserInfo } = useUserStore();

const [isInitedUser, setIsIntedUser] = useState(false);
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name 'isIntedUser' appears to be a typo. Should likely be 'isInitedUser' to match the intended meaning.

Suggested change
const [isInitedUser, setIsIntedUser] = useState(false);
const [isInitedUser, setIsInitedUser] = useState(false);

Copilot uses AI. Check for mistakes.

path: 'dataset',
select: 'vectorModel'
},
while (true) {
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The infinite while loop should have a clear exit condition comment or safety mechanism to prevent potential infinite loops in error scenarios.

Copilot uses AI. Check for mistakes.


const { register, handleSubmit } = useForm<updateEvalItemBody>();

return (
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This component is quite large (578 lines). Consider breaking it down into smaller sub-components for better maintainability and testing.

Copilot uses AI. Check for mistakes.

@c121914yu c121914yu merged commit 13b7e0a into main Jul 22, 2025
6 of 7 checks passed
@c121914yu c121914yu deleted the v4.10.2-dev branch July 22, 2025 01:42
Copy link
Contributor

gru-agent bot commented Jul 22, 2025

⏳ Processing in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants