SIGN IN SIGN UP

Copy Paste, Undo and Redo implemented (#253)

## Description

This Pull Request implements four new features in the langflow Workflow
project:

- Copy and Paste feature for multiple nodes
- Undo and Redo feature for node actions

### Copy and Paste Feature
The Copy and Paste feature allows users to select multiple nodes by
holding down the `Shift` key and dragging the mouse over the nodes, copy
them using the `Ctrl+C` keyboard shortcut, and paste them into a
different location within the workflow by leaving the mouse pointer at
the desired location and pressing `Ctrl+V`.

### Undo and Redo Feature
The Undo and Redo feature allows users to undo and redo actions on the
workflow nodes using the `Ctrl+Z` and `Ctrl+Shift+Z` keyboard shortcuts,
respectively. When a user undoes an action, the state of the nodes in
the workflow is reverted to the previous state. Similarly, when a user
redoes an action, the state of the nodes is restored to the previous
state that was undone.

## How to Test

To test these features, follow the below steps:

1. Run the `langflow` application.
2. Add a few nodes to the workflow.
3. Select one or more nodes by holding down the `Shift` key and dragging
the mouse over the nodes.
4. Press `Ctrl+C` to copy the selected nodes.
5. Leave the mouse pointer at a different location in the workflow and
press `Ctrl+V` to paste the copied nodes.
6. Use the `Ctrl+Z` and `Ctrl+Shift+Z` keyboard shortcuts to undo and
redo actions on the nodes in the workflow.
A
anovazzi1 committed
ad1a1e683f9d625667366988b23a137fb54d475c
Committed by GitHub <noreply@github.com> on 5/10/2023, 9:47:00 PM