-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
ability store (and version) flows in github repo #4767
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
base: main
Are you sure you want to change the base?
Conversation
…ted by "sqlite" database
…readonly state - Updated API calls in the UI to include commit ID when fetching chatflows.
…chatflows from Git based on commit ID. This allows for fetching the latest version of a chatflow if it is dirty or if a specific commit ID is provided.
… ID. - Enhanced FlowVersionService to handle draft creation logic, ensuring the last published commit is preserved. - Updated UI components to integrate the makeDraft feature, including API calls and user notifications for draft creation status.
- Introduced a section for unpublished changes in the VersionSideDrawer, showing the current draft if available.
…d addtional functionality for delete the file from git once the chatflow is deleted.
…d chatflowID to construct a path
initial logic for saving messages.json
- Added 'external' property to commit information to indicate if a commit is external to Flowise. - Updated FlowVersionService to handle branch names in git operations, improving commit and retrieval processes.
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.
Pull Request Overview
This PR adds Git configuration management and flow versioning features across the UI and server.
- Introduce Git Config UI views and dialogs (list, add/edit, test, activate/delete)
- Implement new API endpoints and service logic for publishing flows to Git, fetching version history, and creating drafts
- Extend database schema, entities, and reducers to store Git config and flow version metadata
Reviewed Changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
packages/ui/src/views/gitconfig/index.jsx | New Git Config list view with add/edit/delete/activate actions |
packages/ui/src/views/canvas/index.jsx | Added commitId parsing, readonly flags, and flowVersion API calls |
packages/ui/src/store/reducers/canvasReducer.js | Added isReadonly state, SET_READONLY action, and fixed SET_DIRTY logic |
packages/server/src/services/chatflows/index.ts | Added pre-delete Git cleanup logic but uses incorrect config key |
packages/server/src/enterprise/services/flow-version.service.ts | Core implementation of flow publish, history, fetch-by-commit, and draft |
Comments suppressed due to low confidence (1)
packages/ui/src/views/gitconfig/index.jsx:170
- [nitpick] The
permissionId
is set to'datasets:create'
, which doesn't align with Git Config functionality. Consider updating it to something like'gitconfig:create'
per the TODO.
permissionId={'datasets:create'}
@@ -14,10 +15,12 @@ export const initialState = { | |||
const canvasReducer = (state = initialState, action) => { | |||
switch (action.type) { | |||
case actionTypes.SET_DIRTY: |
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.
The SET_DIRTY case falls through to REMOVE_DIRTY when action.isReadonly is true, which unintentionally clears the dirty flag. Add an explicit return (or a break) for the read-only case to prevent fallthrough.
Copilot uses AI. Check for mistakes.
getSpecificChatflowApi.request(chatflowId) | ||
// commitId is the query param not a path param | ||
// http://localhost:8080/canvas/84620a63-cb4b-4a82-884b-21d72b3ea72f?commitId=f6f9c7cbf5ed00d6e48e5ed275c85bb8554661d5 | ||
const commitId = getUrlParameter('commitId') |
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.
[nitpick] This inner declaration of commitId
shadows the outer variable. Remove the inner const
and use the top-level commitId
to simplify the logic.
const commitId = getUrlParameter('commitId') | |
commitId = getUrlParameter('commitId') |
Copilot uses AI. Check for mistakes.
{<MenuItem onClick={handleShowCommit}> | ||
<IconEye size={18} style={{ marginRight: 8 }} /> | ||
Show Commit | ||
</MenuItem>} |
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.
[nitpick] The curly braces around <MenuItem>
are unnecessary. Render the <MenuItem>
directly without wrapping in {}
.
{<MenuItem onClick={handleShowCommit}> | |
<IconEye size={18} style={{ marginRight: 8 }} /> | |
Show Commit | |
</MenuItem>} | |
<MenuItem onClick={handleShowCommit}> | |
<IconEye size={18} style={{ marginRight: 8 }} /> | |
Show Commit | |
</MenuItem> |
Copilot uses AI. Check for mistakes.
This PR introduces Git configuration and flow versioning functionalities into both the UI and server. Key changes include the addition of Git config views and dialogs, integration of new API endpoints and service functions for Git operations and version publishing, and corresponding migrations and database entity updates to support these features.
work-in-progress.