Spaces:
Sleeping
Sleeping
File size: 1,740 Bytes
bf8b26e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
import type { Change } from 'diff';
export type ActionType = 'file' | 'shell' | 'supabase';
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 interface SupabaseAction extends BaseAction {
type: 'supabase';
operation: 'migration' | 'query';
filePath?: string;
projectId?: string;
}
export type BoltAction = FileAction | ShellAction | StartAction | BuildAction | SupabaseAction;
export type BoltActionData = BoltAction | BaseAction;
export interface ActionAlert {
type: string;
title: string;
description: string;
content: string;
source?: 'terminal' | 'preview'; // Add source to differentiate between terminal and preview errors
}
export interface SupabaseAlert {
type: string;
title: string;
description: string;
content: string;
source?: 'supabase';
}
export interface DeployAlert {
type: 'success' | 'error' | 'info';
title: string;
description: string;
content?: string;
url?: string;
stage?: 'building' | 'deploying' | 'complete';
buildStatus?: 'pending' | 'running' | 'complete' | 'failed';
deployStatus?: 'pending' | 'running' | 'complete' | 'failed';
source?: 'vercel' | 'netlify' | 'github';
}
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';
}
|