mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Optimize Task ID Initialization Order
Signed-off-by: yansheng3 <yansheng3@staff.weibo.com>
This commit is contained in:
parent
e1836f81d7
commit
0a81853d84
1 changed files with 2 additions and 5 deletions
|
|
@ -148,7 +148,8 @@ export class Cline {
|
|||
throw new Error("Either historyItem or task/images must be provided")
|
||||
}
|
||||
|
||||
this.taskId = crypto.randomUUID()
|
||||
this.taskId = historyItem ? historyItem.id : crypto.randomUUID()
|
||||
|
||||
this.apiConfiguration = apiConfiguration
|
||||
this.api = buildApiHandler(apiConfiguration)
|
||||
this.terminalManager = new TerminalManager()
|
||||
|
|
@ -161,10 +162,6 @@ export class Cline {
|
|||
this.diffViewProvider = new DiffViewProvider(cwd)
|
||||
this.enableCheckpoints = enableCheckpoints ?? false
|
||||
|
||||
if (historyItem) {
|
||||
this.taskId = historyItem.id
|
||||
}
|
||||
|
||||
// Initialize diffStrategy based on current state
|
||||
this.updateDiffStrategy(Experiments.isEnabled(experiments ?? {}, EXPERIMENT_IDS.DIFF_STRATEGY))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue