mirror of https://github.com/langgenius/dify.git
feat(workflow): Enable keyboard delete for all node types including Start
Removes explicit Start node exclusion from handleNodesDelete function: - Remove BlockEnum.Start filter from bundled nodes selection - Remove BlockEnum.Start filter from selected node detection - Allows DEL/Backspace keys to delete Start nodes same as other nodes - Button delete already worked, now keyboard delete works too Fixes: Start nodes can now be deleted via both button and keyboard shortcuts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2a1c5ff57b
commit
764436ed8e
|
|
@ -1656,7 +1656,7 @@ export const useNodesInteractions = () => {
|
|||
|
||||
const nodes = getNodes()
|
||||
const bundledNodes = nodes.filter(
|
||||
node => node.data._isBundled && node.data.type !== BlockEnum.Start,
|
||||
node => node.data._isBundled,
|
||||
)
|
||||
|
||||
if (bundledNodes.length) {
|
||||
|
|
@ -1669,7 +1669,7 @@ export const useNodesInteractions = () => {
|
|||
if (edgeSelected) return
|
||||
|
||||
const selectedNode = nodes.find(
|
||||
node => node.data.selected && node.data.type !== BlockEnum.Start,
|
||||
node => node.data.selected,
|
||||
)
|
||||
|
||||
if (selectedNode) handleNodeDelete(selectedNode.id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue