mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
parent
2dd48afe39
commit
ed1623bd7f
|
|
@ -54,6 +54,9 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4144' \
|
|||
7. 模型测试时,如果模型未启动,会导致无法被测试。
|
||||
8. MCP header 中带特殊内容时,会抛错。
|
||||
9. 工作流引用其他 Agent 时,切换版本号后未及时更新 UI。
|
||||
10. http 节点使用值为空字符串的全局变量时,值会被替换为 null。
|
||||
11. 判断器节点折叠时,连线断开。
|
||||
12. 节点调试时,单选和多选类型的变量无法展示选项。
|
||||
|
||||
## 插件
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
"document/content/docs/introduction/development/openapi/chat.mdx": "2025-11-14T13:21:17+08:00",
|
||||
"document/content/docs/introduction/development/openapi/dataset.mdx": "2025-09-29T11:34:11+08:00",
|
||||
"document/content/docs/introduction/development/openapi/intro.mdx": "2025-09-29T11:34:11+08:00",
|
||||
"document/content/docs/introduction/development/openapi/share.mdx": "2025-12-09T12:18:15+08:00",
|
||||
"document/content/docs/introduction/development/openapi/share.mdx": "2025-12-09T23:33:32+08:00",
|
||||
"document/content/docs/introduction/development/proxy/cloudflare.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/development/proxy/http_proxy.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/development/proxy/nginx.mdx": "2025-07-23T21:35:03+08:00",
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
"document/content/docs/introduction/guide/plugins/google_search_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/guide/plugins/searxng_plugin_guide.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/guide/plugins/upload_system_tool.mdx": "2025-11-04T16:58:12+08:00",
|
||||
"document/content/docs/introduction/guide/team_permissions/customDomain.mdx": "2025-12-09T18:14:22+08:00",
|
||||
"document/content/docs/introduction/guide/team_permissions/customDomain.mdx": "2025-12-09T23:33:32+08:00",
|
||||
"document/content/docs/introduction/guide/team_permissions/invitation_link.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/guide/team_permissions/team_roles_permissions.mdx": "2025-07-23T21:35:03+08:00",
|
||||
"document/content/docs/introduction/index.en.mdx": "2025-07-23T21:35:03+08:00",
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
"document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00",
|
||||
"document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00",
|
||||
"document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00",
|
||||
"document/content/docs/toc.mdx": "2025-12-09T18:14:22+08:00",
|
||||
"document/content/docs/toc.mdx": "2025-12-09T23:33:32+08:00",
|
||||
"document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00",
|
||||
"document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00",
|
||||
"document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00",
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
"document/content/docs/upgrading/4-14/4141.mdx": "2025-11-19T10:15:27+08:00",
|
||||
"document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00",
|
||||
"document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00",
|
||||
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-08T21:45:21+08:00",
|
||||
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-09T23:33:32+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",
|
||||
|
|
@ -199,6 +199,6 @@
|
|||
"document/content/docs/use-cases/external-integration/feishu.mdx": "2025-07-24T14:23:04+08:00",
|
||||
"document/content/docs/use-cases/external-integration/official_account.mdx": "2025-08-05T23:20:39+08:00",
|
||||
"document/content/docs/use-cases/external-integration/openapi.mdx": "2025-09-29T11:34:11+08:00",
|
||||
"document/content/docs/use-cases/external-integration/wecom.mdx": "2025-12-09T20:03:29+08:00",
|
||||
"document/content/docs/use-cases/external-integration/wecom.mdx": "2025-12-09T23:33:32+08:00",
|
||||
"document/content/docs/use-cases/index.mdx": "2025-07-24T14:23:04+08:00"
|
||||
}
|
||||
|
|
@ -66,9 +66,26 @@ export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum)
|
|||
return false;
|
||||
};
|
||||
|
||||
// 1. any值,忽略格式化
|
||||
if (value === undefined || value === null) return value;
|
||||
if (!valueType || valueType === WorkflowIOValueTypeEnum.any) return value;
|
||||
// Handle null/undefined, return default value by type
|
||||
if (value === undefined || value === null) {
|
||||
if (!valueType || valueType === WorkflowIOValueTypeEnum.any) return value;
|
||||
|
||||
// Default value map (use function to ensure new reference each time)
|
||||
const defaultValueMap: Partial<Record<WorkflowIOValueTypeEnum, () => any>> = {
|
||||
[WorkflowIOValueTypeEnum.string]: () => '',
|
||||
[WorkflowIOValueTypeEnum.number]: () => 0,
|
||||
[WorkflowIOValueTypeEnum.boolean]: () => false,
|
||||
[WorkflowIOValueTypeEnum.arrayString]: () => [],
|
||||
[WorkflowIOValueTypeEnum.arrayNumber]: () => [],
|
||||
[WorkflowIOValueTypeEnum.arrayBoolean]: () => [],
|
||||
[WorkflowIOValueTypeEnum.arrayObject]: () => [],
|
||||
[WorkflowIOValueTypeEnum.arrayAny]: () => [],
|
||||
[WorkflowIOValueTypeEnum.object]: () => ({})
|
||||
};
|
||||
|
||||
const getDefaultValue = defaultValueMap[valueType];
|
||||
return getDefaultValue ? getDefaultValue() : value;
|
||||
}
|
||||
|
||||
// Password check
|
||||
if (valueType === WorkflowIOValueTypeEnum.string && isSecretValue(value)) return value;
|
||||
|
|
@ -78,7 +95,7 @@ export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum)
|
|||
(valueType === WorkflowIOValueTypeEnum.string && typeof value === 'string') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.number && typeof value === 'number') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.boolean && typeof value === 'boolean') ||
|
||||
(valueType.startsWith('array') && Array.isArray(value)) ||
|
||||
(valueType?.startsWith('array') && Array.isArray(value)) ||
|
||||
(valueType === WorkflowIOValueTypeEnum.object && typeof value === 'object') ||
|
||||
(valueType === WorkflowIOValueTypeEnum.chatHistory &&
|
||||
(Array.isArray(value) || typeof value === 'number')) ||
|
||||
|
|
@ -117,7 +134,7 @@ export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum)
|
|||
}
|
||||
|
||||
// 4.4 数组类型(这里 value 不是数组类型)(TODO: 嵌套数据类型转化)
|
||||
if (valueType.startsWith('array')) {
|
||||
if (valueType?.startsWith('array')) {
|
||||
if (isObjectString(value)) {
|
||||
try {
|
||||
return json5.parse(value);
|
||||
|
|
@ -132,7 +149,7 @@ export const valueTypeFormat = (value: any, valueType?: WorkflowIOValueTypeEnum)
|
|||
WorkflowIOValueTypeEnum.datasetQuote,
|
||||
WorkflowIOValueTypeEnum.selectDataset,
|
||||
WorkflowIOValueTypeEnum.selectApp
|
||||
].includes(valueType)
|
||||
].includes(valueType as any)
|
||||
) {
|
||||
if (isObjectString(value)) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ export const useDebug = () => {
|
|||
<Box display={currentTab === TabEnum.node ? 'block' : 'none'}>
|
||||
{renderInputs.map((item) => (
|
||||
<LabelAndFormRender
|
||||
{...item}
|
||||
key={item.key}
|
||||
label={item.label}
|
||||
required={item.required}
|
||||
|
|
@ -279,6 +280,7 @@ export const useDebug = () => {
|
|||
<Box display={currentTab === TabEnum.global ? 'block' : 'none'}>
|
||||
{customVar.map((item) => (
|
||||
<LabelAndFormRender
|
||||
{...item}
|
||||
key={item.key}
|
||||
label={item.label}
|
||||
required={item.required}
|
||||
|
|
@ -291,6 +293,7 @@ export const useDebug = () => {
|
|||
))}
|
||||
{internalVar.map((item) => (
|
||||
<LabelAndFormRender
|
||||
{...item}
|
||||
key={item.key}
|
||||
label={item.label}
|
||||
required={item.required}
|
||||
|
|
@ -303,6 +306,7 @@ export const useDebug = () => {
|
|||
))}
|
||||
{filteredVar.map((item) => (
|
||||
<LabelAndFormRender
|
||||
{...item}
|
||||
key={item.key}
|
||||
label={item.label}
|
||||
required={item.required}
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ const WorkflowInitContextProvider = ({
|
|||
version: node.data.version,
|
||||
versionLabel: node.data.versionLabel,
|
||||
isLatestVersion: node.data.isLatestVersion,
|
||||
isFolded: node.data.isFolded,
|
||||
inputs: node.data.inputs.map((input) => {
|
||||
return {
|
||||
key: input.key,
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ const SecretInputModal = ({
|
|||
{showInput ? (
|
||||
<Input
|
||||
bg={'myGray.50'}
|
||||
placeholder={item.description}
|
||||
{...register(inputKey, {
|
||||
required: item.required
|
||||
})}
|
||||
|
|
|
|||
Loading…
Reference in New Issue