diff --git a/packages/types/src/api.ts b/packages/types/src/api.ts index d2832d60e4..6abfcc4eea 100644 --- a/packages/types/src/api.ts +++ b/packages/types/src/api.ts @@ -23,7 +23,7 @@ export interface McpApi { export interface RooCodeAPI extends EventEmitter, McpApi { // Task Management startNewTask(options: { - configuration: RooCodeSettings + configuration?: RooCodeSettings text?: string images?: string[] newTab?: boolean diff --git a/src/extension/api.ts b/src/extension/api.ts index 6d97020eaf..1b7466f138 100644 --- a/src/extension/api.ts +++ b/src/extension/api.ts @@ -126,7 +126,7 @@ export class API extends EventEmitter implements RooCodeAPI { images, newTab, }: { - configuration: RooCodeSettings + configuration?: RooCodeSettings text?: string images?: string[] newTab?: boolean @@ -154,7 +154,13 @@ export class API extends EventEmitter implements RooCodeAPI { consecutiveMistakeLimit: Number.MAX_SAFE_INTEGER, } - const task = await provider.createTask(text, images, undefined, options, configuration) + const task = await provider.createTask( + text, + images, + undefined, + options, + configuration || this.getConfiguration(), + ) if (!task) { throw new Error("Failed to create task due to policy restrictions")