发布

  • [issue-2232] [BE] [FE] Add prompt version restore functionality (#3239)

    frostbyte_neo 发布于 2025-09-24 08:16:25 +00:00

    • [issue-2232] [FE/BE] Add prompt version restore functionality

    Implements the ability to restore previous prompt versions by creating new versions with content from selected versions.

    Backend changes:

    • Add restorePromptVersion method to PromptService
    • Add POST /prompts/{promptId}/versions/{versionId}/restore endpoint
    • Add comprehensive integration test for restore functionality

    Frontend changes:

    • Add useRestorePromptVersionMutation API hook
    • Add restore button with Undo-2 icon to CommitHistory component
    • Add confirmation modal for restore action
    • Add tooltip with 'Restore this version' message

    Implements issue-2232: Add revert to previous version feature for prompts

    • [thiaghora/issue-2232-add-prompt-version-restore-feature] refactor FE part

    • Fix tests

    • fix review comments

    • [issue-2232] hide the restore action for the latest version

    • [issue-2232] hide the restore action for the latest version

    • Add prompt not found test

    • Fix: Use correct prompt ID in restore version test

    Co-authored-by: thiagoh thiagoh@comet.com


    Co-authored-by: Yaroslav Boiko yaroslavboiko@ip-192-168-1-15.ec2.internal
    Co-authored-by: Cursor Agent cursoragent@cursor.com

    下载附件