mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-12 23:01:21 +00:00
feat: persist workspacePath to each task for improved task management (#2999)
This commit is contained in:
parent
8df1ee0252
commit
97f0dd4cfa
1 changed files with 6 additions and 1 deletions
|
|
@ -134,6 +134,7 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
readonly rootTask: Cline | undefined = undefined
|
||||
readonly parentTask: Cline | undefined = undefined
|
||||
readonly taskNumber: number
|
||||
readonly workspacePath: string
|
||||
|
||||
isPaused: boolean = false
|
||||
pausedModeSlug: string = defaultModeSlug
|
||||
|
|
@ -225,6 +226,10 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
}
|
||||
|
||||
this.taskId = historyItem ? historyItem.id : crypto.randomUUID()
|
||||
// normal use-case is usually retry similar history task with new workspace
|
||||
this.workspacePath = parentTask
|
||||
? parentTask.workspacePath
|
||||
: getWorkspacePath(path.join(os.homedir(), "Desktop"))
|
||||
this.instanceId = crypto.randomUUID().slice(0, 8)
|
||||
this.taskNumber = -1
|
||||
|
||||
|
|
@ -292,7 +297,7 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
}
|
||||
|
||||
get cwd() {
|
||||
return getWorkspacePath(path.join(os.homedir(), "Desktop"))
|
||||
return this.workspacePath
|
||||
}
|
||||
|
||||
// Storing task to disk for history
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue