mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: preserve initialTodos when overwriting cline messages
The todo list was not being rendered in new subtasks because the overwriteClineMessages method was calling restoreTodoListForTask unconditionally, which would overwrite any initialTodos passed during task construction. This fix only restores the todo list from messages if there are no existing todos.
This commit is contained in:
parent
85364b88c0
commit
de4959420d
1 changed files with 4 additions and 1 deletions
|
|
@ -558,7 +558,10 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
|
||||
public async overwriteClineMessages(newMessages: ClineMessage[]) {
|
||||
this.clineMessages = newMessages
|
||||
restoreTodoListForTask(this)
|
||||
// Only restore todo list from messages if we don't already have initialTodos
|
||||
if (!this.todoList || this.todoList.length === 0) {
|
||||
restoreTodoListForTask(this)
|
||||
}
|
||||
await this.saveClineMessages()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue