Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(workflow/hooks/use-shortcuts): resolve issue of copy shortcut not working in workflow debug and preview panel (#8249)

Kevin9703ec57922bb685
diff --git a/web/app/components/workflow/hooks/use-shortcuts.ts b/web/app/components/workflow/hooks/use-shortcuts.ts
index 666c3a45bae..439b521a309 100644
--- a/web/app/components/workflow/hooks/use-shortcuts.ts
+++ b/web/app/components/workflow/hooks/use-shortcuts.ts
@@ -70,7 +70,8 @@ export const useShortcuts = (): void => {
})
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
- if (shouldHandleShortcut(e)) {
+ const { showDebugAndPreviewPanel, showInputsPanel } = workflowStore.getState()
+ if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel && !showInputsPanel) {
e.preventDefault()
handleNodesCopy()
}