功能: 文件与目录支持重命名(FE-020),挂起面板展示旧名→新名

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fenghp
2026-06-11 13:11:55 +08:00
co-authored by Cursor
parent 23062e8333
commit 4ba868482b
12 changed files with 281 additions and 9 deletions
+7
View File
@@ -160,6 +160,13 @@ export function undoFiles(body: FileActionBody) {
return apiClient.post<{ result: FileOperationResult }>("/api/files/undo", { body })
}
/**
* 重命名文件或目录(同目录改名),产生 rename 挂起更改。
*/
export function renameFile(body: { serverPath: string; newName: string }) {
return apiClient.post<{ result: FileOperationResult }>("/api/files/rename", { body })
}
/**
* 读取当前 Workspace 的挂起更改。
*/
+2
View File
@@ -128,6 +128,8 @@ export interface PendingChange {
status: string
changeType: string
version: number
/** rename 挂起更改的原服务端路径,其余为 null。 */
sourceServerPath: string | null
}
// 签入结果,对应 core TfsCheckinResult。