修改文件监控逻辑以及UI

This commit is contained in:
2025-08-13 22:04:18 +08:00
parent 2faf07827d
commit d7c34d54bd
6 changed files with 513 additions and 17 deletions

View File

@@ -2482,5 +2482,35 @@ export const api = {
console.error("Failed to unwatch directory:", error);
throw error;
}
},
// ============= Claude Project Directory Watching =============
/**
* Starts watching Claude project directory for the given project path
* @param projectPath - The project path to find the corresponding Claude directory
* @returns Promise resolving when watching starts
*/
async watchClaudeProjectDirectory(projectPath: string): Promise<void> {
try {
return await invoke<void>("watch_claude_project_directory", { projectPath });
} catch (error) {
console.error("Failed to watch Claude project directory:", error);
throw error;
}
},
/**
* Stops watching Claude project directory for the given project path
* @param projectPath - The project path to find the corresponding Claude directory
* @returns Promise resolving when watching stops
*/
async unwatchClaudeProjectDirectory(projectPath: string): Promise<void> {
try {
return await invoke<void>("unwatch_claude_project_directory", { projectPath });
} catch (error) {
console.error("Failed to unwatch Claude project directory:", error);
throw error;
}
}
};