Skip to content

Commit 417daf3

Browse files
committed
Merge branch 'feat/creator-mode' into feat/creator-mode-rebased
2 parents 1898b2c + 20c294b commit 417daf3

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/core/Cline.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,13 @@ export class Cline extends EventEmitter<ClineEvents> {
245245
console.error("Failed to initialize RooIgnoreController:", error)
246246
})
247247

248-
this.apiConfiguration = apiConfiguration
249-
this.api = buildApiHandler(apiConfiguration)
248+
this.creatorModeConfig = creatorModeConfig ?? historyItem?.creatorModeConfig ?? { creatorMode: false }
249+
250+
this.apiConfiguration = {
251+
...apiConfiguration,
252+
creatorModeConfig: this.creatorModeConfig
253+
}
254+
this.api = buildApiHandler(this.apiConfiguration)
250255
this.promptCacheKey = crypto.randomUUID()
251256

252257
this.urlContentFetcher = new UrlContentFetcher(provider.context)

src/core/tools/newTaskTool.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@ export async function newTaskTool(
7878
// Delay to allow mode change to take effect before next tool is executed.
7979
await delay(500)
8080

81-
// Pass the creator mode config from the parent task to ensure creator mode is preserved
82-
const newCline = await provider.initClineWithTask(message, undefined, cline, {}, cline.creatorModeConfig)
81+
const newCline = await provider.initClineWithTask(
82+
message,
83+
undefined,
84+
cline,
85+
{},
86+
cline.creatorModeConfig
87+
)
8388
cline.emit("taskSpawned", newCline.taskId)
8489

8590
pushToolResult(`Successfully created new task in ${targetMode.name} mode with message: ${message}`)

0 commit comments

Comments
 (0)