You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add multiple workspaces support
- Add getWorkspacePath function to centralize workspace directory path retrieval
- Use the new workspace directory retrieval logic in Cline, Mentions, ClineProvider, and WorkspaceTracker
- Update WorkspaceFile on tab switch and prevent redundant updates by checking prevWorkSpacePath
- Fix the bug that loads the contents of the previous tab when quickly switching tabs
- Optimize getWorkspacePath return value for better reliability
Co-authored-by: xiong <[email protected]>
// Note: this is not a drop-in replacement for listFiles at the start of tasks, since that will be done for Desktops when there is no workspace selected
@@ -13,25 +14,34 @@ class WorkspaceTracker {
13
14
privatedisposables: vscode.Disposable[]=[]
14
15
privatefilePaths: Set<string>=newSet()
15
16
privateupdateTimer: NodeJS.Timeout|null=null
17
+
privateprevWorkSpacePath: string|undefined
18
+
privateresetTimer: NodeJS.Timeout|null=null
16
19
20
+
getcwd(){
21
+
returngetWorkspacePath()
22
+
}
17
23
constructor(provider: ClineProvider){
18
24
this.providerRef=newWeakRef(provider)
19
25
this.registerListeners()
20
26
}
21
27
22
28
asyncinitializeFilePaths(){
23
29
// should not auto get filepaths for desktop since it would immediately show permission popup before cline ever creates a file
0 commit comments