Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it?
Fixes #7224.
在「用户输入 → 显隐设置」中选择
global.chat_user_id等内置变量后,调试或发布会提示“不存在的引用变量”。变量选择器提供完整的global列表,但基础节点的validate将所有global引用都放到user_input_field_list中查找;内置变量和 API 输入变量不在这个列表中,因此合法引用被拒绝。Summary of your change
ui/src/workflow/nodes/base-node/index.vue:global引用改为在get_up_node_field_list(true, true)返回的全局变量中校验,与变量选择器及表单节点沿用同一份变量定义。user_input_field_list。复用现有变量列表,避免单独维护内置变量白名单。用户输入字段和 API 输入字段修改时,开始节点现有的
refreshFieldList事件会更新该列表。没有 API、存储格式或界面布局变化。Testing
cd ui && npm run type-check:通过。cd ui && npx eslint src/workflow/nodes/base-node/index.vue:通过。git diff --check:通过。validate;12 个断言通过:6 个内置变量、API 输入变量、自定义全局输入、同节点输入、已删除的全局输入、已删除的同节点输入、不完整条件。原始组件在第一个内置变量用例即返回“不存在的引用变量”。脚本使用现有 Vue/TypeScript 依赖;未向项目添加测试框架。复查步骤:在用户输入字段的显隐条件中分别选择
global.chat_user_id、API 输入变量和其他用户输入字段,保存后调试/发布;删除被引用的自定义字段后再次校验,应仍提示引用不存在。Limitations
cd ui && npm run lint全量检查有 72 个现有错误,分布于其他文件;修改文件的单独检查通过。未运行后端测试及完整浏览器端到端测试。Please indicate you've done the following: