Skip to content

Conversation

@newfish-cmyk
Copy link
Collaborator

@newfish-cmyk newfish-cmyk commented Jan 7, 2026

  1. 修复变量更新节点文件数组类型转换错误

移除了自动将文件 URL 字符串数组转换为对象数组的逻辑,避免下游节点接收到错误的数据格式。

  1. 修复表单输入节点 sessionStorage 共享冲突

移除了基于 sessionStorage 的表单缓存机制,改为直接使用 defaultValues,解决多个表单节点相互覆盖导致默认值不显示的问题。

  1. 修复代码节点切换语言后 AI 使用旧语言生成代码

将 Copilot 组件改为使用实时传入的节点数据,避免缓存延迟导致 AI 读取到旧的语言配置。

  1. 修复自定义反馈节点并发写入冲突和交互节点后写入失败

将自定义反馈从各节点独立异步写入改为统一收集后集中写入,解决并发冲突和时序依赖问题。

@gru-agent
Copy link
Contributor

gru-agent bot commented Jan 7, 2026

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 535a0a6 ✅ Finished

History Assignment

Files

File Pull Request
projects/app/src/pages/api/v2/chat/completions.ts ❌ Failed (The test job failed due to an environment issue: vitest cannot resolve the import path '../../../../projects/app/src/pages/api/v2/chat/completions' from the test file. This is not a source code bug, but rather a problem with the test runner's workspace/project root configuration or file path resolution. The test file itself is correct and covers the logic, but the framework cannot load files outside the workspace root.)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Preview sandbox Image:

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

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Preview mcp_server Image:

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

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Docs Preview:


🚀 FastGPT Document Preview Ready!

🔗 👀 Click here to visit preview

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Preview fastgpt Image:

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

Copy link
Contributor

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 pull request addresses multiple bugs related to workflow execution, interactive components, and custom feedback handling. The fixes primarily focus on improving data flow consistency, fixing state management issues, and resolving database write conflicts.

Key Changes:

  • Refactored custom feedback collection to batch feedbacks at workflow level instead of individual node-level writes
  • Removed sessionStorage-based form state persistence that caused issues with multiple interactive nodes
  • Fixed code copilot to use real-time inputs/outputs instead of fetching from node state
  • Moved variable type conversions and interactive request detection to appropriate locations in the execution flow

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
projects/app/src/pages/api/v2/chat/completions.ts Moved isInteractiveRequest calculation earlier before workflow dispatch
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/NodeCode/index.tsx Passed real-time inputs/outputs to NodeCopilot component
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/NodeCode/Copilot.tsx Updated to use passed inputs/outputs instead of fetching from node state
projects/app/src/components/core/chat/components/Interactive/InteractiveComponents.tsx Removed sessionStorage persistence logic for form data
projects/app/src/components/core/chat/components/AIResponseBox.tsx Removed chatItemDataId parameter and sessionStorage handling
packages/service/core/workflow/dispatch/utils.ts Added file variable handling to convert URL strings to file objects
packages/service/core/workflow/dispatch/type.d.ts Added customFeedbacks field to DispatchFlowResponse
packages/service/core/workflow/dispatch/tools/runUpdateVar.ts Removed file URL to object conversion and cloneVariables usage
packages/service/core/workflow/dispatch/tools/customFeedback.ts Simplified to return feedback in response instead of immediate database write
packages/service/core/workflow/dispatch/plugin/run.ts Added customFeedbacks collection from plugin workflow
packages/service/core/workflow/dispatch/loop/runLoop.ts Added customFeedbacks collection from loop iterations
packages/service/core/workflow/dispatch/index.ts Added batch custom feedback write logic and responseChatItemId resolution
packages/service/core/workflow/dispatch/child/runApp.ts Added customFeedbacks propagation from child app
packages/service/core/chat/controller.ts Simplified addCustomFeedbacks function and added proper appId type conversion
packages/global/core/workflow/runtime/type.d.ts Removed cloneVariables from ChatDispatchProps and added customFeedbacks to result
packages/global/core/workflow/runtime/constants.ts Added customFeedbacks enum value
document/data/doc-last-modified.json Updated modification timestamps for documentation files
document/content/docs/upgrading/4-14/4145.mdx Added bug fix descriptions for version 4.14.5

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Jan 9, 2026
@c121914yu c121914yu requested a review from Copilot January 9, 2026 07:13
Copy link
Contributor

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

Copilot reviewed 19 out of 21 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 159 to +184
else if (item.type === VariableInputEnum.file) {
copyVariables[item.key] = cloneVariables[item.key];
const currentValue = copyVariables[item.key];

copyVariables[item.key] = currentValue
.map((url: string) => {
try {
const urlObj = new URL(url);
// Extract key: remove bucket prefix (e.g., "/fastgpt-private/")
const key = decodeURIComponent(urlObj.pathname.replace(/^\/[^/]+\//, ''));
const filename = path.basename(key) || 'file';
const extname = path.extname(key).toLowerCase(); // includes the dot, e.g., ".jpg"

// Check if it's an image type
const isImage = extname && imageFileType.includes(extname);

return {
id: path.basename(key, path.extname(key)), // filename without extension
key,
name: filename,
type: isImage ? ChatFileTypeEnum.image : ChatFileTypeEnum.file
};
} catch {
return null;
}
})
.filter((file: any) => file !== null);
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The code assumes currentValue is always an array of strings, but there's no validation to check if currentValue exists or is an array. If currentValue is undefined, null, or not an array, this will throw a runtime error when calling .map(). Consider adding a guard check like: if (!Array.isArray(currentValue)) continue; or return an empty array.

Copilot uses AI. Check for mistakes.
@c121914yu c121914yu merged commit 357b7f1 into labring:v4.14.5-dev Jan 9, 2026
5 checks passed
c121914yu added a commit that referenced this pull request Jan 9, 2026
* refactor: fastgpt object storage & global proxy (#6155)

* feat: migrate to fastgpt storage sdk

* chore: rename env variable

* chore: move to sdk dir

* docs: object storage

* CHORE

* chore: storage mocks

* chore: update docker-compose

* fix: global proxy agent

* fix: update COS proxy

* refactor: use fetch instead of http.request

* fix: axios request base url

* fix: axios proxy request behavior

* fix: bumps axios

* fix: patch axios for proxy

* fix: replace axios with proxied axios

* fix: upload txt file encoding

* clean code

* fix: use "minio" for minio adapter (#6205)

* fix: use minio client to delete files when using minio vendor (#6206)

* doc

* feat: filter citations and add response button control (#6170)

* feat: filter citations and add response button control

* i18n

* fix

* fix test

* perf: chat api code

* fix: workflow edge overlap and auto-align in folded loop nodes (#6204)

* fix: workflow edge overlap and auto-align in folded loop nodes

* sort

* fix

* fix edge

* fix icon

* perf: s3 file name

* perf: admin get app api

* perf: catch user error

* fix: refactor useOrg hook to use debounced search key (#6180)

* chore: comment minio adapter (#6207)

* chore: filename with suffix random id

* perf: s3 storage code

* fix: encode filename when copy object

---------

Co-authored-by: archer <[email protected]>

* fix: node card link

* json

* perf: chat index;

* index

* chat item soft delete (#6216)

* chat item soft delete

* temp

* fix

* remove code

* perf: delete chat item

---------

Co-authored-by: archer <[email protected]>

* feat: select wheather filter sensitive info when export apps (#6222)

* fix some bugs (#6210)

* fix v4.14.5 bugs

* type

* fix

* fix

* custom feedback

* fix

* code

* fix

* remove invalid function

---------

Co-authored-by: archer <[email protected]>

* perf: test

* fix file default local upload (#6223)

* docs: improve object storage introduction (#6224)

* doc

---------

Co-authored-by: roy <[email protected]>
Co-authored-by: heheer <[email protected]>
Co-authored-by: Finley Ge <[email protected]>
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.

2 participants