feat: implement Phase 5 - undo/redo system with command pattern
Added comprehensive undo/redo functionality: - Command pattern interface and base classes - HistoryManager with 50-operation stack - EditCommand for all edit operations (cut, delete, paste, trim) - Full keyboard shortcuts (Ctrl+Z undo, Ctrl+Y/Ctrl+Shift+Z redo) - HistoryControls UI component with visual feedback - Integrated history system with all edit operations - Toast notifications for undo/redo actions - History state tracking and display New files: - lib/history/command.ts - Command interface and BaseCommand - lib/history/history-manager.ts - HistoryManager class - lib/history/commands/edit-command.ts - EditCommand and factory functions - lib/hooks/useHistory.ts - React hook for history management - components/editor/HistoryControls.tsx - History UI component Modified files: - components/editor/AudioEditor.tsx - Integrated history system - components/editor/EditControls.tsx - Updated keyboard shortcuts display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -125,7 +125,7 @@ export function EditControls({
|
||||
|
||||
{/* Keyboard Shortcuts Info */}
|
||||
<div className="text-xs text-muted-foreground space-y-1 p-3 rounded-lg bg-muted/30">
|
||||
<p className="font-medium mb-2">Keyboard Shortcuts:</p>
|
||||
<p className="font-medium mb-2">Edit Shortcuts:</p>
|
||||
<p>• Shift+Drag: Select region</p>
|
||||
<p>• Ctrl+A: Select all</p>
|
||||
<p>• Ctrl+X: Cut</p>
|
||||
|
||||
Reference in New Issue
Block a user