-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Autosave and Undo/Redo #3687
base: main
Are you sure you want to change the base?
Conversation
0xi4o
commented
Dec 12, 2024
- Implements autosave in chatflow and agentflow canvas
- Implements undo/redo functionality in chatflow and agentflow canvas
… first load, autosave clears redo, and sync node triggers autosave
…e errors in onEdgesChange
…and make undo/redo work
…hanges during undo/redo
spotted 2 issues:
autosave.mp4 |
Also something we discussed, nodes feel pretty laggy when there are quite a lot
|
2 more bugs:
autosavebug1.mp4
autosavebug2.mp4 |
|
@@ -100,6 +104,7 @@ const CredentialInputHandler = ({ inputParam, data, onSelect, disabled = false } | |||
<div key={reloadTimestamp} style={{ display: 'flex', flexDirection: 'row' }}> | |||
<AsyncDropdown | |||
disabled={disabled} | |||
key={`${data.id}-${inputParam.name}-${data.inputs[credentialId]}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -152,6 +152,7 @@ export const AsyncDropdown = ({ | |||
) | |||
}} | |||
sx={{ height: '100%', '& .MuiInputBase-root': { height: '100%' } }} | |||
key={`${nodeData.id}-${name}-${nodeData.inputs[internalValue]}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extremely helpful! |
A suggestion: it might be helpful to have a toggle to enable/disable autosave. There are times when I make several changes and later realize I want to revert back to the previously saved version (will usually just refresh). Also times when I might demonstrate a change but not actually want it saved. Having the ability to turn autosave off in advance would be useful in those kinds of situations. |