[feat][backend] Add prompt management OpenAPI endpoints for CRUD, draft and commit operations#474
Merged
Merged
Conversation
ming845378603
previously approved these changes
Mar 25, 2026
caijialin0626
approved these changes
Mar 25, 2026
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (70.64%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #474 +/- ##
==========================================
- Coverage 75.07% 75.07% -0.01%
==========================================
Files 632 633 +1
Lines 67215 67521 +306
==========================================
+ Hits 50464 50693 +229
- Misses 13523 13594 +71
- Partials 3228 3234 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
ming845378603
approved these changes
Mar 25, 2026
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.
This PR introduces a complete set of Prompt Management OpenAPI endpoints, extending the existing prompt OpenAPI service (which previously only supported Execute, ExecuteStreaming, ListPromptBasic, and BatchGetPromptByPromptKey) with 6 new management APIs:
New API Endpoints:
Method Path Description POST /v1/loop/prompts Create a new prompt with name, key, description, type, and security level DELETE /v1/loop/prompts/:prompt_id Delete a prompt by ID GET /v1/loop/prompts/:prompt_id Get prompt details (optionally with commit and/or draft info) POST /v1/loop/prompts/:prompt_id/drafts/save Save a prompt draft POST /v1/loop/prompts/:prompt_id/drafts/commit Commit a prompt draft with version and description POST /v1/loop/prompts/:prompt_id/commits/list List prompt commit history with pagination