mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Add a copilot toggle button next to Test Run in the workflow header and a left-mounted panel that runs the copilot Fix flow (start fix, live SSE progress log, approve_repair/run_verify/provide_testdata/publish/ undo/re_fix actions, and a message box), auto-resolving the app id (workflow store `appId`), workspace id (`currentWorkspaceAtom`), and the most recent failed run (`useWorkflowRunHistory`) instead of requiring manual entry. Extracts the session/SSE request logic from the standalone `/workflow-copilot-debug` page into a shared `app/components/workflow-copilot` module (`use-copilot-session`) so both the debug page and the new panel drive the same implementation. Adds a `showWorkflowCopilotPanel` store flag (defaults false) mirroring the existing `showEnvPanel` pattern, so the feature is fully additive and does not affect rag-pipeline/snippet editors that reuse the same header/panel shell. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>