功能: 文件与目录支持重命名(FE-020),挂起面板展示旧名→新名
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 的挂起更改。
|
||||
*/
|
||||
|
||||
@@ -128,6 +128,8 @@ export interface PendingChange {
|
||||
status: string
|
||||
changeType: string
|
||||
version: number
|
||||
/** rename 挂起更改的原服务端路径,其余为 null。 */
|
||||
sourceServerPath: string | null
|
||||
}
|
||||
|
||||
// 签入结果,对应 core TfsCheckinResult。
|
||||
|
||||
Reference in New Issue
Block a user