feat(workflow): add node-level execution logs for workflow debugging#6445
Open
stakeswky wants to merge 2 commits intolabring:mainfrom
Open
feat(workflow): add node-level execution logs for workflow debugging#6445stakeswky wants to merge 2 commits intolabring:mainfrom
stakeswky wants to merge 2 commits intolabring:mainfrom
Conversation
- Add NodeLogItemType (time/level/message/data) to runtime types - Instrument workflow dispatcher with lifecycle logs: - Node start (name, type) - Params resolved (keys) - Dispatch callback (catch error, edge count) - Execution finished (duration, error status) - Error responses - Attach nodeLogs to DispatchNodeResponseType and debug responses - Add nodeLogs to FlowNodeItemType debugResult schema - Render node logs in WholeResponseModal (chat response detail) - Render node logs in NodeDebugResponse (workflow debug panel) - Pass nodeLogs through workflowDebugContext - Add i18n keys for zh-CN, en, zh-Hant Closes: workflow node log feature from README roadmap
Preview sandbox Image: |
Preview mcp_server Image: |
z.record() requires both key and value type args in Zod v4.
Preview fastgpt Image: |
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 does this PR do?
Implements the Workflow Node Logs feature from the project roadmap — each workflow node now records structured execution logs (start, params, dispatch, finish, error) that are visible in both the chat response detail modal and the workflow debug panel.
Changes
Backend (
packages/service,packages/global)NodeLogItemType: New type withtime,level(debug/info/warn/error),message, and optionaldatanodeLogsMapon workflow runner class withpushNodeLog()helperDispatchNodeResponseTypeand debug mode responsesFrontend (
projects/app)nodeLogsthrough todebugResultTypes & Schema
nodeLogsadded toDispatchNodeResponseTypenodeLogsadded toFlowNodeItemType.debugResultzod schemanodeLogsadded toWorkflowDebugResponsetypei18n
Screenshots
Node logs appear in the response detail panel with color-coded log levels:
Testing
lint-staged)