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: copy and paste shortcut in the textarea of the workflow run panel (#8345)

Yi Xiao8d2269f7621d
diff --git a/web/app/components/workflow/hooks/use-shortcuts.ts b/web/app/components/workflow/hooks/use-shortcuts.ts
index 439b521a309..8b1003e89c6 100644
--- a/web/app/components/workflow/hooks/use-shortcuts.ts
+++ b/web/app/components/workflow/hooks/use-shortcuts.ts
@@ -70,15 +70,16 @@ export const useShortcuts = (): void => {
})
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
- const { showDebugAndPreviewPanel, showInputsPanel } = workflowStore.getState()
- if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel && !showInputsPanel) {
+ const { showDebugAndPreviewPanel } = workflowStore.getState()
+ if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
e.preventDefault()
handleNodesCopy()
}
}, { exactMatch: true, useCapture: true })
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, (e) => {
- if (shouldHandleShortcut(e)) {
+ const { showDebugAndPreviewPanel } = workflowStore.getState()
+ if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
e.preventDefault()
handleNodesPaste()
}
@@ -99,7 +100,8 @@ export const useShortcuts = (): void => {
}, { exactMatch: true, useCapture: true })
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.z`, (e) => {
- if (shouldHandleShortcut(e)) {
+ const { showDebugAndPreviewPanel } = workflowStore.getState()
+ if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
e.preventDefault()
workflowHistoryShortcutsEnabled && handleHistoryBack()
}