优化: 添加本地文件改为扫描式(FE-025修订),目录对比自动筛出本地新增项勾选添加
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -96,17 +96,6 @@ export async function revealPath(targetPath: string, isFolder: boolean): Promise
|
||||
return bridge.revealPath(targetPath, isFolder)
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开系统文件选择器(多选),非 Electron 环境返回 null。
|
||||
*/
|
||||
export async function selectFiles(defaultPath?: string): Promise<string[] | null> {
|
||||
const bridge = getBridge()
|
||||
if (!bridge) {
|
||||
return null
|
||||
}
|
||||
return bridge.selectFiles(defaultPath)
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造非 Electron 环境下的占位服务状态。
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,5 @@ export {
|
||||
pathsExist,
|
||||
revealPath,
|
||||
selectDirectory,
|
||||
selectFiles,
|
||||
startService,
|
||||
} from "./bridge"
|
||||
|
||||
@@ -27,7 +27,6 @@ export interface MactfsBridge {
|
||||
selectDirectory(): Promise<string | null>
|
||||
pathsExist(paths: string[]): Promise<Record<string, boolean>>
|
||||
revealPath(targetPath: string, isFolder: boolean): Promise<boolean>
|
||||
selectFiles(defaultPath?: string): Promise<string[] | null>
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
Reference in New Issue
Block a user