mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
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:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user