功能: 历史记录支持回滚变更集与回滚到变更集(FE-021),结果为挂起更改审查后签入

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fenghp
2026-06-11 13:17:24 +08:00
co-authored by Cursor
parent 4ba868482b
commit 63f7111bcd
9 changed files with 231 additions and 7 deletions
+7
View File
@@ -167,6 +167,13 @@ export function renameFile(body: { serverPath: string; newName: string }) {
return apiClient.post<{ result: FileOperationResult }>("/api/files/rename", { body })
}
/**
* 回滚变更集(只产生挂起更改):single 仅反做该 changeset,toVersion 反做其后全部改动。
*/
export function rollback(body: { serverPath: string; mode: "single" | "toVersion"; changeset: number }) {
return apiClient.post<{ result: GetLatestResult }>("/api/files/rollback", { body })
}
/**
* 读取当前 Workspace 的挂起更改。
*/