|
import type { Change } from 'diff'; |
|
|
|
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'; |
|
} |
|
|
|
export interface StartAction extends BaseAction { |
|
type: 'start'; |
|
} |
|
|
|
export interface BuildAction extends BaseAction { |
|
type: 'build'; |
|
} |
|
|
|
export type BoltAction = FileAction | ShellAction | StartAction | BuildAction; |
|
|
|
export type BoltActionData = BoltAction | BaseAction; |
|
|
|
export interface ActionAlert { |
|
type: string; |
|
title: string; |
|
description: string; |
|
content: string; |
|
source?: 'terminal' | 'preview'; |
|
} |
|
|
|
export interface FileHistory { |
|
originalContent: string; |
|
lastModified: number; |
|
changes: Change[]; |
|
versions: { |
|
timestamp: number; |
|
content: string; |
|
}[]; |
|
|
|
|
|
changeSource?: 'user' | 'auto-save' | 'external'; |
|
} |
|
|