2025-02-23 10:55:38 +00:00
|
|
|
import type { Change } from 'diff';
|
|
|
|
|
2024-07-17 18:54:46 +00:00
|
|
|
export type ActionType = 'file' | 'shell';
|
|
|
|
|
|
|
|
export interface BaseAction {
|
|
|
|
content: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface FileAction extends BaseAction {
|
|
|
|
type: 'file';
|
|
|
|
filePath: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ShellAction extends BaseAction {
|
|
|
|
type: 'shell';
|
|
|
|
}
|
|
|
|
|
2024-11-08 16:17:31 +00:00
|
|
|
export interface StartAction extends BaseAction {
|
|
|
|
type: 'start';
|
|
|
|
}
|
|
|
|
|
|
|
|
export type BoltAction = FileAction | ShellAction | StartAction;
|
2024-07-17 18:54:46 +00:00
|
|
|
|
|
|
|
export type BoltActionData = BoltAction | BaseAction;
|
2024-12-17 15:49:43 +00:00
|
|
|
|
|
|
|
export interface ActionAlert {
|
2024-12-18 15:39:36 +00:00
|
|
|
type: string;
|
2024-12-17 15:49:43 +00:00
|
|
|
title: string;
|
|
|
|
description: string;
|
|
|
|
content: string;
|
2024-12-24 21:35:44 +00:00
|
|
|
source?: 'terminal' | 'preview'; // Add source to differentiate between terminal and preview errors
|
2024-12-17 15:49:43 +00:00
|
|
|
}
|
2025-02-23 10:55:38 +00:00
|
|
|
|
|
|
|
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';
|
|
|
|
}
|