feat: Add Diff View and File History Tracking

- Implemented a new Diff View in the Workbench to visualize file changes
- Added file history tracking with detailed change information
- Enhanced FileTree and FileModifiedDropdown to show line additions and deletions
- Integrated file history saving and retrieval in ActionRunner
- Updated Workbench view types to include 'diff' option
- Added support for inline and side-by-side diff view modes
This commit is contained in:
Toddyclipsgg
2025-02-23 07:55:38 -03:00
parent 8c72ed76b3
commit ab6f5328b4
17 changed files with 1192 additions and 77 deletions

View File

@@ -1,3 +1,5 @@
import type { Change } from 'diff';
export type ActionType = 'file' | 'shell';
export interface BaseAction {
@@ -28,3 +30,15 @@ export interface ActionAlert {
content: string;
source?: 'terminal' | 'preview'; // Add source to differentiate between terminal and preview errors
}
export interface FileHistory {
originalContent: string;
lastModified: number;
changes: Change[];
versions: {
timestamp: number;
content: string;
}[];
// Novo campo para rastrear a origem das mudanças
changeSource?: 'user' | 'auto-save' | 'external';
}