功能: 实现分支间合并向导(FE-024),候选变更集可全部或单个合并,冲突走冲突弹窗

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fenghp
2026-06-11 13:31:25 +08:00
co-authored by Cursor
parent cfa4141c1a
commit 6910563078
10 changed files with 444 additions and 11 deletions
+14
View File
@@ -181,6 +181,20 @@ export function branch(body: { sourceServerPath: string; targetServerPath: strin
return apiClient.post<{ result: FileOperationResult }>("/api/files/branch", { body })
}
/**
* 查询源 → 目标的待合并变更集候选列表。
*/
export function mergeCandidates(params: { sourceServerPath: string; targetServerPath: string }) {
return apiClient.get<{ candidates: HistoryEntry[] }>("/api/files/merge-candidates", { query: params })
}
/**
* 合并:源 → 目标(产生挂起更改,冲突走冲突处理),changeset 缺省为合并全部候选。
*/
export function merge(body: { sourceServerPath: string; targetServerPath: string; changeset?: number }) {
return apiClient.post<{ result: GetLatestResult }>("/api/files/merge", { body })
}
/**
* 读取当前 Workspace 的挂起更改。
*/