bolt.diy/app/types/actions.ts
Anirban Kar 3c28e8ad88
fix: fix enhance prompt to stop implementing full project instead of enhancing (#1383) #release
* fix: enhance prompt fix

* fix: added error capture on api error

* fix: replaced error with log for wrong files selected by bolt
2025-03-01 01:34:35 +05:30

50 lines
1.0 KiB
TypeScript

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'; // 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';
}