feat: 任务保存冲突检测——磁盘被外部修改时提示选择而非静默覆盖
This commit is contained in:
1 parent
97fda1696a
commit
876e4969bd
6 files changed
+80
-22
No files matched your search
@@ -145,6 +145,16 @@ export interface FlowDefinition {
|
||||
};
|
||||
}
|
||||
|
||||
export interface FlowSaveOptions {
|
||||
/** 编辑器加载任务时磁盘上的 updatedAt,用于外部修改冲突检测 */
|
||||
expectedUpdatedAt?: string;
|
||||
/** 为 true 时跳过冲突检测,强制覆盖磁盘 */
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
export type FlowSaveResult =
|
||||
| { conflict: false; flow: FlowDefinition }
|
||||
| { conflict: true; diskFlow: FlowDefinition };
|
||||
export interface FlowSummary {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -230,3 +240,4 @@ export interface RunEvent {
|
||||
attempt?: number;
|
||||
startedAt?: string;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user