-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feature: V4.11.1 #5350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: V4.11.1 #5350
Conversation
Preview sandbox Image:
|
Preview mcp_server Image:
|
Docs Preview:🚀 FastGPT Document Preview Ready! |
Preview fastgpt Image:
|
There was a problem hiding this 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 FastGPT version 4.11.1 with significant enhancements to the logging system, MCP toolsets, and application workflow functionality.
Key changes include:
- Enhanced app logs with configurable fields, improved search, filtering by team members, and additional metrics (response time, error count, points)
- Simplified MCP toolset architecture with new runtime workflow dispatch for dynamic tool expansion
- Improved system variable handling in workflows and variable management UI
Reviewed Changes
Copilot reviewed 128 out of 137 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
test/cases/global/core/app/jsonschema.test.ts | Adds 'reference' to renderTypeList for all input types in test cases |
test/cases/function/packages/global/common/string/textSplitter.test.ts | Updates table formatting in text splitter tests and adds new test case for table split handling |
projects/app/src/web/support/user/hooks/useSendCode.tsx | Exports openCodeAuthModal from useSendCode hook |
projects/app/src/web/core/workflow/utils.ts | Adds systemInputConfig filtering in filterSensitiveNodesData |
projects/app/src/web/core/chat/context/chatItemContext.tsx | Adds optional chatId field to ChatBoxDataType |
projects/app/src/web/core/app/api/plugin.ts | Updates team plugin templates handling for MCP tools |
projects/app/src/web/core/app/api/log.ts | New API module for app log management (updateLogKeys, getLogKeys, getAppChatLogs) |
projects/app/src/web/core/app/api.ts | Removes app chat logs API and updates delAppById return type |
projects/app/src/service/common/system/cron.ts | Adds cronRefreshModels to system cron jobs |
projects/app/src/pages/dashboard/apps/index.tsx | Adds localStorage cleanup for deleted apps |
projects/app/src/pages/api/support/mcp/client/getTools.ts | Updates MCP tools API to properly await results |
Multiple API files | Updates to MCP tools handling, app deletion, and log management endpoints |
Multiple pageComponents files | Extensive updates to logs UI with configurable fields, new filters, and enhanced UX |
Multiple i18n files | Adds translations for new log management features |
packages/web files | Updates to hooks, components, and utilities supporting new functionality |
packages/service files | Core service updates for workflow dispatch, app management, and MCP handling |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
projects/app/src/pageComponents/app/detail/Logs/index.tsx:24
- [nitpick] The variable name
chatSearch
is ambiguous. Consider renaming tosearchText
orchatSearchQuery
to better indicate it searches both chat titles and session IDs.
import DateRangePicker, {
packages/service/core/workflow/dispatch/utils.ts:165
- Function name
rewriteRuntimeWorkFlow
has inconsistent capitalization. Should berewriteRuntimeWorkflow
to maintain consistency with other function names in the codebase.
export const rewriteRuntimeWorkFlow = async ({
const [logKeys = DefaultAppLogKeys, setLogKeys] = useLocalStorageState<AppLogKeysType[]>( | ||
`app_log_keys_${appId}` | ||
); | ||
const { runAsync: fetchLogKeys, data: teamLogKeys = [] } = useRequest2( | ||
async () => { | ||
const res = await getLogKeys({ appId }); | ||
const keys = res.logKeys.length > 0 ? res.logKeys : DefaultAppLogKeys; | ||
setLogKeys(keys); | ||
return keys; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using localStorage with a fallback to DefaultAppLogKeys creates potential synchronization issues. Consider implementing a proper loading state or ensuring the localStorage value is validated against the expected schema.
const [logKeys = DefaultAppLogKeys, setLogKeys] = useLocalStorageState<AppLogKeysType[]>( | |
`app_log_keys_${appId}` | |
); | |
const { runAsync: fetchLogKeys, data: teamLogKeys = [] } = useRequest2( | |
async () => { | |
const res = await getLogKeys({ appId }); | |
const keys = res.logKeys.length > 0 ? res.logKeys : DefaultAppLogKeys; | |
setLogKeys(keys); | |
return keys; | |
const [rawLogKeys, setLogKeys] = useLocalStorageState<string>( | |
`app_log_keys_${appId}` | |
); | |
const [logKeys, setValidatedLogKeys] = useState<AppLogKeysType[]>(() => { | |
try { | |
const parsedKeys = JSON.parse(rawLogKeys || 'null'); | |
if (Array.isArray(parsedKeys) && parsedKeys.every(key => typeof key === 'string')) { | |
return parsedKeys as AppLogKeysType[]; | |
} | |
} catch (e) { | |
console.warn('Invalid logKeys in localStorage, falling back to default:', e); | |
} | |
return DefaultAppLogKeys; | |
}); | |
const [isLogKeysLoading, setLogKeysLoading] = useState(true); | |
const { runAsync: fetchLogKeys, data: teamLogKeys = [] } = useRequest2( | |
async () => { | |
setLogKeysLoading(true); | |
try { | |
const res = await getLogKeys({ appId }); | |
const keys = res.logKeys.length > 0 ? res.logKeys : DefaultAppLogKeys; | |
setLogKeys(JSON.stringify(keys)); | |
setValidatedLogKeys(keys); | |
return keys; | |
} finally { | |
setLogKeysLoading(false); | |
} |
Copilot uses AI. Check for mistakes.
...externalProvider.externalWorkflowVariables, | ||
...variables | ||
...getSystemVariables(data) | ||
// ...variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable merging order has changed with commented out ...variables
. This could lead to unexpected behavior where external variables override user-defined variables. Consider documenting the intended precedence or restoring the original order.
Copilot uses AI. Check for mistakes.
@@ -178,6 +183,17 @@ export async function getChildAppPreviewNode({ | |||
}) | |||
: true; | |||
|
|||
if (item.type === AppTypeEnum.toolSet) { | |||
const children = await getMCPChildren(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getMCPChildren
call inside the preview node generation could be expensive for large toolsets. Consider caching or lazy-loading this data to improve performance.
const children = await getMCPChildren(item); | |
const cacheKey = String(item._id); | |
let children = mcpChildrenCache.get(cacheKey); | |
if (!children) { | |
children = await getMCPChildren(item); | |
mcpChildrenCache.set(cacheKey, children); | |
} |
Copilot uses AI. Check for mistakes.
...variables, | ||
{ | ||
...data, | ||
key: getNanoid(8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The random key generation using getNanoid(8)
could potentially create conflicts. Consider using a more robust key generation strategy or adding conflict detection.
key: getNanoid(8) | |
key: (() => { | |
let newKey; | |
do { | |
newKey = getNanoid(16); | |
} while (variables.some((item) => item.key === newKey)); | |
return newKey; | |
})() |
Copilot uses AI. Check for mistakes.
* feat: support system toolset * fix: type * fix: system tool config * chore: mcptool config migrate * refactor: mcp toolset * fix: fe type error * fix: type error * fix: show version * chore: support extract tool's secretInputConfig out of inputs * chore: compatible with old version mcp * chore: adjust * deps: update dependency @fastgpt-skd/plugin * fix: version
* chore: compatible with old version mcp * fix: version * fix: compatible bug * fix: mcp object params * fix: type error * chore: update test cases * chore: remove log
* log keys config modal * multiple select * api * fontsize * code * chatid * fix build * fix * fix component * change name * log keys config * fix * delete unused * fix
* doc * fix: action * remove log
* feat: table test: 1 * feat: table test: 2 * feat: table test: 3 * feat: table test: 4 * feat: table test : 5 把maxSize改回chunkSize * feat: table test : 6 都删了,只看maxSize * feat: table test : 7 恢复初始,接下来删除标签功能 * feat: table test : 8 删除标签功能 * feat: table test : 9 删除标签功能成功 * feat: table test : 10 继续调试,修改trainingStates * feat: table test : 11 修改第一步 * feat: table test : 12 修改第二步 * feat: table test : 13 修改了HtmlTable2Md * feat: table test : 14 修改表头分块规则 * feat: table test : 15 前面表格分的太细了 * feat: table test : 16 改着改着表头又不加了 * feat: table test : 17 用CUSTOM_SPLIT_SIGN不行,重新改 * feat: table test : 18 表头仍然还会多加,但现在分块搞的合理了终于 * feat: table test : 19 还是需要搞好表头问题,先保存一下调试情况 * feat: table test : 20 调试结束,看一下replace有没有问题,没问题就pr * feat: table test : 21 先把注释删了 * feat: table test : 21 注释replace都改了,下面切main分支看看情况 * feat: table test : 22 修改旧文件 * feat: table test : 23 修改测试文件 * feat: table test : 24 xlsx表格处理 * feat: table test : 25 刚才没保存先com了 * feat: table test : 26 fix * feat: table test : 27 先com一版调试 * feat: table test : 28 试试放format2csv里 * feat: table test : 29 xlsx解决 * feat: table test : 30 tablesplit解决 * feat: table test : 31 * feat: table test : 32
* fix: system-tool secret inputs * fix: rewrite runtime node i18n for system tool * perf: mcp old version compatibility * fix: splitPluginId * fix: old mcp toolId * fix: filter secret key * feat: support system toolset activation * chore: remove log
⏳ Processing in progress |
No description provided.