feature/rebase #44
Reference in New Issue
Block a user
Delete Branch "feature/rebase"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
- Replace .at("field").get<T>() with json_to_field<T>() calls - Use .contains() and .value() for safe field access - Follows CONTRIBUTING.md rule to always use json_to<T>() for JSON deserialization- Add edit_history_interactive() method to HistoryEditor class - Implements the complete history editing flow: 1. Build rebase content from history 2. Spawn editor for rebase commands 3. Parse and validate rebase commands 4. For each edit command, build edit prompt and spawn editor 5. Apply all changes - Returns expected<vector<Message>, string> - Add content field to RebaseLine struct for storing edited content - Update apply_rebase() to use content field when present - Wire up -b/--edit-history flag to call edit_history_interactive() - Program exits after successful edit and saves modified history - Add 12 integration tests for the edit history feature: 1. Pick all messages (history unchanged) 2. Drop a single message 3. Edit message content 4. Change message role 5. Delete line equals drop (implicit pick) 6. Edit first message (no context) 7. Empty history rejected 8. Invalid command error 9. Invalid index error 10. Invalid role error 11. Multiple edits in one session 12. Edit then continue conversation normally - Register test_edit_history in CMakeLists.txt