feat(graph/base.py): add _built_object_repr method to Node class
feat(graph/nodes.py): add _built_object_repr method to DocumentLoaderNode, VectorStoreNode, and TextSplitterNode classes
Chat now has Markdown helping see code blocks and images.
Now models stream their messages if possible (VectorStores don't allow
async for now in LangChain, I think)
We added a cache_manager object. This allows you to add images (and soon
other things too) to the chat. You can also recall the object saved from
another PythonFunction node.
Closes#241Closes#162
## 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.