feat: prompt editor#657
Open
kverushi wants to merge 2 commits intoRitechSolutions:origin/developmentfrom
Open
Conversation
edritech
reviewed
Apr 16, 2026
| @@ -0,0 +1,71 @@ | |||
| """add prompt_versions and prompt_configs tables | |||
|
|
|||
| Revision ID: a1b2c3d4e5f6 | |||
Contributor
There was a problem hiding this comment.
Revision ID here doesn't match with revision line 14
edritech
reviewed
Apr 16, 2026
| stmt = ( | ||
| select(PromptVersionModel) | ||
| .where( | ||
| PromptVersionModel.workflow_id == str(workflow_id), |
Contributor
There was a problem hiding this comment.
Why do we use the cast as a string here? PromptVersionModel expects workflow_id to be UUID.
edritech
reviewed
Apr 16, 2026
| prompt_field: str, | ||
| ) -> int: | ||
| stmt = select(func.max(PromptVersionModel.version_number)).where( | ||
| PromptVersionModel.workflow_id == str(workflow_id), |
Contributor
There was a problem hiding this comment.
Same here, is that required to be a string?
edritech
reviewed
Apr 16, 2026
| versions = await self.get_versions_for_context(workflow_id, node_id, prompt_field) | ||
| for v in versions: | ||
| v.is_active = False | ||
| await self.db.flush() |
Contributor
There was a problem hiding this comment.
Do we need a bulk update here using db statement execution vs. flush?
edritech
reviewed
Apr 16, 2026
Contributor
edritech
left a comment
There was a problem hiding this comment.
Please check the comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Changes Made
Testing
Ritech Contribution Checklist
Related Issues
Closes #
Screenshots (if applicable)
Note: This PR follows Ritech's contribution guidelines for GenAssist. For questions, refer to CONTRIBUTING.md or contact the Ritech team.